# New ReleaseD3D9Client Development

#### 80mileshigh

##### Addon Developer
Addon Developer
Donator
I have a question regarding self-shadow artefacts.

From doing a search I can see it was raised here last year (described as shimmering on a LEM mesh) but I'm not sure there was ever a solution.

I'm finding that particularly on large surfaces I'm getting visuals like these. Here's Deepstar with and without self-shadows:

Scale it up to a 32km O'Neill Cylinder and the problem becomes more pronounced (I accept this is an outlying mesh!).

For what its worth Deepstar is textured and the Cylinder isn't. I get the issue irrespective of self-shadow settings (aside from turning them off) and irrespective of Graphics Option settings. I've played with the shadow map size in the cfg too.

I can live with this, but if I'm missing an easy fix let me know. I thought it might be helpful to raise

#### Mr. Residuals

##### Addon Tester
Okay, my saving issue has been fixed.

#### Arvil

##### Well-known member
@80mileshigh: I've never noticed anything like that, perhaps something with the graphics in your computer? The only thing I ever see, is occasional rendering on a distant area on a planet from low orbit may flicker here and there, and on Mercury, for instance, some of the planet textures don't blend from one to the other well, but, I figure it's my graphics, not the simulator. Once or twice, during distant approach, the graphics fails to show maybe half a planet, but, usually it clears itself shortly, especially if I switch F8 a couple of times, the graphics card forgets what's it's doing until I prod it a bit.

#### n72.75

##### Addon Developer
Addon Developer
Tutorial Publisher
Donator

#### jarmonik

##### Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
I have a question regarding self-shadow artefacts.
I can live with this, but if I'm missing an easy fix let me know. I thought it might be helpful to raise
There's no easy fix for that. I have few ideas on how to fix that but the implementation would become heavier/slower. Also it's designed for a real-life sized vessels like The Space Shuttle and it starts failing more and more when a vessel grows bigger. Something like ISS works pretty well especially if it's made by plugging smaller modules together since each module can have it's own shadow-map. Only one map per vessel is supported at a moment and it works well enough.

#### 80mileshigh

##### Addon Developer
Addon Developer
Donator
There's no easy fix for that.
Thanks. Useful to know - I can provide some informed guidance in add-on documentation for larger vessels.

#### space091

##### New member
Hey so I recently got back into orbiter after a 2 year break, downloaded it again, got d3d9 client and I get no sky textures on earth, the sky is just black even tho its day & the sun is right above me
Don't have this issue with default DX7 client & I don't remember this happening before, pls help
I did a complete reinstall of everything and it still didn't fix the problem
Also I do run it with orbiter_ng.exe, not orbiter.exe

Orbiter version: 28 Aug 2016 V.160828
D3d9 client version: R4.25 (r1446)
Pics below

#### jarmonik

##### Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Hey so I recently got back into orbiter after a 2 year break, downloaded it again, got d3d9 client and I get no sky textures on earth, the sky is just black even tho its day & the sun is right above me
Orbiter version: 28 Aug 2016 V.160828
D3d9 client version: R4.25 (r1446)
Do you have DirectX mods installed like "ENB Series" installed ? Very common source of problems.
Have you tried an older version of the client ?
Have you tried to re-install June 2010 DirectX runtimes ?

#### jarmonik

##### Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
D3D9Client is now integrated to Orbiter repository (d3d9client branch) and D3D9Client git repo is in a read-only mode for now. Likely to be closed later on.

#### space091

##### New member
Do you have DirectX mods installed like "ENB Series" installed ? Very common source of problems.
Have you tried an older version of the client ?
Have you tried to re-install June 2010 DirectX runtimes ?
Didn't have any mods installed so I tried an older version of d3d9 client (r1436) and reinstalled 2010 dx runtimes, no idea which one fixed it but everything seems to be working now, I have the lovely blue sky back finally, thanks

#### space091

##### New member
Do you have DirectX mods installed like "ENB Series" installed ? Very common source of problems.
Have you tried an older version of the client ?
Have you tried to re-install June 2010 DirectX runtimes ?
Also 1 more question, is there anyway to remove this triangular pattern on the glare near the sun and make it more circular? (Where the red arrows are pointed)

#### 80mileshigh

##### Addon Developer
Addon Developer
Donator
Following from Dave S' request to retire base.cfg in OpenOrbiter I have a potential feature request for the handling of night textures in the D3D9Client.

At present, listing a texture in config\base.cfg, and again against the relevant mesh in the surface base's config file, will display a night texture if texture.dds has a corresponding texture_n.dds.

This has been a way to create night lighting effects on bases without adding lights:

Would it be possible for the d3d9 client to handle the _n texture extension to activate textures at night? It would be great to eliminate the need for base.cfg editing instructions.

#### DaveS

##### Space Shuttle Ultra Project co-developer
Addon Developer
Donator
Beta Tester
Possible game-breaking bug with the shadows discovered: I always wondered why I lost 40 FPS in the SSU STS-114 pre-launch scenario but not in the Launch Test scenario. So today I decided to investigate the problem in great detail to finally pin down the offending issue. After going through everything that differed in the two scenarios, I finally found it: The time of day. The Launch Test scenario is set pre-dawn in March so no shadows being rendered while the STS-114 scenario is mid-morning in July so plenty of shadows to render.

So I decided to halt the countdown in the Launch Test scenario and time-accelerate until the sun rose and the shadows appeared and the same FPS reduction I had observed in the STS-114 launch scenario appeared right on cue. And I have been able to replicate this on command several times now. The game-breaking bug is not with the shadows themselves but rather that they don't seem to respond to the ShadowMapSize parameter in the D3D9Client.cfg file, so you can't tweak them to have such an impact on performance. I tried three different settings, 4096, 2048 and 1024, and all three had the exact same performance impact, no change what so ever, not even a few FPS. And I have checked that D3D9Client.cfg was unaltered following each run so it didn't load old settings.

Clean installation of Orbiter 2016, D3D9Client R4.25 and SSU, nothing else.

#### DaveS

##### Space Shuttle Ultra Project co-developer
Addon Developer
Donator
Beta Tester
Is there anyway to completely disable the metallic sheen that's applied to meshes that use the Metalness shader? I have attached two screenshots of the SSU orbiter, the first one is with the Metalness shader and the second is with the PBR shader. As you probably can tell, there's an unnatural metallic sheen to everything with the Metalness shader even with Metalness and Smoothness set to 0.000. I'd like to see a hybrid shader that incorporates the reflections of the Metalness shader for metallic objects, and the realistic lighting of the PBR shader. Maybe it could be accomplished by a check if Metalness is anything but 0.000?

#### Attachments

• Orbiter_Metalness.jpg
60.5 KB · Views: 21
• Orbiter_PBR.jpg
60.5 KB · Views: 21

#### jarmonik

##### Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Is there anyway to completely disable the metallic sheen that's applied to meshes that use the Metalness shader?
The sheen is caused a blue ambient (indirect) light coming from the Earth. The shuttle is likely over open ocean at the moment. I can't really tell how it's supposed to look like under those conditions.

#### DaveS

##### Space Shuttle Ultra Project co-developer
Addon Developer
Donator
Beta Tester
The sheen is caused a blue ambient (indirect) light coming from the Earth. The shuttle is likely over open ocean at the moment. I can't really tell how it's supposed to look like under those conditions.
I have attached two good photos from STS-132 that has the orbiter in similar ambient light conditions and similar attitude (heads-down, engines pointing in the direction of travel). Notice the soft Earthshine. Nothing harsh like used in the Metalness shader.

#### Attachments

• s132e005123.jpg
69.9 KB · Views: 19
• s132e012289.jpg
94.2 KB · Views: 19
• Orbiter_Metalness_2.jpg
73.9 KB · Views: 20
• Orbiter_PBR_2.jpg
76.8 KB · Views: 18

#### jarmonik

##### Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
I have attached two good photos from STS-132 that has the orbiter in similar ambient light conditions and similar attitude (heads-down, engines pointing in the direction of travel). Notice the soft Earthshine. Nothing harsh like used in the Metalness shader.
Cameras usually have a build in white point calibration so, a light bluish tint might not show. Also in the photos the Earth in brighter/whiter than in the screen shots so maybe that's the source of the problem. I made a test under a default conditions and I couldn't get stock Atlantis with metalness shader as blue as in your screen shot. I can tweak the indirect light towards white but forcing it to white would undermine the whole indirect light model.

#### 4throck

##### Enthusiast !
In those photos there's a lot of cloud cover, and (white) clouds reflect much more light than the (blue) ocean. Under these conditions earthshine might be close to white.
My guess is that the Orbiter understimates cloud cover reflection. Some tweaking towards white (just desaturate it a bit) might work well.

#### DaveS

##### Space Shuttle Ultra Project co-developer
Addon Developer
Donator
Beta Tester
Cameras usually have a build in white point calibration so, a light bluish tint might not show. Also in the photos the Earth in brighter/whiter than in the screen shots so maybe that's the source of the problem. I made a test under a default conditions and I couldn't get stock Atlantis with metalness shader as blue as in your screen shot. I can tweak the indirect light towards white but forcing it to white would undermine the whole indirect light model.
These are my graphics settings for D3D9Client:
Code:
GFXIntensity = 1
GFXDistance = 0.8
GFXThreshold = 1.09804
GFXGamma = 1
GFXSunIntensity = 2
GFXLocalMax = 0.0470588

And this is the Earth.atmo.cfg:
Code:
Red = 0.6517
Green = 0.55
Blue = 0.4816
RWaveDep = 2.048
MWaveDep = -0.96
ScaleHeight = 7.17241
DepthClamp = 0.99875
Exposure = 1.6025
TGamma = 1.0008
OutScatter = 0.6348
InScatter = 1.7585
RayleighPhase = -0.5085
MiePower = 0.5
MiePhase = 0.999
Aux1 = 0.2415
Aux2 = 0.440896
Aux3 = 0.94
AGamma = 0.3
HazeClr = 0.765
HazeIts = 1.8

It's not really the tint that's the problem but the sheen, that there's a metallic reflection where there should none. Ever looked close at an painted aluminium can? If so, then you know what I'm talking about here, that there's a matt finish/reflection in the paint. This is of course well and good for something made of an metallic alloy. The orbiter of course isn't clad in a metallic TPS but something that approaches soft goods. There's not supposed to be any reflections of the thermal blankets and RCC. The tiles when new are a bit reflective as the top coating is a Reaction Cured Glass (RCG) while the substrate is made of silica.

Maybe a better example is a silk or satin fabric, those approaches what the current D3D9Client Metalness shader applies which is wrong. Both the AFRSI (quilted blankets used mostly on the OMS pods and part of the orbiter fuselage sides) and the FRSI (smooth blankets used on low temperature areas in place of AFRSI) have smooth but matt finishes.

#### DaveS

##### Space Shuttle Ultra Project co-developer
Addon Developer
Donator
Beta Tester
This is a screenshot of the SRMS with the Metalness shader with Smoothness set to 0.000 and Metalness also set to 0.000. It's a bit hard to see but step back a bit and you can make out the the reflection of Earth in the blankets. This is is of course wrong, the SRMS MLI blankets are as matt and non-reflective as soft goods come!

Please tell me if I'm wrong here. Maybe I should stick to the PBR shader for the orbiter.

#### Attachments

• SRMS_metalness_reflection.jpg
78.8 KB · Views: 10
Last edited: