New Release D3D9Client Development

misha.physics

Well-known member
Joined
Dec 22, 2021
Messages
402
Reaction score
517
Points
108
Location
Lviv
Preferred Pronouns
he/him
I have no plans to add support for shadows for local lights. It would have heavy performance impact and there are some other problems with the implementation as well. There are more important things to do.
Thanks, of course. Maybe it just will be possible to return to this in the distant future. By the way, maybe it will be a good idea to limit the visibility range of the local light, and then shadows won't impact performance as much. Or some other ways. These local lights look nice (just the local light shining through objects is quite noticeable).
 

jarmonik

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 28, 2008
Messages
2,668
Reaction score
796
Points
128
Here's a development patch (only for developers) for a ray-traced VC textures. It's been a while since I last time build a binary patch so I hope I didn't forget anything. Orbiter can be downloaded from the GitHub page by clicking a small "tag" icon next to "branches" and then select "downloads". This patch is x86 build
 

DaveS

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Feb 4, 2008
Messages
9,435
Reaction score
689
Points
203
Here's a development patch (only for developers) for a ray-traced VC textures. It's been a while since I last time build a binary patch so I hope I didn't forget anything. Orbiter can be downloaded from the GitHub page by clicking a small "tag" icon next to "branches" and then select "downloads". This patch is x86 build
It seems like you forgot a file:
Code:
**** Orbiter.log
000000.000: Build Feb  4 2024 [v.602931718]
000000.007: Timer precision: 1e-07 sec
000000.146: Found 0 joystick(s)
000000.382: ---------------------------------------------------------------
000000.386: BaseDir    : E:\OpenOrbiter\
000000.391: ConfigDir  : E:\OpenOrbiter\Config\
000000.398: MeshDir    : E:\OpenOrbiter\Meshes\
000000.403: TextureDir : E:\OpenOrbiter\Textures\
000000.407: HightexDir : E:\OpenOrbiter\Textures2\
000000.412: ScenarioDir: E:\OpenOrbiter\Scenarios\
000000.417: ---------------------------------------------------------------
000000.422: D3D9 DLLs  : C:\WINDOWS\SYSTEM32\d3d9.dll [v 10.0.19041.3636]
000000.427:            : C:\WINDOWS\SYSTEM32\d3dx9_43.dll [v 9.29.952.3111]
000000.432: ---------------------------------------------------------------
000000.437: Module D3D9Client.dll ........ [Build 240204, API 240204]
000000.486: [D3D9] Native Interface
000000.491: [D3D9] DirectX9 Created...
000000.496: [D3D9] Initialize VideoTab...
000000.614: Loading module D3D9Client
000000.619: Module TerrainToolBox.dll .... [Build 231126, API 231126]
000000.625: Loading module TerrainToolBox
000000.632: Module TerrainToolKit.dll .... [Build 240204, API 240204]
000000.637: Loading module TerrainToolKit
000000.643: Module AtlantisConfig.dll .... [Build 240204, API 240204]
000000.648: Loading module AtlantisConfig (legacy interface)
000000.653: Module AtmConfig.dll ......... [Build 240204, API 240204]
000000.659: Loading module AtmConfig (legacy interface)
000000.664: Module DGConfigurator.dll .... [Build 240204, API 240204]
000000.669: Loading module DGConfigurator (legacy interface)
000006.364: 
000006.369: **** Creating simulation session
000006.379: [D3D9] === clbkCreateRenderWindow ===
000006.392: D3D9: [DirectX 9 Initialized]
000006.404: D3D9: 3D-Adapter.............. : NVIDIA GeForce RTX 2070 SUPER
000006.412: D3D9: MaxTextureWidth......... : 16384
000006.418: D3D9: MaxTextureHeight........ : 16384
000006.425: D3D9: MaxTextureRepeat........ : 8192
000006.433: D3D9: VolTexAddressCaps....... : 0x3F
000006.439: D3D9: NumSimultaneousRTs...... : 4
000006.445: D3D9: VertexDeclCaps.......... : 0x30F
000006.451: D3D9: MiscCaps................ : 0x2FCEF2
000006.456: D3D9: Separate AlphaBlend..... : Yes
000006.462: D3D9: Shadow Mapping.......... : Yes
000006.467: D3D9: D3DFMT_A16B16G16R16F.... : Yes
000006.473: D3D9: Vertex_A16B16G16R16F.... : Yes
000006.479: D3D9: Vertex_A32B32G32R32F.... : Yes
000006.484: D3D9: Vertex_R16F............. : Yes
000006.490: D3D9: Vertex_R32F............. : Yes
000006.496: D3D9: D3DFMT_A32B32G32R32F.... : Yes
000006.503: D3D9: D3DFMT_D32F_LOCKABLE.... : Yes
000006.509: D3D9: D3DFMT_A2R10G10B10...... : Yes
000006.515: D3D9: D3DFMT_L8............... : Yes
000006.520: D3D9: D3DDTCAPS_DEC3N......... : No
000006.526: D3D9: D3DDTCAPS_FLOAT16_2..... : Yes
000006.532: D3D9: D3DDTCAPS_FLOAT16_4..... : Yes
000006.537: D3D9: Runs under WINE......... : No
000006.544: D3D9: D3D9Build Date.......... : 0
000006.616: D3D9: Available Texture Memory : 4069 MB
000006.623: D3D9: [3DDevice Initialized]
000009.630: Loaded 41057 records from star database
000009.794: ============================ ERROR: ===========================
000009.800: Mesh not found: .\Meshes\D3D9Cube.msh
000009.806: [MeshManager::LoadMesh | C:\Software\OrbiterRepositories\VCRaytrace\Src\Orbiter\Mesh.cpp | 1328]
000009.812: ===============================================================
000009.817: D3D9ERROR: D3D9Client::clbkStoreMeshPersistent(D3D9Cube) hMesh is NULL
000009.823: Failed to open D3D9Cube.msh
 

DaveS

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Feb 4, 2008
Messages
9,435
Reaction score
689
Points
203
Oh and another thing, please exclude any root level .cfg files. I was going mad trying figure out why my planet textures weren't loading anymore and I have now found out it was because you included your Orbiter_NG.cfg file in the BakedVC_Testing.zip file which overwrote my Orbiter_NG.cfg file which in turn caused the PlanetTex file path to be incorrect.
 

jarmonik

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 28, 2008
Messages
2,668
Reaction score
796
Points
128
Ok, thanks for the information. I have added the missing file and the *.cfg are no longer overwritten in root folder.
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,727
Reaction score
2,692
Points
203
Location
Dallas, TX
IS there anyway to fix the areas around the poles on the Moon? I don't know if we could flatten them and add a mesh of craters,.....
 

N_Molson

Addon Developer
Addon Developer
Donator
Joined
Mar 5, 2010
Messages
9,290
Reaction score
3,258
Points
203
Location
Toulouse
IS there anyway to fix the areas around the poles on the Moon? I don't know if we could flatten them and add a mesh of craters,.....

AFAIK it isn't easy. More a geometry issue with the "UV sphere", the shape from which the planets/moons are rendered. As you can see the "squares" are the largest near the equator and the smallest near the poles. Also, the shape near the equator is quite close from a rectangle, but it is less an less true as you look North/South. It means that the resolution and "precision" of the textures near the poles are well... crappy. Elevation data is read by the graphic engine as a white/black texture (heightmap) applied to the same sphere.

Note that you have the exact same problem in KSP, it isn't specific to Orbiter.


vXnbG.png
 

Donamy

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Oct 16, 2007
Messages
6,917
Reaction score
211
Points
138
Location
Cape
Could you texture the poles separately from above and meld them ?
 

n72.75

Move slow and try not to break too much.
Orbiter Contributor
Addon Developer
Tutorial Publisher
Donator
Joined
Mar 21, 2008
Messages
2,696
Reaction score
1,354
Points
128
Location
Saco, ME
Website
mwhume.space
Preferred Pronouns
he/him
With UV spheres you run out of precision near the poles.

1707277443182.png

There is another way to map topologies:

1707277249114.png

Which is how space engine can do this on Jupiter's south pole
1707278160900.png

This wouldn't technically be impossible to implant, but it's probably very near the top of "Difficult Problems to Solve" list....
 

DaveS

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Feb 4, 2008
Messages
9,435
Reaction score
689
Points
203
Trying to use Terrain Toolkit in this D3D9 package, causes a CTD. This is my D3D9 Advanced Settings:
 

Attachments

  • OO_D3D9_config.jpg
    OO_D3D9_config.jpg
    54.2 KB · Views: 5

misha.physics

Well-known member
Joined
Dec 22, 2021
Messages
402
Reaction score
517
Points
108
Location
Lviv
Preferred Pronouns
he/him
It seems like you're trying to use this tool with OpenOrbiter build, but it has its own integrated TerrainToolKit.
 

misha.physics

Well-known member
Joined
Dec 22, 2021
Messages
402
Reaction score
517
Points
108
Location
Lviv
Preferred Pronouns
he/him
Just activate it on Module tab. Then press Ctrl+F4 during simulation, and select the tool.
 

DaveS

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Feb 4, 2008
Messages
9,435
Reaction score
689
Points
203
Just activate it on Module tab. Then press Ctrl+F4 during simulation, and select the tool.
Tried that and it still CTDs. This is with a clean install of OO.
 

misha.physics

Well-known member
Joined
Dec 22, 2021
Messages
402
Reaction score
517
Points
108
Location
Lviv
Preferred Pronouns
he/him
That's something interesting with your Orbiter version. Your screenshot says it's v240204. I've just downloaded the latest Orbiter build x86 (zip-file), and it's v240201. Maybe you use some other version (or x64 build), honestly I don't know.
 

DaveS

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Feb 4, 2008
Messages
9,435
Reaction score
689
Points
203
That's something interesting with your Orbiter version. Your screenshot says it's v240204. I've just downloaded the latest Orbiter build x32, and it's v240201. Maybe you use some other version (or x64 build), honestly I don't know.
The screenshot was with the Baked_VC dev package jarmonik posted earlier. Now, it is build 240201, the x86 version.
 

misha.physics

Well-known member
Joined
Dec 22, 2021
Messages
402
Reaction score
517
Points
108
Location
Lviv
Preferred Pronouns
he/him
Oh, then I'm sorry, I haven't tried that version. (I may only suppose your Orbiter.log will be useful for someone to help you.)
 

DaveS

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Feb 4, 2008
Messages
9,435
Reaction score
689
Points
203
Orbiter log after the CTD:
Code:
**** Orbiter.log
000000.000: Build Feb  1 2024 [v.602931718]
000000.009: Timer precision: 1e-07 sec
000000.150: Found 0 joystick(s)
000000.402: ---------------------------------------------------------------
000000.408: BaseDir    : E:\OpenOrbiter\
000000.413: ConfigDir  : E:\OpenOrbiter\Config\
000000.418: MeshDir    : E:\OpenOrbiter\Meshes\
000000.423: TextureDir : E:\OpenOrbiter\Textures\
000000.429: HightexDir : E:\OpenOrbiter\Textures2\
000000.435: ScenarioDir: E:\OpenOrbiter\Scenarios\
000000.439: ---------------------------------------------------------------
000000.446: D3D9 DLLs  : C:\WINDOWS\SYSTEM32\d3dx9_43.dll [v 9.29.952.3111]
000000.452:            : C:\WINDOWS\SYSTEM32\d3d9.dll [v 10.0.19041.3636]
000000.458: ---------------------------------------------------------------
000000.462: Module D3D9Client.dll ........ [Build 240201, API 240201]
000000.513: [D3D9] Native Interface
000000.518: [D3D9] DirectX9 Created...
000000.524: [D3D9] Initialize VideoTab...
000000.636: Loading module D3D9Client
000000.643: Module TerrainToolKit.dll .... [Build 240201, API 240201]
000000.650: Loading module TerrainToolKit
000000.656: Module AtlantisConfig.dll .... [Build 240201, API 240201]
000000.664: Loading module AtlantisConfig (legacy interface)
000000.671: Module AtmConfig.dll ......... [Build 240201, API 240201]
000000.678: Loading module AtmConfig (legacy interface)
000000.685: Module DGConfigurator.dll .... [Build 240201, API 240201]
000000.691: Loading module DGConfigurator (legacy interface)
000007.145: 
000007.151: **** Creating simulation session
000007.164: D3D9: [DirectX 9 Initialized]
000007.175: D3D9: 3D-Adapter.............. : NVIDIA GeForce RTX 2070 SUPER
000007.188: D3D9: MaxTextureWidth......... : 16384
000007.198: D3D9: MaxTextureHeight........ : 16384
000007.206: D3D9: MaxTextureRepeat........ : 8192
000007.213: D3D9: VolTexAddressCaps....... : 0x3F
000007.222: D3D9: NumSimultaneousRTs...... : 4
000007.228: D3D9: VertexDeclCaps.......... : 0x30F
000007.233: D3D9: MiscCaps................ : 0x2FCEF2
000007.240: D3D9: Separate AlphaBlend..... : Yes
000007.245: D3D9: Shadow Mapping.......... : Yes
000007.252: D3D9: D3DFMT_A16B16G16R16F.... : Yes
000007.258: D3D9: Vertex_A16B16G16R16F.... : Yes
000007.263: D3D9: Vertex_A32B32G32R32F.... : Yes
000007.270: D3D9: Vertex_R16F............. : Yes
000007.275: D3D9: Vertex_R32F............. : Yes
000007.281: D3D9: D3DFMT_A32B32G32R32F.... : Yes
000007.286: D3D9: D3DFMT_D32F_LOCKABLE.... : Yes
000007.292: D3D9: D3DFMT_A2R10G10B10...... : Yes
000007.298: D3D9: D3DFMT_L8............... : Yes
000007.303: D3D9: D3DDTCAPS_DEC3N......... : No
000007.310: D3D9: D3DDTCAPS_FLOAT16_2..... : Yes
000007.318: D3D9: D3DDTCAPS_FLOAT16_4..... : Yes
000007.324: D3D9: Runs under WINE......... : No
000007.330: D3D9: D3D9Build Date.......... : 0
000007.407: D3D9: Available Texture Memory : 4069 MB
000007.414: D3D9: [3DDevice Initialized]
000010.191: Loaded 41057 records from star database
000010.756: D3D9: [D3D9Client Initialized]
000010.852: Module Sun.dll ............... [Build 240201, API 240201]
000010.873: VSOP87(E) Sun: Precision 1.0e-06, Terms 554/6634
000010.879: Module Mercury.dll ........... [Build 240201, API 240201]
000010.888: GRAVITY MODEL: GravityModels\jgmess_160a_sha.tab LOADED, Terms 65/13040
000010.913: VSOP87(B) Mercury: Precision 1.0e-05, Terms 167/7123
000010.921: Module Venus.dll ............. [Build 240201, API 240201]
000010.928: GRAVITY MODEL: GravityModels\mod_shgj120p.a01 LOADED, Terms 65/7380
000010.934: Module VenusAtm2006.dll ...... [Build 240201, API 240201]
000010.941: Loading module VenusAtm2006 (legacy interface)
000010.947: VSOP87(B) Venus: Precision 1.0e-05, Terms 79/1710
000010.969: Module Earth.dll ............. [Build 240201, API 240201]
000011.010: GRAVITY MODEL: GravityModels\egm96_to360.tab LOADED, Terms 65/65340
000011.018: Module EarthAtmJ71G.dll ...... [Build 240201, API 240201]
000011.024: Loading module EarthAtmJ71G (legacy interface)
000011.035: VSOP87(B) Earth: Precision 1.0e-08, Terms 2564/2564
000011.614: Module Moon.dll .............. [Build 240201, API 240201]
000011.625: GRAVITY MODEL: GravityModels\jgl165p1.sha LOADED, Terms 65/13860
000011.634: ELP82: Precision 1.0e-05, Terms 116/829
000011.693: Module Mars.dll .............. [Build 240201, API 240201]
000011.700: GRAVITY MODEL: GravityModels\jgmro_120f_sha.tab LOADED, Terms 65/7380
000011.706: Module MarsAtm2006.dll ....... [Build 240201, API 240201]
000011.712: Loading module MarsAtm2006 (legacy interface)
000011.735: VSOP87(B) Mars: Precision 1.0e-05, Terms 405/6400
000011.745: Module Phobos.dll ............ [Build ******, API 060425]
000011.752: Module Deimos.dll ............ [Build ******, API 060425]
000011.763: GRAVITY MODEL: GravityModels\JGDWN_VES20H_SHA.TAB LOADED, Terms 65/230
000011.778: Module Galsat.dll ............ [Build 240201, API 240201]
000011.784: Module Jupiter.dll ........... [Build 240201, API 240201]
000011.798: VSOP87(B) Jupiter: Precision 1.0e-06, Terms 1624/3625
000011.804: Module Io.dll ................ [Build 240201, API 240201]
000011.812: Module Europa.dll ............ [Build 240201, API 240201]
000011.820: Module Ganymede.dll .......... [Build 240201, API 240201]
000011.826: Module Callisto.dll .......... [Build 240201, API 240201]
000011.840: Module Satsat.dll ............ [Build 240201, API 240201]
000011.846: Module Saturn.dll ............ [Build 240201, API 240201]
000011.867: VSOP87(B) Saturn: Precision 1.0e-06, Terms 2904/6365
000011.874: Module Mimas.dll ............. [Build 240201, API 240201]
000011.880: SATSAT Mimas: Terms 113
000011.887: Module Enceladus.dll ......... [Build 240201, API 240201]
000011.893: SATSAT Enceladus: Terms 33
000011.900: Module Tethys.dll ............ [Build 240201, API 240201]
000011.906: SATSAT Tethys: Terms 101
000011.912: Module Dione.dll ............. [Build 240201, API 240201]
000011.919: SATSAT Dione: Terms 59
000011.925: Module Rhea.dll .............. [Build 240201, API 240201]
000011.934: SATSAT Rhea: Terms 68
000011.941: Module Titan.dll ............. [Build 240201, API 240201]
000011.947: SATSAT Titan: Terms 100
000011.957: Module Iapetus.dll ........... [Build 240201, API 240201]
000011.962: SATSAT Iapetus: Terms 605
000011.971: Module Uranus.dll ............ [Build 240201, API 240201]
000011.989: VSOP87(B) Uranus: Precision 1.0e-06, Terms 1827/5269
000011.997: Module Miranda.dll ........... [Build ******, API 060425]
000012.005: Module Ariel.dll ............. [Build ******, API 060425]
000012.012: Module Umbriel.dll ........... [Build ******, API 060425]
000012.018: Module Titania.dll ........... [Build ******, API 060425]
000012.024: Module Oberon.dll ............ [Build ******, API 060425]
000012.034: Module Neptune.dll ........... [Build 240201, API 240201]
000012.041: VSOP87(B) Neptune: Precision 1.0e-06, Terms 391/2024
000012.056: Finished initialising world
000012.246: Module DeltaGlider.dll ....... [Build 240201, API 240201]
000012.257: Module LuaInline.dll ......... [Build 240201, API 240201]
000012.262: Loading module LuaInline
000012.843: Module ShuttleA.dll .......... [Build 240201, API 240201]
000013.133: Module ShuttlePB.dll ......... [Build 240201, API 240201]
000013.250: Finished initialising status
000013.255: Finished initialising camera
000013.313: Finished setting up render state
000013.320: --------------------------- WARNING: --------------------------
000013.328: Couldn't create decoder for image file: .\Textures\\Icons28.png (does it exist?)
000013.335: [oapi::GraphicsClient::ReadImageFromFile | D:\a\orbiter\orbiter\Src\Orbiter\GraphicsAPI.cpp | 466]
000013.342: ---------------------------------------------------------------
000013.347: --------------------------- WARNING: --------------------------
000013.352: Couldn't create decoder for image file: .\Textures\\SubTitle36.png (does it exist?)
000013.360: [oapi::GraphicsClient::ReadImageFromFile | D:\a\orbiter\orbiter\Src\Orbiter\GraphicsAPI.cpp | 466]
000013.365: ---------------------------------------------------------------
000013.373: --------------------------- WARNING: --------------------------
000013.379: Couldn't create decoder for image file: .\Textures\\SubTitle28.png (does it exist?)
000013.388: [oapi::GraphicsClient::ReadImageFromFile | D:\a\orbiter\orbiter\Src\Orbiter\GraphicsAPI.cpp | 466]
000013.394: ---------------------------------------------------------------
000013.424: D3D9: [Scene Initialized]
000013.561: Finished initialising panels
000014.508: D3D9: NewShader [DG\deltaglider_ns]=4
 

DaveS

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Feb 4, 2008
Messages
9,435
Reaction score
689
Points
203
Do you need the actual *.elv files for the Terrain Toolkit to function or while the *.tree files suffice?
 

jarmonik

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 28, 2008
Messages
2,668
Reaction score
796
Points
128
It likely crashes due to missing *.png files (will fix it). You can find them from O2016.
The *.tree files are sufficient.
 
Top