New Release D3D9Client Development

palebluedot

New member
Joined
Jan 1, 2016
Messages
4
Reaction score
0
Points
0
Is the source code for the D3D9Client available? Codeplex seems to have shut down.
 

goosemav

New member
Joined
Dec 28, 2011
Messages
3
Reaction score
0
Points
0
Thank you! After downloading the new runtimes, it works swimmingly!

New computer:
MSI GF75 Thin 9SC
Intel I7-9750H @2.6Ghz
NVIDIA GeForce GTX 1650
16GB RAM

New install of Orbiter 2016
New install of D3D9Client
Activated D3D9Client module in Orbiter_ng.exe setup
Noticed when selecting 3D device on Video setup in Orbiter that the NVIDIA GeForce GTX 1650 is not listed for selection - only Intel UHD Graphics 630.

Error: Direct Runtimes may be missing... then CTD

**** Orbiter.log
000000.000: Build Aug 28 2016 [v.160828]
000000.000: Timer precision: 1e-007 sec
000000.000: Found 0 joystick(s)
000000.000: Module AtlantisConfig.dll .... [Build 160828, API 160828]
000000.000: Module AtmConfig.dll ......... [Build 160828, API 160828]
000000.000: Module DGConfigurator.dll .... [Build 160828, API 160828]
000000.000: Module ScnEditor.dll ......... [Build 160828, API 160828]
000000.000: ---------------------------------------------------------------
BaseDir : C:\Orbiter2016\
ConfigDir : C:\Orbiter2016\Config\
MeshDir : C:\Orbiter2016\Meshes\
TextureDir : C:\Orbiter2016\Textures\
HightexDir : C:\Orbiter2016\Textures2\
ScenarioDir: C:\Orbiter2016\Scenarios\
000000.000: ---------------------------------------------------------------
D3D9 DLLs : C:\Windows\SYSTEM32\d3dx9_43.dll [v 9.29.952.3111]
: C:\Windows\SYSTEM32\d3d9.dll [v 10.0.17763.1]
000000.000: ---------------------------------------------------------------
000000.000: Module D3D9Client.dll ........ [Build 190906, API 160828]
000000.000:
000000.000: **** Creating simulation session
000000.000: D3D9: [DirectX 9 Initialized]
D3D9: 3D-Adapter.............. : Intel(R) UHD Graphics 630
D3D9: MaxTextureWidth......... : 8192
D3D9: MaxTextureHeight........ : 8192
D3D9: MaxTextureRepeat........ : 8192
D3D9: VolTexAddressCaps....... : 0x3F
D3D9: NumSimultaneousRTs...... : 4
D3D9: VertexDeclCaps.......... : 0x37F
D3D9: MiscCaps................ : 0x2FCCF2
D3D9: XNA Math Support........ : Yes
D3D9: Vertex Texture.......... : Yes
D3D9: Shadow Mapping.......... : Yes
D3D9: D3DFMT_A16B16G16R16F.... : Yes
D3D9: D3DFMT_A32B32G32R32F.... : Yes
D3D9: D3DFMT_D32F_LOCKABLE.... : No
D3D9: D3DFMT_A2R10G10B10...... : Yes
D3D9: D3DFMT_L8............... : Yes
D3D9: D3DDTCAPS_DEC3N......... : No
D3D9: D3DDTCAPS_FLOAT16_2..... : Yes
D3D9: D3DDTCAPS_FLOAT16_4..... : Yes
D3D9: Runs under WINE......... : No
D3D9: Available Texture Memory : 4080 MB
000000.000: D3D9: [3DDevice Initialized]
D3D9: ERROR: D3D9Surface.cpp Line:2045 Error:-2147024770 D3DXCreateEffectFromFileA(pDev, name, 0, 0, 0, 0, &FX, &errors)
D3D9: ERROR: Failed to create an Effect (Modules/D3D9Client/CKBlit.fx)
D3D9: ERROR: D3D9Pad.cpp Line:87 Error:-2147024770 D3DXCreateEffectFromFileA(pDev, name, 0, 0, 0, 0, &FX, &errors)
D3D9: ERROR: Failed to create an Effect (Modules/D3D9Client/Sketchpad.fx)
D3D9: ERROR: D3D9Effect.cpp Line:341 Error:-2147024770 D3DXCreateEffectFromFileA(pDev, name, macro, 0, D3DXSHADER_NO_PRESHADER|D3DXSHADER_PREFER_FLOW_CONTROL, 0, &FX, &errors)
D3D9: ERROR: Failed to create an Effect (Modules/D3D9Client/D3D9Client.fx)
D3D9: ERROR: PlanetRenderer.cpp Line:193 Error:-2147024770 D3DXCreateEffectFromFileA(pDev, name, macro, 0, 0, 0, &pShader, &errors)
D3D9: ERROR: Failed to create an Effect (Modules\D3D9Client\Surface.fx)
D3D9: ERROR: Scene.cpp Line:3011 Error:-2147024770 D3DXCreateEffectFromFile(pDev, name, 0, 0, 0, 0, &FX, &errors)
D3D9: ERROR: Failed to create an Effect (Modules/D3D9Client/SceneTech.fx)

Downloaded the D3D9Client June 10 runtime from https://www.microsoft.com/en-us/download/details.aspx?id=8109

Error during DirectX Setup: An internal system error occurred. Please refer to DXError.log and DirectX.log in your Windows folder to determine problem.

DirectX.log:

11/23/19 03:42:54: infinst: Installing C:\Users\chris\AppData\Local\Temp\DX18CD.tmp\d3dx9_24_x64.inf [DefaultInstall]
11/23/19 03:42:54: infinst: Target file: 'C:\Windows\system32\d3dx9_24.dll'
Target file is Version 9.5.132.0
Source file is Version 9.5.132.0
11/23/19 03:42:54: infinst: C:\Windows\system32\d3dx9_24.dll have been installed already.
11/23/19 03:42:54: infinst: Installing C:\Users\chris\AppData\Local\Temp\DX18CD.tmp\d3dx9_25_x64.inf [DefaultInstall]
11/23/19 03:42:54: infinst: Target file: 'C:\Windows\system32\d3dx9_25.dll'
Target file is Version 9.6.168.0
Source file is Version 9.6.168.0
11/23/19 03:42:54: infinst: C:\Windows\system32\d3dx9_25.dll have been installed already.
11/23/19 03:42:55: infinst: Installing C:\Users\chris\AppData\Local\Temp\DX18CD.tmp\d3dx9_26_x64.inf [DefaultInstall]
11/23/19 03:42:55: infinst: Target file: 'C:\Windows\system32\d3dx9_26.dll'
Target file is Version 9.7.239.0
Source file is Version 9.7.239.0
11/23/19 03:42:55: infinst: C:\Windows\system32\d3dx9_26.dll have been installed already.
11/23/19 03:42:55: infinst: Installing C:\Users\chris\AppData\Local\Temp\DX18CD.tmp\d3dx9_27_x64.inf [DefaultInstall]
11/23/19 03:42:55: infinst: Target file: 'C:\Windows\system32\d3dx9_27.dll'
Target file is Version 9.8.299.0
Source file is Version 9.8.299.0
11/23/19 03:42:55: infinst: C:\Windows\system32\d3dx9_27.dll have been installed already.
11/23/19 03:42:56: infinst: Installing C:\Users\chris\AppData\Local\Temp\DX18CD.tmp\d3dx9_28_x64.inf [DefaultInstall]
11/23/19 03:42:56: infinst: Target file: 'C:\Windows\system32\d3dx9_28.dll'
Target file is Version 9.10.455.0
Source file is Version 9.10.455.0
11/23/19 03:42:56: infinst: C:\Windows\system32\d3dx9_28.dll have been installed already.
11/23/19 03:42:56: infinst: Installing C:\Users\chris\AppData\Local\Temp\DX18CD.tmp\d3dx9_29_x64.inf [DefaultInstall]
11/23/19 03:42:56: infinst: Target file: 'C:\Windows\system32\d3dx9_29.dll'
Target file is Version 9.11.519.0
Source file is Version 9.11.519.0
11/23/19 03:42:56: infinst: C:\Windows\system32\d3dx9_29.dll have been installed already.
11/23/19 03:42:56: infinst: Installing C:\Users\chris\AppData\Local\Temp\DX18CD.tmp\XACT_x64.inf [DefaultInstall]
11/23/19 03:42:56: infinst: Target file: 'C:\Windows\system32\xactengine2_0.dll'
Target file is Version 9.11.519.0
Source file is Version 9.11.519.0
11/23/19 03:42:56: infinst: C:\Windows\system32\xactengine2_0.dll have been installed already.
11/23/19 03:42:56: infinst: Target file: 'C:\Windows\system32\x3daudio1_0.dll'
Target file is Version 9.11.519.0
Source file is Version 9.11.519.0
11/23/19 03:42:56: infinst: C:\Windows\system32\x3daudio1_0.dll have been installed already.
11/23/19 03:42:57: infinst: Installing C:\Users\chris\AppData\Local\Temp\DX18CD.tmp\d3dx9_30_x64.inf [DefaultInstall]
11/23/19 03:42:57: infinst: Target file: 'C:\Windows\system32\d3dx9_30.dll'
Target file is Version 9.12.589.0
Source file is Version 9.12.589.0
11/23/19 03:42:57: infinst: C:\Windows\system32\d3dx9_30.dll have been installed already.


Next check D3D9ClientLog

D3D9Client Log:

(0: 0.0s 00.01ms)(0x2078) [Not Compiled With nVidia API]
(1: 0.0s 02.87ms)(0x2078) ================ clbkInitialise ===============
(2: 0.0s 00.04ms)(0x2078) Orbiter Version = 160828
(3: 0.0s 10.25ms)(0x2078) Index:0 320 x 200 48Hz (22)
(4: 0.0s 00.72ms)(0x2078) Index:1 320 x 200 120Hz (22)
(5: 0.0s 01.22ms)(0x2078) Index:2 320 x 240 48Hz (22)
(6: 0.0s 01.01ms)(0x2078) Index:3 320 x 240 120Hz (22)
(7: 0.0s 00.64ms)(0x2078) Index:4 400 x 300 48Hz (22)
(8: 0.0s 00.44ms)(0x2078) Index:5 400 x 300 120Hz (22)
(9: 0.0s 00.69ms)(0x2078) Index:6 512 x 384 48Hz (22)
(10: 0.0s 00.44ms)(0x2078) Index:7 512 x 384 120Hz (22)
(11: 0.0s 00.44ms)(0x2078) Index:8 640 x 400 48Hz (22)
(12: 0.0s 00.44ms)(0x2078) Index:9 640 x 400 120Hz (22)
(13: 0.0s 00.44ms)(0x2078) Index:10 640 x 480 48Hz (22)
(14: 0.0s 00.44ms)(0x2078) Index:11 640 x 480 120Hz (22)
(15: 0.0s 00.44ms)(0x2078) Index:12 800 x 600 48Hz (22)
(16: 0.0s 00.44ms)(0x2078) Index:13 800 x 600 120Hz (22)
(17: 0.0s 00.44ms)(0x2078) Index:14 1024 x 768 48Hz (22)
(18: 0.0s 00.43ms)(0x2078) Index:15 1024 x 768 120Hz (22)
(19: 0.0s 00.44ms)(0x2078) Index:16 1152 x 864 48Hz (22)
(20: 0.0s 00.44ms)(0x2078) Index:17 1152 x 864 120Hz (22)
(21: 0.0s 00.43ms)(0x2078) Index:18 1280 x 600 48Hz (22)
(22: 0.0s 00.96ms)(0x2078) Index:19 1280 x 600 120Hz (22)
(23: 0.0s 00.49ms)(0x2078) Index:20 1280 x 720 48Hz (22)
(24: 0.0s 00.45ms)(0x2078) Index:21 1280 x 720 120Hz (22)
(25: 0.0s 00.44ms)(0x2078) Index:22 1280 x 768 48Hz (22)
(26: 0.0s 00.46ms)(0x2078) Index:23 1280 x 768 120Hz (22)
(27: 0.0s 00.44ms)(0x2078) Index:24 1280 x 800 48Hz (22)
(28: 0.0s 00.47ms)(0x2078) Index:25 1280 x 800 120Hz (22)
(29: 0.0s 00.44ms)(0x2078) Index:26 1280 x 960 48Hz (22)
(30: 0.0s 00.44ms)(0x2078) Index:27 1280 x 960 120Hz (22)
(31: 0.0s 00.59ms)(0x2078) Index:28 1280 x 1024 48Hz (22)
(32: 0.0s 00.44ms)(0x2078) Index:29 1280 x 1024 120Hz (22)
(33: 0.0s 00.63ms)(0x2078) Index:30 1360 x 768 48Hz (22)
(34: 0.0s 00.65ms)(0x2078) Index:31 1360 x 768 120Hz (22)
(35: 0.0s 00.11ms)(0x2078) Index:32 1366 x 768 48Hz (22)
(36: 0.0s 00.22ms)(0x2078) Index:33 1366 x 768 120Hz (22)
(37: 0.0s 00.13ms)(0x2078) Index:34 1400 x 1050 48Hz (22)
(38: 0.0s 00.11ms)(0x2078) Index:35 1400 x 1050 120Hz (22)
(39: 0.0s 00.11ms)(0x2078) Index:36 1440 x 900 48Hz (22)
(40: 0.0s 00.11ms)(0x2078) Index:37 1440 x 900 120Hz (22)
(41: 0.0s 00.11ms)(0x2078) Index:38 1600 x 900 48Hz (22)
(42: 0.0s 00.11ms)(0x2078) Index:39 1600 x 900 120Hz (22)
(43: 0.0s 00.10ms)(0x2078) Index:40 1680 x 1050 48Hz (22)
(44: 0.0s 00.11ms)(0x2078) Index:41 1680 x 1050 120Hz (22)
(45: 0.0s 00.11ms)(0x2078) Index:42 1920 x 1080 48Hz (22)
(46: 0.0s 00.11ms)(0x2078) Index:43 1920 x 1080 120Hz (22)
(47: 27.8s 27766.21ms)(0x2078) Scenario = .\Scenarios\(Current state).scn
(48: 27.8s 11.55ms)(0x2078) ================ clbkCreateRenderWindow ===============
(49: 27.8s 05.18ms)(0x2078) Window Handle = 0x1C080A
(50: 27.8s 05.50ms)(0x2078) [VideoConfiguration] Adapter=0, ModeIndex=43
(51: 27.8s 00.17ms)(0x2078) 3D-Adapter.............. : Intel(R) UHD Graphics 630
(52: 27.8s 01.02ms)(0x2078) dwFSMode................ : 1
(53: 27.8s 02.33ms)(0x2078) MaxTextureBlendStages... : 8
(54: 27.8s 00.03ms)(0x2078) MaxTextureWidth......... : 8192
(55: 27.8s 05.14ms)(0x2078) MaxTextureHeight........ : 8192
(56: 27.8s 01.35ms)(0x2078) MaxTextureRepeat........ : 8192
(57: 27.8s 01.09ms)(0x2078) VolTexAddressCaps....... : 0x3F
(58: 27.8s 04.92ms)(0x2078) MaxVolumeExtent......... : 2048
(59: 27.8s 00.02ms)(0x2078) MaxPrimitiveCount....... : 8388607
(60: 27.8s 00.01ms)(0x2078) MaxVertexIndex.......... : 16777215
(61: 27.8s 00.01ms)(0x2078) MaxAnisotropy........... : 16
(62: 27.8s 00.01ms)(0x2078) MaxSimultaneousTextures. : 8
(63: 27.8s 00.01ms)(0x2078) MaxStreams.............. : 16
(64: 27.8s 00.01ms)(0x2078) MaxStreamStride......... : 255
(65: 27.8s 00.01ms)(0x2078) MaxVertexBlendMatrices.. : 4
(66: 27.8s 00.01ms)(0x2078) MaxVShaderInstrExecuted. : 4294967295
(67: 27.8s 00.01ms)(0x2078) MaxPointSize............ : 256.000000
(68: 27.8s 00.01ms)(0x2078) VertexShaderVersion..... : 0x300
(69: 27.8s 00.01ms)(0x2078) PixelShaderVersion...... : 0x300
(70: 27.8s 00.01ms)(0x2078) NumSimultaneousRTs...... : 4
(71: 27.8s 00.89ms)(0x2078) D3DPTEXTURECAPS_POW2.... : 0
(72: 27.8s 00.01ms)(0x2078) NONPOW2CONDITIONAL...... : 0
(73: 27.8s 00.01ms)(0x2078) VertexDeclCaps.......... : 0x37F
(74: 27.8s 00.66ms)(0x2078) MiscCaps................ : 0x2FCCF2
(75: 27.8s 00.64ms)(0x2078) DevCaps................. : 0x19AE50
(76: 27.8s 00.01ms)(0x2078) DevCaps2................ : 0x51
(77: 27.8s 00.01ms)(0x2078) XNA Math Support........ : Yes
(78: 27.8s 03.65ms)(0x2078) Vertex Texture.......... : Yes
(79: 27.8s 00.89ms)(0x2078) Shadow Mapping.......... : Yes
(80: 27.8s 00.75ms)(0x2078) D3DFMT_A16B16G16R16F.... : Yes
(81: 27.8s 03.00ms)(0x2078) D3DFMT_A32B32G32R32F.... : Yes
(82: 27.8s 03.35ms)(0x2078) D3DFMT_D32F_LOCKABLE.... : No
(83: 27.9s 03.01ms)(0x2078) D3DFMT_A2R10G10B10...... : Yes
(84: 27.9s 00.71ms)(0x2078) D3DFMT_L8............... : Yes
(85: 27.9s 00.67ms)(0x2078) D3DDTCAPS_DEC3N......... : No
(86: 27.9s 00.70ms)(0x2078) D3DDTCAPS_FLOAT16_2..... : Yes
(87: 27.9s 00.68ms)(0x2078) D3DDTCAPS_FLOAT16_4..... : Yes
(88: 27.9s 00.71ms)(0x2078) Runs under WINE......... : No
(89: 27.9s 03.12ms)(0x2078) Window Size = [1920, 1080]
(90: 27.9s 00.01ms)(0x2078) Window LeftTop = [0, 0]
(91: 27.9s 49.98ms)(0x2078) Available Texture Memory : 4080 MB
(92: 27.9s 06.70ms)(0x2078) === [3DDevice Initialized] ===
(93: 27.9s 01.13ms)(0x2078) ----- Initialize D3D9ClientSurface Tech -----
(94: 27.9s 00.46ms)(0x2078) [ERROR] D3D9Surface.cpp Line:2045 Error:-2147024770 D3DXCreateEffectFromFileA(pDev, name, 0, 0, 0, 0, &FX, &errors)
(95: 27.9s 00.64ms)(0x2078) [ERROR] Failed to create an Effect (Modules/D3D9Client/CKBlit.fx)
(96: 34.7s 6822.77ms)(0x2078) Render Target = 0xB641A0
(97: 34.7s 00.04ms)(0x2078) DepthStencil = 0x9BA9C20
(98: 34.7s 00.63ms)(0x2078) [ERROR] D3D9Pad.cpp Line:83 Error:-2147024770 D3DXCreateEffectFromFileA(pDev, name, 0, 0, 0, 0, &FX, &errors)
(99: 34.7s 01.05ms)(0x2078) [ERROR] Failed to create an Effect (Modules/D3D9Client/Sketchpad.fx)
(100: 35.4s 689.54ms)(0x2078) [NEW FONT] ( Courier New), Size=20, Weight=400 Pitch&Family=31
(101: 35.4s 03.59ms)(0x2078) Font Video Memory Usage = 512 kb
(102: 35.4s 00.88ms)(0x2078) Font and Charter set creation succesfull
(103: 35.4s 01.02ms)(0x2078) Splash Window Size = [1920, 1080]
(104: 35.4s 00.01ms)(0x2078) Splash Window LeftTop = [0, 0]
(105: 35.5s 110.54ms)(0x2078) Starting to initialize D3D9Client.fx a rendering technique...
(106: 35.5s 00.55ms)(0x2078) [ERROR] D3D9Effect.cpp Line:341 Error:-2147024770 D3DXCreateEffectFromFileA(pDev, name, macro, 0, D3DXSHADER_NO_PRESHADER|D3DXSHADER_PREFER_FLOW_CONTROL, 0, &FX, &errors)
(107: 35.6s 01.25ms)(0x2078) [ERROR] Failed to create an Effect (Modules/D3D9Client/D3D9Client.fx)
(108: 35.6s 01.22ms)(0x2078) TileManager::GlobalInit()...
(109: 35.6s 68.96ms)(0x2078) Starting to initialize Surface.fx a shading technique...
(110: 35.6s 00.15ms)(0xC38) TileBuffer::LoadTile thread started
(111: 35.6s 00.09ms)(0x3460) TileLoader::Load thread started
(112: 35.6s 01.38ms)(0x2078) [ERROR] PlanetRenderer.cpp Line:198 Error:-2147024770 D3DXCreateEffectFromFileA(pDev, name, macro, 0, 0, 0, &pShader, &errors)
(113: 35.6s 01.27ms)(0x2078) [ERROR] Failed to create an Effect (Modules\D3D9Client\Surface.fx)
(114: 35.6s 07.68ms)(0x2078) CSphereManager::GlobalInit()...
(115: 35.6s 14.91ms)(0x2078) [ERROR] Scene.cpp Line:3089 Error:-2147024770 D3DXCreateEffectFromFile(pDev, name, 0, 0, 0, 0, &FX, &errors)
(116: 35.6s 03.97ms)(0x2078) [ERROR] Failed to create an Effect (Modules/D3D9Client/SceneTech.fx)

Any thoughts???
 

kuddel

Donator
Donator
Joined
Apr 1, 2008
Messages
2,064
Reaction score
507
Points
113
Is the source code for the D3D9Client available? Codeplex seems to have shut down.

Codeplex is not used for quite a while now...
Builds are published here: http://users.kymp.net/~p501474a/D3D9Client/
The source code is served here: svn://mirror.orbiter-radio.co.uk/D3D9client/
(
svn://mirror.orbiter-radio.co.uk/D3D9client/trunk for Orbiter BETA,
svn://mirror.orbiter-radio.co.uk/D3D9client/branches/2016 for Orbiter 2016 and
svn://mirror.orbiter-radio.co.uk/D3D9client/branches/2010-P1 for Orbiter 2010-P1
)
 

jarmonik

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 28, 2008
Messages
2,651
Reaction score
785
Points
128
D3D9: ERROR: D3D9Surface.cpp Line:2045 Error:-2147024770 D3DXCreateEffectFromFileA(pDev, name, 0, 0, 0, 0, &FX, &errors)
D3D9: ERROR: Failed to create an Effect (Modules/D3D9Client/CKBlit.fx)


These errors are pointing into a missing runtimes or other D3D dependencies.
Could you check that you have in your "/windows/system32/" folder following files:
d3d9.dll
d3dx9_43.dll
D3DCompiler_43.dll
 

GLS

Well-known member
Orbiter Contributor
Addon Developer
Joined
Mar 22, 2008
Messages
5,877
Reaction score
2,868
Points
188
Website
github.com
An advanced option exists to control what vessels have shadows, but I'm not sure that is working as intended (or I'm interpreting it the wrong way :shrug:). The "Near by objects" will show "full detail" in the selected vessel (and some/all child attachments?), and only "low detail" in nearby vessels. The "Focus + payload" doesn't always show the "full detail" on the child vessels. The "All visible objects" sometimes doesn't set "full detail" on any vessel (even the selected one).
Maybe there should be 2 options: one to control what vessels will have shadows, and another to decided what level of detail the shadow will have on the vessels "selected" by the first option, a sort of subset option.
 

jarmonik

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 28, 2008
Messages
2,651
Reaction score
785
Points
128
An advanced option exists to control what vessels have shadows, but I'm not sure that is working as intended....


You could provide a screen shot to clarify the situation. But there is no level of detail control like that for shadows. Following is not entirely true, but we can consider that there is a fixed sized shadow map of 2048 pixels and those pixels will create a charper shadow on a small vessel and rougher shadow on a larger vessel. So, in other words the level of detail simply depends on vessel size. Large construction like ISS can have a sharp shadow if it's composed from a multiple smalled modules. Which is true in reality.
 

GLS

Well-known member
Orbiter Contributor
Addon Developer
Joined
Mar 22, 2008
Messages
5,877
Reaction score
2,868
Points
188
Website
github.com
You could provide a screen shot to clarify the situation. But there is no level of detail control like that for shadows. Following is not entirely true, but we can consider that there is a fixed sized shadow map of 2048 pixels and those pixels will create a charper shadow on a small vessel and rougher shadow on a larger vessel. So, in other words the level of detail simply depends on vessel size. Large construction like ISS can have a sharp shadow if it's composed from a multiple smalled modules. Which is true in reality.

That's it then... the vessel that "doesn't like shadows" is the SSU pad, which although not the largest detailed mesh, it has a large area.
Thanks!
 

GLS

Well-known member
Orbiter Contributor
Addon Developer
Joined
Mar 22, 2008
Messages
5,877
Reaction score
2,868
Points
188
Website
github.com
Quick question for the graphics experts on how the textures and materials of mesh groups are handled: when going thru the groups, and the group needs a different texture than the previous group, does the material also get automatically "reset", or if it is the same you don't spend time switching that as well?
I'm trying to understand how it works so I can produce stats on texture and material switching based on the mesh group order. In a pdf, Martin mentions that groups should ordered by texture, and then material, for best performance (and it makes total sense), but nothing is said about what happens to the current material when a texture is changed. :shrug:
 

jarmonik

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 28, 2008
Messages
2,651
Reaction score
785
Points
128
but nothing is said about what happens to the current material when a texture is changed. :shrug:


In D3D9 current material remains in use when a texture is changed.
Also, a current texture remains in use when a material is changed.
Atleast this is how it should be.

Material and texture changes are pretty fast so there is no need to go extreme lenghts while attempting to optimizing them. Of course, if some attention is paid to avoid unnessecary changes then it can gain a few percent of extra frame rate. :thumbup:

---------- Post added at 16:11 ---------- Previous post was at 16:00 ----------

New build 3.13 of the client is out for Orbiter 2016. There are a lot of changes but, the most important ones are related to shadows and terrain.

- Stencil shadows are now better aligned with a terrain and should appear in the right place for vessels and base object meshes.

- Underground meshes are nolonger creating a "false" shadows.

- When "linear interpolation" and "Experimental lunar terrain interpolation" are selected the resulting visual terrain should match the surface used by physics with an accuracy of 2cm. Otherwise, the deviation can be a few meters.
 
Last edited:

GLS

Well-known member
Orbiter Contributor
Addon Developer
Joined
Mar 22, 2008
Messages
5,877
Reaction score
2,868
Points
188
Website
github.com
In D3D9 current material remains in use when a texture is changed.
Also, a current texture remains in use when a material is changed.
Atleast this is how it should be.
Makes sense, thanks!

Material and texture changes are pretty fast so there is no need to go extreme lenghts while attempting to optimizing them. Of course, if some attention is paid to avoid unnessecary changes then it can gain a few percent of extra frame rate. :thumbup:
Well, I'd guess the texture and material changes are a small "overhead" in the complete drawing process, so gains in there shouldn't be drastic. But, performance is far from good with 20MB meshes, so if we can gain anything, why not gain it? :shrug:
The re-ordering process is done by a one-time pass thru a script I'm finishing. My current logic assumes the materials are reset when a texture changes (much easier :lol:), so with the new info above I'd have to change things to get the absolute best group order. Not sure I'll do it, as I'm getting a ~60% reduction in total changes as is, and the cases where the same material is used in 2 groups with different textures should be small.

In the end, even if the performance gains are small, I'm learning Python so there is a gain anyway! :thumbup:
 

jacquesmomo

Addon Developer
Addon Developer
Joined
Jun 14, 2008
Messages
611
Reaction score
449
Points
78
Location
FRANCE
Website
francophone.dansteph.com
hello Jarmo

I'd just tested the latest version of D3D9 (v3.13) and now I no longer have the floating shadow problem that I had encountered with my Kourou-CSG add-on.

Thank you somuch for that !!! :thumbup::tiphat:...
 

Abloheet

Addon Developer
Addon Developer
Joined
Apr 18, 2009
Messages
212
Reaction score
40
Points
43
Location
Kolkata,West Bengal


New build 3.13 of the client is out for Orbiter 2016. There are a lot of changes but, the most important ones are related to shadows and terrain.

- Stencil shadows are now better aligned with a terrain and should appear in the right place for vessels and base object meshes.

- Underground meshes are nolonger creating a "false" shadows.

- When "linear interpolation" and "Experimental lunar terrain interpolation" are selected the resulting visual terrain should match the surface used by physics with an accuracy of 2cm. Otherwise, the deviation can be a few meters.


Are these amazing features there in the Orbiter Beta D3D9 Client?
If not, will it be possible to port them to the beta client also?

---------- Post added at 11:06 AM ---------- Previous post was at 11:04 AM ----------

I've added a missing feature in D3D9Client (trunk) that should now enable planetary bodies that are defined as a mesh and "Size = xxx" parameter in their .cfg file.
(See attachment and the threads here and here for what I mean by that).

Until this revision (r1187) the body mesh had to be scaled (by Shipedit.exe for example) to be rendered correct (full) size with D3D9Client.
Now the mesh can be kept in usual "1.0 based" coordinates and the Scale parameter from the config is applied (as Orbiter 2016 does)!

@Jarmo: It seem that the texturing is not working 100%, though. Could you take a quick look, as it might take you only seconds while I'm a bit lost... :)

For the test I've added 67P/Churyumov-Gerasimenko as it is sooo non-spherical :p
The texture is just a dummy as the texturing is probably not right anyway.

This is not (yet) a new release, we have to sort out the texturing issue first (if it is one), before we create a new D3D9Client-forBETA and back-port it to D3D9Client-for2010 as well.


Have you been able to fix the texturing issues?
When can we have a release of d3d9 beta with this feature?
 

jarmonik

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 28, 2008
Messages
2,651
Reaction score
785
Points
128
Are these amazing features there in the Orbiter Beta D3D9 Client?
If not, will it be possible to port them to the beta client also?

These features are not yet available for beta. I am waiting Martin's response to how do we fix the terrain elevation issue from Orbiter beta and I have not received an answer. Also, the shadow fixes are tied to a terrain elevation so they are not working without elevation fix.

We will create a beta build as soon as the issues are resolved.


Have you been able to fix the texturing issues?
When can we have a release of d3d9 beta with this feature?

I don't know if the issue is fixed. In some cases textures were not working due to missing texture coordinates. Kuddel might have new information.
 

kuddel

Donator
Donator
Joined
Apr 1, 2008
Messages
2,064
Reaction score
507
Points
113
Have you been able to fix the texturing issues?
When can we have a release of d3d9 beta with this feature?

This "texturing issue" is fixed already (rev.1196 @ trunk) . A new release will have it fixed.
A GO/NO-GO on a new BETA release-version would be: GO!
For when jarmonik will build and publish a new release, I cannot predict any date.
Quite a number of changes/fixes since "R28.11" (rev.1173), so it's time for a new release :salute:

As X-mas came early this year (with AMSO for Orbiter-2016), maybe a new build will come up soon.
 

jarmonik

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 28, 2008
Messages
2,651
Reaction score
785
Points
128
New Build

There are new builds 4.0 and 29.0 published for Orbiter 2016 and Orbiter Beta, currently carying "Beta" status.

- There is a new gcCore interface to access gcAPI functions. Since, the interface is growing larger and the old method is slightly problematic and time taking to maintain the gcCore could be a solution to that. The old gcAPI is going to remain and work as it is however new functions will be available only through gcCore interface, currently declared in gcConst.h

- There is a new custom swapchain interface added. This means that users can create a double buffered DirectX rendering context in a custom window or control. Which can be written in by SketchPad or oapiBlt().

- New version of DX9ExtMFD is made available which is using the swapchain interface. Unzip it in "/Modules/Plugin/" folder.

- Screen space GDI access is restored. And can be enabled from the D3D9Clontrol dialog from the launchpad. However, I haven't been able to test it. Most addons known to use it are crashing even with the DX7.

- The accurate terrain interpolation is no longer an experimental feature and the checkbox is removed.

- There is also an experimental gcGUI interface that should put through some testing and if it passes then a new development tools will be hopefully made by using it. I have a surface base/terrain editing tool and vessel visual editor in the plans. The gcGUI can be enabled form D3D9Controls from the launchpad and there are two modes "Default" and "Windowed". Testing is required at 4k resolution and multi-monitor configurations. Note: that the controls in the dialogs are not yet operational. The old D3D9Debug control dialog is still fully operational.

The "Default" mode has two dockbars in left/right edge of the screen and the controls can be freely moved around the screen. The dock bars can be currently locked in current open/closed position by holding down [LShift + LCtrl] and pressing [LeftArrow] or [RightArrow].

The "Windowed" doesn't have dockbars and the sub-dialogs can't be detached from the main section.


:cheers:
 

Attachments

  • DX9ExtMFD.zip
    131.6 KB · Views: 15
  • gcGUI.jpg
    gcGUI.jpg
    345.6 KB · Views: 100
Last edited:

DaveS

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Feb 4, 2008
Messages
9,429
Reaction score
680
Points
203
Major bug to report: I can't use the MFD target selection menus in D3D9Client. They come up but the arrow keys does nothing, I can't move between the different menu items. Only way to make it go away is by left-clicking.
 

jarmonik

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 28, 2008
Messages
2,651
Reaction score
785
Points
128
Major bug to report: I can't use the MFD target selection menus in D3D9Client. They come up but the arrow keys does nothing, I can't move between the different menu items. Only way to make it go away is by left-clicking.


Oh no. How did this happen :facepalm: You need to roll back to 3.13 until I can make a new build. Sorry about this. EDIT: Also, disabling gcGUI should solve the problem.

BTW, have you tried the new gcGUI dialogs in 4k resolution ? Are they working/scaling properly ?
 
Last edited:

Ripley

Tutorial translator
Donator
Joined
Sep 12, 2010
Messages
3,133
Reaction score
407
Points
123
Location
Rome
Website
www.tuttovola.org
Oh no. How did this happen...You need to roll back to 3.13 until I can make a new build...
I have to add that reverting back to 3.13, then to 3.12 didn't fix my MFD issue.

D3D9's ExtMFDs show up completely empty.
Pressing SEL cycles through my installed MFDs (I can see the side selection buttons with the ">" and "<" arrows changing accordingly), but the MFD itself remains blank.
 
Top