# New ReleaseD3D9Client Development

#### kuddel

##### Donator
Donator
Hi Jarmo,
nice you found some time:thumbup:

I've checked to see what differences there are and found some (minor) issue.

The local light is not "brighter than the sun", so your vessel still casts a shadow into the lit area.
That looked strange when hovering with the sun in the back...(see attachment)
Maybe a different render order would already fix that.

Not a big issue, but since you are there, you might have an easy solution at hand.

#### Attachments

• Local lights and sun shadow.jpg
86 KB · Views: 46
Last edited:

#### 4throck

##### Enthusiast !
It works! Thank you for adding it.
:thumbup:

But the effect is too sharp.
The inline client has a more natural light dropoff on the edges.

Here's what I get with downward facing Altair landing lights on:

Not complaining, just thinking about for consistency.
I know these things take time to get right!

Last edited:

#### jarmonik

Beta Tester
But the effect is too sharp.
The inline client has a more natural light dropoff on the edges.

I double checked the math and couldn't find anything wrong.

What values of Penumbra and Umbra are used in your code for the spotlight ?

---------- Post added at 16:39 ---------- Previous post was at 16:36 ----------

I've checked to see what differences there are and found some (minor) issue.

Sadly it isn't a rendering order issue so it gets a bit more complicated but I'll look into it.

#### kuddel

##### Donator
Donator
Sadly it isn't a rendering order issue so it gets a bit more complicated but I'll look into it.

...no pressure :thumbup:

#### 4throck

##### Enthusiast !
My mistake.

I was under the impression that the inline client had soft edges.
But it's an illusion generated by lower resolution terrain rendering:

But really there's no difference! :embarrassed:

#### Abloheet

Can a build of this version of the d3d9 client be also made for the latest orbiter 2016 beta revision?

#### 1987VCRProductions

##### Active member
I posted this in a different thread but on second thought I figured that it would fit better here, but I seem to have some issues with the sky glitching in Orbiter 2010 P1 running D3D9:

I'm having an issue which has only just recently popped up, and it only seems to happen with Orbiter 2010 P1 running with the D3D9 Client (R16.5 Build). Basically, Earth's atmosphere occasionally has this pixelated film that gradually disappears as you leave the atmosphere, going away completely at around 81km in altitude. I've been using 2010 and the D3D9 client on my Windows 10 laptop for months now and this issue is just now showing up. Any ideas on a fix would be greatly appreciated.

I was running a previous version (I think it was R15) and I upgraded to 16.5 in an attempt to fix the problem. It's kind of made things worse because the GDI compatibility check box doesn't seem to do anything anymore (no airspeed/altitude for shuttle landings etc).

#### 1987VCRProductions

##### Active member
Disregard this. I found what was causing the issue. If you set Discord to recognize your install of Orbiter with D3D9 installed, it causes this glitch.

I still have issues with the latest version of D3D9 for Orbiter 2010 P1 (R16.5), I'm not seeing the altitude and airspeed readings for Shuttle Fleet vessels in the glass cockpit view when I deploy the air data probes. I have verified that GDI Compatibility is checked in the Video tab.

#### jarmonik

Beta Tester

Here's a new bigger update once in a while. The long waited feature of vessel self shadowing has arrived. Currently the shadowing is limited to focus vessel and any other vessel in close proximity. Shadows received by planet's surface and surface base buildings can be glitchy in some conditions, (Stock Atlantis and launchpad for an example), so these shadows are disabled by default. But there is a plan to fix that so no worries.

Shadow map size can be altered from D3D9Client.cfg (valid sizes 1024, 2048, 4096) default is 2048.

#### Attachments

• D3D9Client2016-R3.zip
1.7 MB · Views: 55
Last edited:

#### jarmonik

Beta Tester
Kuddel

I was just thinking that we probably should convert the surface base meshes "structure_as" to a visuals (derived from vObject) so that we could add them to a visual object list and iterate through them in the main rendering loop in the Scene.cpp

PHP:
for (pv = vobjFirst; pv; pv = pv->next) {
if (!pv->vobj->IsActive()) continue;
if (!pv->vobj->IsVisible()) continue;
if (pv->type == OBJTP_VESSEL) {
pv->vobj->Render();

}
}

Then we could deal with the buildings just like we do with the vessels. But it could also create some bugs. Those visuals wouldn't have OBJHANDLE available. Any thoughts ?

Also an other problem that has appeared is that we have reached the maximum number of flow control booleans in a shaders. I had to remove some non essentials booleans to get the new features to work. There's no easy solution to that.

#### kuddel

##### Donator
Donator
Hi Jarmo,

thanks for the shadow feature! I maneuvered around the ISS a bit and it looks very nice.

I found one little issue (sorry).
Could it be that some property of the ISS main solar panel texture is preventing it to "get" a shadow?
As seen in the attachments, the Shuttle casts a perfect shadow onto the "darker" central panels, but fails to do so onto the P6 (or was it S6) truss' panels...

The other way around however it works like advertised :thumbup:

Regarding the "unification" of Vessels and Base-Objects having a common Render() API, I like the idea.
I have not yet looked into that in any detail however :blush:

/Kuddel

#### Attachments

203 KB · Views: 50
190.6 KB · Views: 42

#### kuddel

##### Donator
Donator
Sorry, I forgot to add the test scenarios (for easier reproduction)

_shadow_test(1).scn : Shuttle above ISS' main solar panels
_shadow_test(2).scn : Shuttle above ISS' central (smaller) solar panels
_shadow_test(3).scn : Shuttle below ISS' main solar panels

...and I also forgot to express how much "wow" the self-shadowing adds to the sim!

#### Attachments

2.5 KB · Views: 13
Last edited:

#### jarmonik

Beta Tester
Could it be that some property of the ISS main solar panel texture is preventing it to "get" a shadow?

Yes, that appears to be the case. It's the translucency map that will sent the panels to Advanced shader and it doesn't have the shadow code. I forgot it. Not sure if a simple copy-paste works due to a flow control problem. The shader is broken and the translucency isn't working as it's supposed to, anyways. So, might be better to just disable the loading of translucency maps until the issues with the shader are fixed.

A hot fix is to delete the "issbso_*" translucency maps.

#### 4throck

##### Enthusiast !
Just tried the shadow update and it seems to work quite well.
A great improvement!

#### clipper

##### New member
Best improvement in a while! Thank you.

I'd like to make a small suggestion though, the Video - Advanced menu could use some smooth fonts and a general cleanup in terms of letter case in order to be more uniform with the rest of the Launchpad.

I know it's probably the least helpful suggestion and something that's not on your mind, but I guess I have a user interface OCD of some sort :lol:

Donator
Beta Tester

#### Felix24

##### Member
The shader is broken and the translucency isn't working as it's supposed to, anyways. So, might be better to just disable the loading of translucency maps until the issues with the shader are fixed.
A hot fix is to delete the "issbso_*" translucency maps.

Sorry, I haven't been maintaining the shader like I should. Yeah, for now just delete the transparency maps until I get around to fixing the shader.

_transm.dds
_transl.dds