New Release D3D9Client Development

kuddel

Donator
Donator
Joined
Apr 1, 2008
Messages
1,634
Reaction score
154
Points
63
Tried your scenario and also: everything works as advertised...
(Image is with gammas "full up")
...so: :shrug:
 

Attachments

  • CurrentState.jpg
    CurrentState.jpg
    73.9 KB · Views: 54

DaveS

Space Shuttle Ultra Project co-developer
Addon Developer
Donator
Beta Tester
Joined
Feb 4, 2008
Messages
8,945
Reaction score
249
Points
153
By deleting the original Earth.atms.cfg file I managed to fix the ground darkness issue and I now have something that looks authentic. While on the subject, is there anyway by tweaking the shaders to soften the horizon edge? Right now, it's a bit too sharp and well defined.
 

kuddel

Donator
Donator
Joined
Apr 1, 2008
Messages
1,634
Reaction score
154
Points
63
By deleting the original Earth.atms.cfg file I managed to fix the ground darkness issue and I now have something that looks authentic.
Have you restricted write-access to that folder / file(s) ?
I would recommend to allow write-access to the complete Orbiter-folder!

While on the subject, is there anyway by tweaking the shaders to soften the horizon edge? Right now, it's a bit too sharp and well defined.
Short answer: Yes, probably.
Long answer: I believe that this can be done there (at the shaders), but I have no idea how :p "...any shader-tweakers out there that could help?"
 

DaveS

Space Shuttle Ultra Project co-developer
Addon Developer
Donator
Beta Tester
Joined
Feb 4, 2008
Messages
8,945
Reaction score
249
Points
153
Would it be possible to implement a shader reload function while the sim is running? That would make tweaking things a bit easier, being able to reload an edited shader during runtime.
 

DaveS

Space Shuttle Ultra Project co-developer
Addon Developer
Donator
Beta Tester
Joined
Feb 4, 2008
Messages
8,945
Reaction score
249
Points
153
After looking at things more closely, it seems like D3D9Client lacks a core Orbiter visual feature, which is atmospheric haze. I've attached the explanation of the atmospheric haze configuration parameters from OrbiterConfig.pdf as a screenshot.
 

Attachments

  • Orbiter_atm_haze.jpg
    Orbiter_atm_haze.jpg
    295.8 KB · Views: 24

DaveS

Space Shuttle Ultra Project co-developer
Addon Developer
Donator
Beta Tester
Joined
Feb 4, 2008
Messages
8,945
Reaction score
249
Points
153
Playing around with the atmospheric parameters in D39DClient as allowed me to find a rather obscure and hidden bug, and that is that the scale height on orbit can't be higher than the one set for the surface. This presents an issue as the atmosphere limb on orbit is really thin and right now the only way to control the limb thickness is through the scale height parameter.

---------- Post added 07-06-20 at 02:30 AM ---------- Previous post was 07-05-20 at 10:39 PM ----------

Here's what I have come up with so far:
Earth.atmo.cfg:
Code:
Red = 0.6064
Green = 0.5914
Blue = 0.568
RWaveDep = 8
MWaveDep = 0
ScaleHeight = 3.586205
DepthClamp = 1.25
Exposure = 1.3655
TGamma = 0.4404
OutScatter = 1.02317
InScatter = 0.761
RayleighPhase = -0.5085
MiePower = 0.194688
MiePhase = 0.924972
Aux1 = 0.1791
Aux2 = 1
Aux3 = 0
AGamma = 0.5736
HazeClr = 1.5
HazeIts = 1.5228

Earth.atms.cfg:
Code:
Red = 0.6517
Green = 0.5803
Blue = 0.4222
RWaveDep = 5.104
MWaveDep = -1.776
ScaleHeight = 3.586205
DepthClamp = 1.25
Exposure = 1.1045
TGamma = 1.0452
OutScatter = 1.96344
InScatter = 1.3505
RayleighPhase = 0.0045
MiePower = 0.3698
MiePhase = 0.929549
Aux1 = 0.2133
Aux2 = 0.790321
Aux3 = 0.39
AGamma = 0.7632
HazeClr = 1.5
HazeIts = 1.8
 

DaveS

Space Shuttle Ultra Project co-developer
Addon Developer
Donator
Beta Tester
Joined
Feb 4, 2008
Messages
8,945
Reaction score
249
Points
153
I think I have gotten to the very end here of what can be done with the current atmosphere rendering implementation. It's very close but we're missing that iconic "solar glow" of the horizon when the sun is well below it. Right now, we sort of have it in it is there once the sun and horizon meet, but it disappears shortly there after. I've tried to match things to a photo I just took of a clear sky (no clouds whatsoever) sunset and I just can't get the "solar glow" to show up. Could someone point me to the relevant code be it in a shader (.fx) or an actual C++ code segment?
 

DaveS

Space Shuttle Ultra Project co-developer
Addon Developer
Donator
Beta Tester
Joined
Feb 4, 2008
Messages
8,945
Reaction score
249
Points
153
Another atmosphere rendering issue, it doesn't follow the limb of the planet:
 

Attachments

  • D3D9Client_atmosphere_not_attached_to_limb.jpg
    D3D9Client_atmosphere_not_attached_to_limb.jpg
    89.1 KB · Views: 48

80mileshigh

Addon Developer
Addon Developer
Donator
Joined
Feb 18, 2008
Messages
345
Reaction score
180
Points
43
Location
Melbourne
Website
eightymileshigh.wordpress.com
I just want to take the opportunity to say thanks again for this work.

I've been away from development for the best part of a decade. Although I've kept half an eye on goings-on during that time I don't think I've really appreciated how much progress has been made.

I just got a model set up with normal and specular maps and it was a bit of an 'oh my' moment. So thanks :)
 

Felix24

Member
Joined
May 13, 2010
Messages
206
Reaction score
12
Points
18
Another atmosphere rendering issue, it doesn't follow the limb of the planet:

Maybe that's actually realistic? It looks to me like the earth's shadow is being cast away from the sun, up through the atmosphere, so to speak.
 

DaveS

Space Shuttle Ultra Project co-developer
Addon Developer
Donator
Beta Tester
Joined
Feb 4, 2008
Messages
8,945
Reaction score
249
Points
153
Maybe that's actually realistic? It looks to me like the earth's shadow is being cast away from the sun, up through the atmosphere, so to speak.
OK, so that's one explanation. Now we just need the "solar glow" when using the "surface" settings.

---------- Post added at 07:18 PM ---------- Previous post was at 06:30 PM ----------

Just to give you an idea, this is what I'm going for:
 

jarmonik

Addon Developer
Addon Developer
Beta Tester
Joined
Mar 28, 2008
Messages
2,191
Reaction score
191
Points
63
Website
users.kymp.net
There are new builds of the Client for 2016 and Beta.

- Partially spherical planets issue should be fixed.
- Felix24's normal mapped clouds implemented [experimental]

After running the client first time a line "NormalmappedClouds = 0" should appear in D3D9Client.cfg. If enabled, Normal map effect can be toggled during runtime by pressing (Left) [CTRL + SHIFT + N] the effect is only visible near the terminator. Note that: If the effect is left off-line during exit, "NormalmappedClouds" will be reset to "0" from D3D9Client.cfg

The code for the effect is in Surface.fx between lines 1034 - 1100
 

DaveS

Space Shuttle Ultra Project co-developer
Addon Developer
Donator
Beta Tester
Joined
Feb 4, 2008
Messages
8,945
Reaction score
249
Points
153
Looks pretty good, over land:
 

Attachments

  • D3D9Client_cloud_normals_disabled.jpg
    D3D9Client_cloud_normals_disabled.jpg
    195.7 KB · Views: 40
  • D3D9Client_cloud_normals_enabled.jpg
    D3D9Client_cloud_normals_enabled.jpg
    197 KB · Views: 39

DaveS

Space Shuttle Ultra Project co-developer
Addon Developer
Donator
Beta Tester
Joined
Feb 4, 2008
Messages
8,945
Reaction score
249
Points
153
It does look not quite right over water though:
 

Attachments

  • D3D9Client_cloud_normals_enabled_overwater.jpg
    D3D9Client_cloud_normals_enabled_overwater.jpg
    146.7 KB · Views: 39

DaveS

Space Shuttle Ultra Project co-developer
Addon Developer
Donator
Beta Tester
Joined
Feb 4, 2008
Messages
8,945
Reaction score
249
Points
153
Playing around with the atmosphere rendering settings a bit yielded much better looking clouds:
 

Attachments

  • D3D9Client_cloud_normals_enabled_overwater2.jpg
    D3D9Client_cloud_normals_enabled_overwater2.jpg
    138.4 KB · Views: 43

yitianetie

Member
Joined
Mar 24, 2020
Messages
32
Reaction score
7
Points
23
Location
Brittany
Hi,

I don't know how I can solve a minor bug while displaying elevation. I have performed a test with K2 summit and HD textures. We can see a sort of black borders/lines as if elevation tiles do not match exactly.

https://drive.google.com/file/d/1HMP2mL5bonhtWdlJ13CtOSvRNMpSmFnF/view?usp=sharing

I have tried the same scene with DXD7 and I don't notice those black borders, but Antialiasing was not enabled.

I have performed the test with DXD9 and antialiasing enabled, and we notice those black borders that can appear or disappear according zoom and point of view.

We can reduce those glitches by increasing the elevation resolution from 32 to 64 and increasing antialiasing, but they still appear.

Code:
Do you have an idea to fix this issue or to turn around ?

**** Orbiter.log
000000.000: Build Sep 14 2019 [v.190914]
000000.000: Timer precision: 1e-07 sec
000000.000: Found 0 joystick(s)
000000.000: Module AtlantisConfig.dll .... [Build 190914, API 190914]
000000.000: Module AtmConfig.dll ......... [Build 190914, API 190914]
000000.000: Module DGConfigurator.dll .... [Build 190914, API 190914]
000000.000: Module ProjectApolloConfigurator.dll  [Build 200112, API 160828]
000000.000: ---------------------------------------------------------------
000000.000: BaseDir    : D:\Orbiter\OrbiterBeta\
000000.000: ConfigDir  : D:\Orbiter\OrbiterBeta\Config\
000000.000: MeshDir    : D:\Orbiter\OrbiterBeta\Meshes\
000000.000: TextureDir : D:\Orbiter\OrbiterBeta\Textures\
000000.000: HightexDir : D:\Orbiter\OrbiterBeta\Textures2\
000000.000: ScenarioDir: D:\Orbiter\OrbiterBeta\Scenarios\
000000.000: ---------------------------------------------------------------
000000.000: D3D9 DLLs  : C:\WINDOWS\SYSTEM32\d3d9.dll [v 10.0.18362.387]
000000.000:            : C:\WINDOWS\SYSTEM32\d3dx9_43.dll [v 9.29.952.3111]
000000.000: ---------------------------------------------------------------
000000.000: Module D3D9Client.dll ........ [Build 200727, API 190914]
000000.000: Module ExtMFD.dll ............ [Build 190914, API 190914]
000000.000: Module Rcontrol.dll .......... [Build 190914, API 190914]
000000.000: Module ScnEditor.dll ......... [Build 190914, API 190914]
000000.000: Module transx.dll ............ [Build 190914, API 190914]
000000.000: Module CustomMFD.dll ......... [Build 190914, API 190914]
000000.000: Module ScriptMFD.dll ......... [Build 190914, API 190914]
000000.000: Module ApolloRTCCMFD.dll ..... [Build 200112, API 160828]
000000.000: Module ProjectApolloMFD.dll .. [Build 200112, API 160828]
000000.000: ============================ ERROR: ===========================
000000.000: Failed loading module Modules\Plugin\Multistage2015_MFD.dll (code 126)
000000.000: [Orbiter::LoadModule | ..\Orbiter.cpp | 606]
000000.000: ===============================================================
000000.000: Module OrbiterSound.dll ...... [Build 200517, API 160828]
000000.000: 
000000.000: **** Creating simulation session
000000.000: D3D9: [DirectX 9 Initialized]
000000.000: D3D9: 3D-Adapter.............. : NVIDIA GeForce GTX 950M
000000.000: D3D9: MaxTextureWidth......... : 16384
000000.000: D3D9: MaxTextureHeight........ : 16384
000000.000: D3D9: MaxTextureRepeat........ : 8192
000000.000: D3D9: VolTexAddressCaps....... : 0x3F
000000.000: D3D9: NumSimultaneousRTs...... : 4
000000.000: D3D9: VertexDeclCaps.......... : 0x30F
000000.000: D3D9: MiscCaps................ : 0x2FCEF2
000000.000: D3D9: XNA Math Support........ : Yes
000000.000: D3D9: Vertex Texture.......... : Yes
000000.000: D3D9: Separate AlphaBlend..... : Yes
000000.000: D3D9: Shadow Mapping.......... : Yes
000000.000: D3D9: D3DFMT_A16B16G16R16F.... : Yes
000000.000: D3D9: D3DFMT_A32B32G32R32F.... : Yes
000000.000: D3D9: D3DFMT_D32F_LOCKABLE.... : Yes
000000.000: D3D9: D3DFMT_A2R10G10B10...... : Yes
000000.000: D3D9: D3DFMT_L8............... : Yes
000000.000: D3D9: D3DDTCAPS_DEC3N......... : No
000000.000: D3D9: D3DDTCAPS_FLOAT16_2..... : Yes
000000.000: D3D9: D3DDTCAPS_FLOAT16_4..... : Yes
000000.000: D3D9: Runs under WINE......... : No
000000.000: D3D9: D3D9Build Date.......... : 200727
000000.000: D3D9: Available Texture Memory : 4088 MB
000000.000: D3D9: [3DDevice Initialized]
000000.000: D3D9: [Loading Constellations]
000000.000: D3D9: [D3D9Client Initialized]
000000.000: Module Sun.dll ............... [Build 190914, API 190914]
000000.000: VSOP87(E) Sun: Precision 1.0e-06, Terms 554/6634
000000.000: Module Mercury.dll ........... [Build 190914, API 190914]
000000.000: VSOP87(B) Mercury: Precision 1.0e-05, Terms 167/7123
000000.000: Module Venus.dll ............. [Build 190914, API 190914]
000000.000: Module VenusAtm2006.dll ...... [Build 190914, API 190914]
000000.000: VSOP87(B) Venus: Precision 1.0e-05, Terms 79/1710
000000.000: Module Earth.dll ............. [Build 190914, API 190914]
000000.000: Module EarthAtmJ71G.dll ...... [Build 190914, API 190914]
000000.000: VSOP87(B) Earth: Precision 1.0e-08, Terms 2564/2564
000000.000: Module Moon.dll .............. [Build 190914, API 190914]
000000.000: ELP82: Precision 1.0e-05, Terms 116/829
000000.000: Module Mars.dll .............. [Build 190914, API 190914]
000000.000: Module MarsAtm2006.dll ....... [Build 190914, API 190914]
000000.000: VSOP87(B) Mars: Precision 1.0e-05, Terms 405/6400
000000.000: Module Phobos.dll ............ [Build ******, API 060425]
000000.000: Module Deimos.dll ............ [Build ******, API 060425]
000000.000: Module Galsat.dll ............ [Build 190914, API 190914]
000000.000: Module Jupiter.dll ........... [Build 190914, API 190914]
000000.000: VSOP87(B) Jupiter: Precision 1.0e-06, Terms 1624/3625
000000.000: Module Io.dll ................ [Build 190914, API 190914]
000000.000: Module Europa.dll ............ [Build 190914, API 190914]
000000.000: Module Ganymede.dll .......... [Build 190914, API 190914]
000000.000: Module Callisto.dll .......... [Build 190914, API 190914]
000000.000: Module Satsat.dll ............ [Build 190914, API 190914]
000000.000: Module Saturn.dll ............ [Build 190914, API 190914]
000000.000: VSOP87(B) Saturn: Precision 1.0e-06, Terms 2904/6365
000000.000: Module Mimas.dll ............. [Build 190914, API 190914]
000000.000: SATSAT Mimas: Terms 113
000000.000: Module Enceladus.dll ......... [Build 190914, API 190914]
000000.000: SATSAT Enceladus: Terms 33
000000.000: Module Tethys.dll ............ [Build 190914, API 190914]
000000.000: SATSAT Tethys: Terms 101
000000.000: Module Dione.dll ............. [Build 190914, API 190914]
000000.000: SATSAT Dione: Terms 59
000000.000: Module Rhea.dll .............. [Build 190914, API 190914]
000000.000: SATSAT Rhea: Terms 68
000000.000: Module Titan.dll ............. [Build 190914, API 190914]
000000.000: SATSAT Titan: Terms 100
000000.000: Module Iapetus.dll ........... [Build 190914, API 190914]
000000.000: SATSAT Iapetus: Terms 605
000000.000: Module Uranus.dll ............ [Build 190914, API 190914]
000000.000: VSOP87(B) Uranus: Precision 1.0e-06, Terms 1827/5269
000000.000: Module Miranda.dll ........... [Build ******, API 060425]
000000.000: Module Ariel.dll ............. [Build ******, API 060425]
000000.000: Module Umbriel.dll ........... [Build ******, API 060425]
000000.000: Module Titania.dll ........... [Build ******, API 060425]
000000.000: Module Oberon.dll ............ [Build ******, API 060425]
000000.000: Module Neptune.dll ........... [Build 190914, API 190914]
000000.000: VSOP87(B) Neptune: Precision 1.0e-06, Terms 391/2024
000000.000: Finished initialising world
000000.000: Module ShuttlePB.dll ......... [Build 190914, API 190914]
000000.000: Module DeltaGlider.dll ....... [Build 190914, API 190914]
000000.000: Module LuaInline.dll ......... [Build 190914, API 190914]
000000.000: Module ShuttleA.dll .......... [Build 190914, API 190914]
000000.000: Finished initialising status
000000.000: Finished initialising camera
000000.000: Finished setting up render state
000000.000: D3D9: [Scene Initialized]
000000.000: Finished initialising panels
000009.725: D3D9: [Session Closed. Scene deleted.]
000009.725: D3D9: [Destroy Render Window Called]
000009.725: **** Closing simulation session

My question is : Do we need manually edit elevation tiles (hard work) or does exist a fix trough parameters (d3d9 client or nvidia driver...) ?

---------- Post added 08-04-20 at 12:40 PM ---------- Previous post was 08-03-20 at 09:56 PM ----------

I know that is a minor bug which already exists but I don't find any clear answer about.

And I think it would be fine to add a small chapter in D3D9 client documentation which suggest the best graphic settings according to our configuration, to reduce bugs, glitches and eventually CTD. Some people could think that set those setting to the max is the best, but in practice and according many previous replies, we know that some settings must be used with care.
 
Last edited:

DaveS

Space Shuttle Ultra Project co-developer
Addon Developer
Donator
Beta Tester
Joined
Feb 4, 2008
Messages
8,945
Reaction score
249
Points
153
Which settings did you change, and by how much?
Don't remember, but could have been either M-Power or R-Power. Any way this is what I got now:


Earth.atmo.cfg:
Code:
Red = 0.6397
Green = 0.5722
Blue = 0.5239
RWaveDep = 1.616
MWaveDep = 2.528
ScaleHeight = 6.5567
DepthClamp = 1.25
Exposure = 1.2305
TGamma = 0.4404
OutScatter = 0.487227
InScatter = 0.761
RayleighPhase = -0.5085
MiePower = 0.839808
MiePhase = 0.8
Aux1 = 0.3
Aux2 = 0.463761
Aux3 = 0
AGamma = 0.3888
HazeClr = 1.5
HazeIts = 1.6334


Earth.atms.cfg:
Code:
Red = 0.6406
Green = 0.5551
Blue = 0.4351
RWaveDep = 2.848
MWaveDep = 2.304
ScaleHeight = 6.5567
DepthClamp = 1.25
Exposure = 1.019
TGamma = 0.9924
OutScatter = 1.55952
InScatter = 2
RayleighPhase = -0.111
MiePower = 0.3698
MiePhase = 0.929549
Aux1 = 0.1743
Aux2 = 0.114921
Aux3 = 0
AGamma = 0.6624
HazeClr = 1.5
HazeIts = 1.4521
 

DaveS

Space Shuttle Ultra Project co-developer
Addon Developer
Donator
Beta Tester
Joined
Feb 4, 2008
Messages
8,945
Reaction score
249
Points
153
I think this might be a bug, vessel and surface objects (the pad elements in the attached screenshot) have different colors.
 

Attachments

  • D39DClient_sunrise_different_colors.jpg
    D39DClient_sunrise_different_colors.jpg
    89.9 KB · Views: 24

DaveS

Space Shuttle Ultra Project co-developer
Addon Developer
Donator
Beta Tester
Joined
Feb 4, 2008
Messages
8,945
Reaction score
249
Points
153
I traced the above reported issue down to the differing R0 values in D3D9Util::SurfaceLighting and D3D9Util::OrbitalLighting. Make them match fix the issue. But then another reveals itself, which is that the shading is different. Vessels are brighter while surface base objects are darker.

I have come up with new numbers for the R0 values: 0.5f, 0.75f, 1.0f
So both should have that.
 

Attachments

  • D39DClient_sunrise_different_shading.jpg
    D39DClient_sunrise_different_shading.jpg
    78.3 KB · Views: 15
Top