New Release D3D9Client Development

Bug report

Hi Jarmonik,

Fantastic work on the client!

I've found a possible bug that I thought maybe you could have a look at...

I've been playing around creating an MFD that uses oapiCreateFont() to print text into the MFD sketchpad that is rotated. This works fine with the normal orbiter version, but I get a problem when I try to load the MFD in the D3D9 client.

It seems that the rotation is not taken into account as all of my text which should be rotated is not and so the text just prints out in the same direction (as normal). Opening the MFD and sitting stationary is no problem and the MFD will sit there happily.

But when I try and turn the ship (i.e. change heading) orbiterng crashes (the rotation of the text is linked to heading).

There doesn't appear to be anything useful in terms of log files, it simply crashes with no other information.

If you need some more info then let me know, but hopefully you can shed some light on this.
 
If you need some more info then let me know, but hopefully you can shed some light on this.

Where can I download this MFD, I need it for testing the rotation and tracing down the crash.
 
aha...

it is an MFD I am working on - I can send you the dll, but I'm not sure if it will work straight away (I'm not sure about this debug vs release stuff when compiling in vc++ 2010)

But I've tried attaching it to this message - there are some instructions inside the zip with the dll file...

Thanks again

flyer
 

Attachments

D3D9Client RC16

Unfortunally I can't run it because I don't have VC++ 2010 installed. It is linked with the VC2010 Debug runtime libraries. Using any other runtime library than "Multi-threaded Debug DLL (/MDd)" should work.

I have added a rotation support into the sketchpad and I found something that might have cause the crash. But I haven't been able to test it. Rotation should work with MFDs but doesn't work when drawing into the backbuffer directly.

Here is a change log for RC16

- Specular tile edge bug is fixed.
- ShuttleFleet smoke issue is fixed.
- Missing planet name from the HUD is fixed.
- Font rotation added in sketchpad should work with MFDs.

ShuttleFleet4.7 VC "Double Hud" problem seems to be cause by incorrect visibility mode VisMode=0x15 which most likely should be 0x01. The problem doesn't show up in the standard orbiter because the near clipping plane will remove it during exterior pass which doesn't happen in D3D9Client because of the shorter distance to the clipping plane.
 
Last edited:
Thanks for the try, but it still does not work. Interestingly, orbiter now does not crash when I change my heading as it did before. Now the text remains un-rotated but turns with the compass...

I have tried to change the MDd setting to something else, but it gives me lots of errors that I don't understand and then wont compile.

Oh well, I guess maybe in the future if I figure it out I could send it to you to test, but my c++ is coming along very slowly!

Flyer
 
D3D9Client RC17

Looks like I forgot to setup the escapement parameter in the font structure. It should work now.
There are more details in the RC16 post above.
 
Last edited:
Regarding the Contrai4.dds issue, I remembered seeing that in the addon comments for the Shuttle Fleet. Apparently causes CTD in the Enterprise launch scenario. David413 is aware of the issue, and best I can tell, is working to fix in next release/SP.
 
Thanks for the work, but unfortunately there is still no rotation with the text
 
Problem with textures + local lights

Once again, my sincere congratulations for the excellent work you're doing there.

However, I have an annoying textures problem with the addon I'm currently working on ; also the local lights seem to cause troubles too (but you mentionned that above) :

DX9 Client RC17 :

11_05_05_18-56-59_LM.jpg


DX7 inline client :

11_05_03_14-36-24_LM2.jpg


Orbiter.log :
Code:
**** Orbiter.log
Build Aug 30 2010 [v.100830]
Timer precision: 2.79365e-007 sec
Found 1 joystick(s)
Module AtlantisConfig.dll .... [Build 100830, API 100830]
Module AtmConfig.dll ......... [Build 100830, API 100830]
Module DGConfigurator.dll .... [Build 100830, API 100830]
Module transx.dll ............ [Build 100824, API 100823]
Module CustomMFD.dll ......... [Build 100830, API 100830]
Module LuaMFD.dll ............ [Build 100830, API 100830]
Module OrbiterSound.dll ...... [Build ******, API 060425]
---------------------------------------------------------------
>>> WARNING: Obsolete API function used: oapiRegisterMFDMode
At least one active module is accessing an obsolete interface function.
Addons which rely on obsolete functions may not be compatible with
future versions of Orbiter.
---------------------------------------------------------------
Module LuaConsole.dll ........ [Build 100830, API 100830]
Module ScriptMFD.dll ......... [Build 100830, API 100830]
Module ExtMFD.dll ............ [Build 100830, API 100830]
Module FlightData.dll ........ [Build 100830, API 100830]
Module Framerate.dll ......... [Build 100830, API 100830]
Module Rcontrol.dll .......... [Build 100830, API 100830]
Module ScnEditor.dll ......... [Build 100830, API 100830]
Module AutoRudder.dll ........ [Build 101208, API 100830]
Module D3D9Client.dll ........ [Build 110505, API 101016]
D3D9Client: [DirectX 9 Initialized]
Module ScreenCapture.dll ..... [Build ******, API 060425]

**** Creating simulation session
D3D9Client: [3DDevice Initialized]
D3D9Client: [Loading Stars]
D3D9Client: [Loading Constellations]
D3D9Client: [D3D9Client Initialized]
Joystick throttle: SLIDER 0
Joystick throttle control detected
Module Sun.dll ............... [Build 100830, API 100830]
VSOP87(E) Sun: Precision 1e-006, Terms 554/6634
Module Mercury.dll ........... [Build 100830, API 100830]
VSOP87(B) Mercury: Precision 1e-005, Terms 167/7123
Module Venus.dll ............. [Build 100830, API 100830]
Module VenusAtm2006.dll ...... [Build 100830, API 100830]
VSOP87(B) Venus: Precision 1e-005, Terms 79/1710
Module Earth.dll ............. [Build 100830, API 100830]
Module EarthAtmJ71G.dll ...... [Build 100830, API 100830]
VSOP87(B) Earth: Precision 1e-008, Terms 2564/2564
Module Moon.dll .............. [Build 100830, API 100830]
ELP82: Precision 1e-005, Terms 116/829
Module Mars.dll .............. [Build 100830, API 100830]
Module MarsAtm2006.dll ....... [Build 100830, API 100830]
VSOP87(B) Mars: Precision 1e-005, Terms 405/6400
Module Phobos.dll ............ [Build ******, API 060425]
Module Deimos.dll ............ [Build ******, API 060425]
Module Galsat.dll ............ [Build 100217, API 100215]
Module Jupiter.dll ........... [Build 100830, API 100830]
VSOP87(B) Jupiter: Precision 1e-006, Terms 1624/3625
Module Io.dll ................ [Build 100217, API 100215]
Module Europa.dll ............ [Build 100217, API 100215]
Module Ganymede.dll .......... [Build 100217, API 100215]
Module Callisto.dll .......... [Build 100217, API 100215]
Module Satsat.dll ............ [Build 100215, API 100212]
Module Saturn.dll ............ [Build 100830, API 100830]
VSOP87(B) Saturn: Precision 1e-006, Terms 2904/6365
Module Mimas.dll ............. [Build 100215, API 100212]
SATSAT Mimas: Terms 113
Module Enceladus.dll ......... [Build 100215, API 100212]
SATSAT Enceladus: Terms 33
Module Tethys.dll ............ [Build 100215, API 100212]
SATSAT Tethys: Terms 101
Module Dione.dll ............. [Build 100215, API 100212]
SATSAT Dione: Terms 59
Module Rhea.dll .............. [Build 100215, API 100212]
SATSAT Rhea: Terms 68
Module Titan.dll ............. [Build 100215, API 100212]
SATSAT Titan: Terms 100
Module Iapetus.dll ........... [Build 100215, API 100212]
SATSAT Iapetus: Terms 605
Module Uranus.dll ............ [Build 100830, API 100830]
VSOP87(B) Uranus: Precision 1e-006, Terms 1827/5269
Module Miranda.dll ........... [Build ******, API 060425]
Module Ariel.dll ............. [Build ******, API 060425]
Module Umbriel.dll ........... [Build ******, API 060425]
Module Titania.dll ........... [Build ******, API 060425]
Module Oberon.dll ............ [Build ******, API 060425]
Module Neptune.dll ........... [Build 100830, API 100830]
VSOP87(B) Neptune: Precision 1e-006, Terms 391/2024
Finished initialising world
Module RLM.dll ............... [Build 110505, API 100830]
Finished initialising status
Finished initialising camera
Finished initialising panels
---------------------------------------------------------------
>>> WARNING: CWD modified by module OrbiterSound - Fixing.
---------------------------------------------------------------
Finished setting up render state
D3D9Client: [Scene Initialized]
---------------------------------------------------------------
>>> WARNING: Obsolete API function used: oapiGetStationCount
At least one active module is accessing an obsolete interface function.
Addons which rely on obsolete functions may not be compatible with
future versions of Orbiter.
---------------------------------------------------------------
D3D9Client: [Session Closed. Scene deleted.]
**** Fast process shutdown
 
Last edited:
I have done some optimization in the drawing algorithm. So, I may have broken something. Does the problem exists in RC10 ?

EDIT: The log file of D3D9Client is located in /Modules/D3D9Client/ it's always a good idea to check it if there are errors reported with a red color.
 
Last edited:
I get exactly the same problem with the RC10, no changes.

Edit : that could be related with Anim8tor and the way it handles UV mapping. The textures that don't show are those which have UV mapping.

Edit2 : meshes uploaded. There are two meshes.

Edit 3 : here's the log, but I fear there's nothing special in it.
Code:
D3D9Client Log



(0: 4.5 us)(0xCA0) ================ clbkInitialise ===============
(1: 5359.9 us)(0xCA0) Index:0 640 x 480 60Hz (22)
(2: 5539.5 us)(0xCA0) Index:1 640 x 480 70Hz (22)
(3: 6313.7 us)(0xCA0) Index:2 640 x 480 72Hz (22)
(4: 6937.5 us)(0xCA0) Index:3 640 x 480 75Hz (22)
(5: 7730.6 us)(0xCA0) Index:4 720 x 480 60Hz (22)
(6: 8472.6 us)(0xCA0) Index:5 720 x 576 60Hz (22)
(7: 9186.9 us)(0xCA0) Index:6 800 x 600 60Hz (22)
(8: 9950.4 us)(0xCA0) Index:7 800 x 600 70Hz (22)
(9: 10706.1 us)(0xCA0) Index:8 800 x 600 72Hz (22)
(10: 11436.4 us)(0xCA0) Index:9 800 x 600 75Hz (22)
(11: 12171.7 us)(0xCA0) Index:10 1024 x 768 60Hz (22)
(12: 12935.2 us)(0xCA0) Index:11 1024 x 768 70Hz (22)
(13: 13659.6 us)(0xCA0) Index:12 1024 x 768 72Hz (22)
(14: 14394.3 us)(0xCA0) Index:13 1024 x 768 75Hz (22)
(15: 15138.2 us)(0xCA0) Index:14 1152 x 864 60Hz (22)
(16: 15864.3 us)(0xCA0) Index:15 1152 x 864 70Hz (22)
(17: 16617.8 us)(0xCA0) Index:16 1152 x 864 72Hz (22)
(18: 17359.2 us)(0xCA0) Index:17 1152 x 864 75Hz (22)
(19: 18083.9 us)(0xCA0) Index:18 1280 x 720 60Hz (22)
(20: 18817.8 us)(0xCA0) Index:19 1280 x 768 60Hz (22)
(21: 19535.7 us)(0xCA0) Index:20 1280 x 768 70Hz (22)
(22: 20257.9 us)(0xCA0) Index:21 1280 x 768 72Hz (22)
(23: 21003.2 us)(0xCA0) Index:22 1280 x 768 75Hz (22)
(24: 21753.9 us)(0xCA0) Index:23 1280 x 800 60Hz (22)
(25: 22461.0 us)(0xCA0) Index:24 1280 x 800 70Hz (22)
(26: 23198.8 us)(0xCA0) Index:25 1280 x 800 72Hz (22)
(27: 23943.3 us)(0xCA0) Index:26 1280 x 800 75Hz (22)
(28: 24580.2 us)(0xCA0) Index:27 1280 x 960 60Hz (22)
(29: 25317.2 us)(0xCA0) Index:28 1280 x 960 70Hz (22)
(30: 26061.7 us)(0xCA0) Index:29 1280 x 960 72Hz (22)
(31: 26786.6 us)(0xCA0) Index:30 1280 x 960 75Hz (22)
(32: 27081.9 us)(0xCA0) Index:31 1280 x 1024 60Hz (22)
(33: 27146.7 us)(0xCA0) Index:32 1280 x 1024 70Hz (22)
(34: 27208.5 us)(0xCA0) Index:33 1280 x 1024 72Hz (22)
(35: 27274.1 us)(0xCA0) Index:34 1280 x 1024 75Hz (22)
(36: 27334.5 us)(0xCA0) Index:35 800 x 600 56Hz (22)
(37: 2.8 us)(0xCA0) ================ clbkCreateRenderWindow ===============
(38: 2056.4 us)(0xCA0) [VideoConfiguration] Adapter=0, ModeIndex=34
(39: 2105.6 us)(0xCA0) MaxTextureBlendStages..: 8
(40: 2120.1 us)(0xCA0) MaxTextureWidth........: 8192
(41: 2134.1 us)(0xCA0) MaxTextureHeight.......: 8192
(42: 2147.5 us)(0xCA0) MaxPrimitiveCount......: 8388607
(43: 2160.9 us)(0xCA0) MaxVertexIndex.........: 16777215
(44: 2174.0 us)(0xCA0) MaxSimultaneousTextures: 8
(45: 2187.1 us)(0xCA0) MaxStreams.............: 16
(46: 2200.3 us)(0xCA0) MaxStreamStride........: 255
(47: 2213.4 us)(0xCA0) MaxVertexBlendMatrices.: 4
(48: 2226.5 us)(0xCA0) MaxVShaderInstrExecuted: 65535
(49: 2239.4 us)(0xCA0) VertexShaderVersion....: 0x300
(50: 2252.5 us)(0xCA0) PixelShaderVersion.....: 0x300
(51: 2265.9 us)(0xCA0) NumSimultaneousRTs.....: 4
(52: 2278.8 us)(0xCA0) D3DPTEXTURECAPS_POW2...: 0
(53: 2291.4 us)(0xCA0) NONPOW2CONDITIONAL.....: 0
(54: 5459.6 us)(0xCA0) [NEW FONT] ( Courier New), Size=18, Weight=400 Pitch&Family=30
(55: 5692.3 us)(0xCA0) TextMetrics: Ascent = 14
(56: 5708.5 us)(0xCA0) TextMetrics: Descent = 4
(57: 5722.0 us)(0xCA0) TextMetrics: Height = 18
(58: 5735.1 us)(0xCA0) TextMetrics: AvgWidth= 10
(59: 5747.9 us)(0xCA0) TextMetrics: MaxWidth= 11
(60: 7445.6 us)(0xCA0) Font and Charter set creation succesfull
(61: 21.5 us)(0xCA0) [NEW FONT] ( Arial), Size=15, Weight=400 Pitch&Family=30
(62: 240.8 us)(0xCA0) TextMetrics: Ascent = 12
(63: 257.6 us)(0xCA0) TextMetrics: Descent = 3
(64: 271.3 us)(0xCA0) TextMetrics: Height = 15
(65: 284.4 us)(0xCA0) TextMetrics: AvgWidth= 5
(66: 297.2 us)(0xCA0) TextMetrics: MaxWidth= 32
(67: 1867.0 us)(0xCA0) Font and Charter set creation succesfull
(68: 90216.5 us)(0xCA0) CSphereManager:: Textures Loaded
(69: 90266.5 us)(0xCA0) CSphere Manager constructed
(70: 351.7 us)(0xCA0) [NEW FONT] ( Courier New), Size=-20, Weight=400 Pitch&Family=30
(71: 607.3 us)(0xCA0) TextMetrics: Ascent = 17
(72: 627.2 us)(0xCA0) TextMetrics: Descent = 5
(73: 640.9 us)(0xCA0) TextMetrics: Height = 22
(74: 659.3 us)(0xCA0) TextMetrics: AvgWidth= 12
(75: 672.7 us)(0xCA0) TextMetrics: MaxWidth= 13
(76: 2676.0 us)(0xCA0) Font and Charter set creation succesfull
(77: 2743.4 us)(0xCA0) [NEW FONT] ( Arial), Size=20, Weight=400 Pitch&Family=30
(78: 2951.5 us)(0xCA0) TextMetrics: Ascent = 15
(79: 2967.7 us)(0xCA0) TextMetrics: Descent = 4
(80: 2981.1 us)(0xCA0) TextMetrics: Height = 19
(81: 2994.0 us)(0xCA0) TextMetrics: AvgWidth= 8
(82: 3007.1 us)(0xCA0) TextMetrics: MaxWidth= 45
(83: 4765.7 us)(0xCA0) Font and Charter set creation succesfull
(84: 23.7 us)(0xCA0) [NEW FONT] ( Courier New), Size=-17, Weight=400 Pitch&Family=30
(85: 231.0 us)(0xCA0) TextMetrics: Ascent = 15
(86: 248.4 us)(0xCA0) TextMetrics: Descent = 5
(87: 262.0 us)(0xCA0) TextMetrics: Height = 20
(88: 275.2 us)(0xCA0) TextMetrics: AvgWidth= 10
(89: 288.3 us)(0xCA0) TextMetrics: MaxWidth= 11
(90: 1996.9 us)(0xCA0) Font and Charter set creation succesfull
(91: 2032.4 us)(0xCA0) [NEW FONT] ( Arial), Size=-12, Weight=400 Pitch&Family=30
(92: 2157.5 us)(0xCA0) TextMetrics: Ascent = 12
(93: 2173.5 us)(0xCA0) TextMetrics: Descent = 3
(94: 2187.4 us)(0xCA0) TextMetrics: Height = 15
(95: 2201.1 us)(0xCA0) TextMetrics: AvgWidth= 5
(96: 2214.8 us)(0xCA0) TextMetrics: MaxWidth= 32
(97: 3692.9 us)(0xCA0) Font and Charter set creation succesfull
(98: 3725.9 us)(0xCA0) [NEW FONT] ( Arial), Size=-12, Weight=400 Pitch&Family=30
(99: 3845.7 us)(0xCA0) TextMetrics: Ascent = 12
(100: 3861.7 us)(0xCA0) TextMetrics: Descent = 3
(101: 3875.1 us)(0xCA0) TextMetrics: Height = 15
(102: 3888.5 us)(0xCA0) TextMetrics: AvgWidth= 5
(103: 3901.6 us)(0xCA0) TextMetrics: MaxWidth= 32
(104: 5334.5 us)(0xCA0) Font and Charter set creation succesfull
(105: 5378.1 us)(0xCA0) [NEW FONT] ( Arial), Size=-17, Weight=400 Pitch&Family=30
(106: 5569.7 us)(0xCA0) TextMetrics: Ascent = 15
(107: 5586.2 us)(0xCA0) TextMetrics: Descent = 4
(108: 5600.2 us)(0xCA0) TextMetrics: Height = 19
(109: 5613.3 us)(0xCA0) TextMetrics: AvgWidth= 8
(110: 5632.3 us)(0xCA0) TextMetrics: MaxWidth= 45
(111: 7356.8 us)(0xCA0) Font and Charter set creation succesfull
(112: 679.4 us)(0xCA0) [NEW FONT] ( Arial), Size=20, Weight=400 Pitch&Family=30
(113: 906.3 us)(0xCA0) TextMetrics: Ascent = 16
(114: 924.1 us)(0xCA0) TextMetrics: Descent = 4
(115: 938.1 us)(0xCA0) TextMetrics: Height = 20
(116: 951.2 us)(0xCA0) TextMetrics: AvgWidth= 8
(117: 963.8 us)(0xCA0) TextMetrics: MaxWidth= 27
(118: 2855.7 us)(0xCA0) Font and Charter set creation succesfull
(119: 2909.0 us)(0xCA0) [NEW FONT] ( Courier New), Size=20, Weight=400 Pitch&Family=30
(120: 3123.6 us)(0xCA0) TextMetrics: Ascent = 15
(121: 3140.9 us)(0xCA0) TextMetrics: Descent = 5
(122: 3154.0 us)(0xCA0) TextMetrics: Height = 20
(123: 3167.4 us)(0xCA0) TextMetrics: AvgWidth= 10
(124: 3180.9 us)(0xCA0) TextMetrics: MaxWidth= 11
(125: 4892.2 us)(0xCA0) Font and Charter set creation succesfull
(126: 20.1 us)(0xCA0) [NEW FONT] ( Arial), Size=-29, Weight=400 Pitch&Family=30
(127: 237.2 us)(0xCA0) TextMetrics: Ascent = 27
(128: 253.4 us)(0xCA0) TextMetrics: Descent = 6
(129: 266.5 us)(0xCA0) TextMetrics: Height = 33
(130: 279.6 us)(0xCA0) TextMetrics: AvgWidth= 13
(131: 292.8 us)(0xCA0) TextMetrics: MaxWidth= 77
(132: 3057.9 us)(0xCA0) Font and Charter set creation succesfull
(133: 3.1 us)(0xCA0) ================ clbkPostCreation ===============
(134: 20.4 us)(0xCA0) RegisteringVisual (Sun) hVessel=0x0, hObj=0x3EC708, Vis=0x35F4240, Rec=0x35DB510, Type=3
(135: 91475.9 us)(0xCA0) RegisteringVisual (Mercury) hVessel=0x0, hObj=0x43DD1F8, Vis=0x35F4460, Rec=0x35DB3B8, Type=4
(136: 107207.8 us)(0xCA0) RegisteringVisual (Venus) hVessel=0x0, hObj=0x43D9078, Vis=0x35F9688, Rec=0x35F9670, Type=4
(137: 314.3 us)(0xCA0) Reading Tile Data for Earth_tile.bin
(138: 301190.0 us)(0xCA0) RegisteringVisual (Earth) hVessel=0x0, hObj=0x43C0910, Vis=0x3603AC8, Rec=0x3603AB0, Type=4
(139: 246.7 us)(0xCA0) Reading Tile Data for Moon_tile.bin
(140: 169149.4 us)(0xCA0) RegisteringVisual (Moon) hVessel=0x0, hObj=0x43BAAE0, Vis=0x7D3E008, Rec=0x3693450, Type=4
(141: 295.6 us)(0xCA0) Reading Tile Data for Mars_tile.bin
(142: 236704.7 us)(0xCA0) RegisteringVisual (Mars) hVessel=0x0, hObj=0x47C2810, Vis=0x9148870, Rec=0x8440F38, Type=4
(143: 4.2 us)(0xCA0) RegisteringVisual (Phobos) hVessel=0x0, hObj=0x47CA848, Vis=0xD9B01B8, Rec=0xE205578, Type=4
(144: 4.5 us)(0xCA0) RegisteringVisual (Deimos) hVessel=0x0, hObj=0x47F19D8, Vis=0xDEF70C8, Rec=0xE391578, Type=4
(145: 61772.9 us)(0xCA0) RegisteringVisual (Jupiter) hVessel=0x0, hObj=0x456C848, Vis=0xE415008, Rec=0xD9B0760, Type=4
(146: 10898.9 us)(0xCA0) RegisteringVisual (Io) hVessel=0x0, hObj=0x481C850, Vis=0xE8C3238, Rec=0xE7B7FF0, Type=4
(147: 2903.7 us)(0xCA0) RegisteringVisual (Europa) hVessel=0x0, hObj=0x47F3AA0, Vis=0xE8C3658, Rec=0xE83DFF0, Type=4
(148: 2939.2 us)(0xCA0) RegisteringVisual (Ganymede) hVessel=0x0, hObj=0x47D1810, Vis=0xDA701E8, Rec=0xDD71278, Type=4
(149: 2639.4 us)(0xCA0) RegisteringVisual (Callisto) hVessel=0x0, hObj=0x47DA810, Vis=0xE731008, Rec=0xE625FF0, Type=4
(150: 7370.5 us)(0xCA0) RegisteringVisual (Saturn) hVessel=0x0, hObj=0x47E1810, Vis=0xE731568, Rec=0xE07DFF0, Type=4
(151: 12350.2 us)(0xCA0) RegisteringVisual (Mimas) hVessel=0x0, hObj=0x47CEDF8, Vis=0xE7316D0, Rec=0xDFFBFF0, Type=4
(152: 96665.9 us)(0xCA0) RegisteringVisual (Enceladus) hVessel=0x0, hObj=0x47CF4E0, Vis=0xD9F0008, Rec=0xDCF0FF0, Type=4
(153: 28494.1 us)(0xCA0) RegisteringVisual (Tethys) hVessel=0x0, hObj=0x47D1EF8, Vis=0xD9F0388, Rec=0xD970FF0, Type=4
(154: 27228.3 us)(0xCA0) RegisteringVisual (Dione) hVessel=0x0, hObj=0x47D25E0, Vis=0xD9F0708, Rec=0xD874FF0, Type=4
(155: 26562.6 us)(0xCA0) RegisteringVisual (Rhea) hVessel=0x0, hObj=0x47E3868, Vis=0x361C8A0, Rec=0x10F8FFF0, Type=4
(156: 102110.7 us)(0xCA0) RegisteringVisual (Titan) hVessel=0x0, hObj=0x47E4000, Vis=0x361CE50, Rec=0xD7F6FF0, Type=4
(157: 2666.8 us)(0xCA0) RegisteringVisual (Hyperion) hVessel=0x0, hObj=0x47F61C0, Vis=0x3616810, Rec=0xCA1CE78, Type=4
(158: 40277.5 us)(0xCA0) RegisteringVisual (Iapetus) hVessel=0x0, hObj=0x47F68A8, Vis=0x3616D70, Rec=0xE731878, Type=4
(159: 8369.2 us)(0xCA0) RegisteringVisual (Uranus) hVessel=0x0, hObj=0x4836008, Vis=0x10EB5AD8, Rec=0xC670D58, Type=4
(160: 2861.5 us)(0xCA0) RegisteringVisual (Miranda) hVessel=0x0, hObj=0x48568F8, Vis=0x10EB5E58, Rec=0xC5FCC68, Type=4
(161: 2899.5 us)(0xCA0) RegisteringVisual (Ariel) hVessel=0x0, hObj=0x48366F0, Vis=0xDAF01E8, Rec=0xD0F0BD8, Type=4
(162: 2602.3 us)(0xCA0) RegisteringVisual (Umbriel) hVessel=0x0, hObj=0x4837F98, Vis=0xDAF0748, Rec=0xC8BAA88, Type=4
(163: 2748.7 us)(0xCA0) RegisteringVisual (Titania) hVessel=0x0, hObj=0x4836DD8, Vis=0xE457400, Rec=0xCCAEA28, Type=4
(164: 2633.9 us)(0xCA0) RegisteringVisual (Oberon) hVessel=0x0, hObj=0x4837678, Vis=0xDF79008, Rec=0xD076A28, Type=4
(165: 7772.2 us)(0xCA0) RegisteringVisual (Neptune) hVessel=0x0, hObj=0x48499B0, Vis=0xDF79568, Rec=0xC5149F8, Type=4
(166: 21648.3 us)(0xCA0) RegisteringVisual (Triton) hVessel=0x0, hObj=0x481F4B8, Vis=0xE906548, Rec=0xD44D9F8, Type=4
(167: 1632.3 us)(0xCA0) RegisteringVisual (Proteus) hVessel=0x0, hObj=0x484ABF8, Vis=0xE9068C8, Rec=0xCB46878, Type=4
(168: 1357.2 us)(0xCA0) RegisteringVisual (Nereid) hVessel=0x0, hObj=0x484B2E0, Vis=0xD6FA450, Rec=0xCF82FF0, Type=4
(169: 95.8 us)(0xCA0) Vessel(0x4803E30) ProjectAlpha_ISS has 1 meshes
(170: 3.6 us)(0xCA0) Mesh(0x4991F10) Offset = (0, 0, 0)
(171: 78.2 us)(0xCA0) RegisteringVisual (ISS) hVessel=0x4803E30, hObj=0x4803008, Vis=0xDF798E8, Rec=0xCF08578, Type=10
(172: 150.6 us)(0xCA0) Vessel(0x55C4304) RLM has 4 meshes
(173: 3.6 us)(0xCA0) Mesh(0x4991F10) Offset = (0, 0, 0)
(174: 3.9 us)(0xCA0) Mesh(0x4AC5008) Offset = (0, 0, 0)
(175: 3.1 us)(0xCA0) Mesh(0x4991F10) Offset = (0, 1.55, -0.5)
(176: 3.4 us)(0xCA0) Mesh(0x4991F10) Offset = (0, 1.55, 0.5)
(177: 53.9 us)(0xCA0) RegisteringVisual (LM) hVessel=0x55C4304, hObj=0x4804990, Vis=0xDB309A0, Rec=0xC7CEFF0, Type=10
(178: 296.4 us)(0xCA0) Vessel(0x55C6454) RLM has 4 meshes
(179: 3.1 us)(0xCA0) Mesh(0x4991F10) Offset = (0, 0, 0)
(180: 3.6 us)(0xCA0) Mesh(0x4991F10) Offset = (0, 0, 0)
(181: 3.1 us)(0xCA0) Mesh(0x4991F10) Offset = (0, 1.55, -0.5)
(182: 3.1 us)(0xCA0) Mesh(0x4991F10) Offset = (0, 1.55, 0.5)
(183: 55.3 us)(0xCA0) RegisteringVisual (LM2) hVessel=0x55C6454, hObj=0x4994568, Vis=0x10FD8698, Rec=0xDB70BD8, Type=10
(184: 2.5 us)(0xCA0) ================ clbkCloseSession ===============
(185: 60726.7 us)(0xCA0) Clearing Garbage Collection
(186: 2.5 us)(0xCA0) ================ clbkDestroyRenderWindow ===============
(187: 47598.2 us)(0xCA0) --------------ExitModule------------
(188: 47841.8 us)(0xCA0) Log Closed

Edit 4 : Now that I'm thinking about it, I imported one mesh into another several times, to make sure the two were matching. It's possible the textures references messed up at this point.
 

Attachments

Last edited:
There is some kind of feature that should allow to inherit the texture from a previous stage. The problem could be related in it somehow. Do you know anything about it ?

Code:
// set primary texture -------------------------------------
//
DWORD ti = Grp[g]->TexIdx;
if (ti==SPEC_INHERIT) for (int j=g-1;j>=0;j--) if (Grp[j]->TexIdx!=SPEC_INHERIT) ti=Grp[j]->TexIdx;
Diffuse = Tex[ti];


EDIT: Could you attach the mesh file in your post. It might show what's going on.

---------- Post added at 22:12 ---------- Previous post was at 20:40 ----------

Yes, It looks like the problem must be in the inherit texture/material feature. The default delta-glider mesh will define a material and a texture for every meshgroup. However, the Anim8tor generated mesh will define the used material or a terture only if it's different than in the previous mesh group. I haven't detected anything unusual in the UV coordinates.

I should be able to fix it with the information I have, Thanks.
 
Last edited:
I have rewriten the inheritance code. I don't know any add-ons that will rely on it, so, I haven't been able to test it, could you give it a try.
 
Last edited:
I think some tweaks to the local light source code is order. If you compare the two, you'll notice that the illumination is stronger in bottom screenshot which is from the inline DX7.

Local_light_sources_D3D9_RC17.jpg


Local_light_sources_DX7_Inline.jpg
 
nice, the tiling artifact is fixed.
But what about the ambient lightning? The option in loader still not change the ambient lightning exept for vessels. The planets, moons, still get too much ambient lightning.
 
Doesn't the flags 0x01 and 0x04 conflict with each other ?
I agree. What is the flag for the other mesh? 0x04 or 0x14? Since the double mesh is not apparent in the default renderer, is it resolving the conflict by ignoring 0x04 when 0x01 is set?
 
I agree. What is the flag for the other mesh? 0x04 or 0x14? Since the double mesh is not apparent in the default renderer, is it resolving the conflict by ignoring 0x04 when 0x01 is set?

No, It doesn't appear in the default renderer because the near clipping plane has a distance of 2.5 meters (during exterior pass) and everything within that distance is clipped out. In the D3D9Client the near clipping plane is dynamically adjusted between 0.25 and 3.0 meters (in cockpit views). A change in the rules will make other addons to fail like Space Shuttle Ultra (SSU) which is also using VisMode=0x15 for the payload bay that's visible from the VC through windows.


Here is a mesh list for ShuttleFleet/Atlantis

Mesh(0) VisMode=0x15, Interior mesh as seen from outside through windows. (Should be 0x01 as far as I can tell)
Mesh(1) VisMode=0x01, Exterior mesh.
Mesh(2) VisMode=0x04, Virtual Cockpit interior.

Code:
bool vVessel::Render(LPDIRECT3DDEVICE9 dev, bool internalpass)
{
    bool bCockpit = (oapiCameraInternal() && hObj == oapiGetFocusObject());
    bool bVC = (bCockpit && oapiCockpitMode() == COCKPIT_VIRTUAL);
    
    // Render Exterior and Interior meshes --------------------------------------------
    for (i=0;i<nmesh;i++) {

        WORD vismode = meshlist[i].vismode;
        
        if (vismode==0) continue;

        // Added 3-jan-2011 by jarmonik to prevent VC interior double rendering during exterior and interior passes
        if (vismode==MESHVIS_VC && internalpass==false) continue;

        if (bCockpit) {
            if (internalpass && (vismode & MESHVIS_EXTPASS)) continue;
            if (!(vismode & MESHVIS_COCKPIT)) {
                if ((!bVC) || (!(vismode & MESHVIS_VC))) continue;
            }
        } else {
            if (!(vismode & MESHVIS_EXTERNAL)) continue;
        }
    
        meshlist[i].mesh->Render(dev, pWT, mVP, 0x0);
Code:
 [SIZE=2]#define [/SIZE] [SIZE=2]MESHVIS_NEVER   0x00[/SIZE]   [SIZE=2]Mesh is never visible. 
[/SIZE]  [SIZE=2]#define [/SIZE] [SIZE=2]MESHVIS_EXTERNAL   0x01[/SIZE]   [SIZE=2]Mesh is visible in external views. 
[/SIZE]  [SIZE=2]#define [/SIZE] [SIZE=2]MESHVIS_COCKPIT   0x02[/SIZE]   [SIZE=2]Mesh is visible in internal (cockpit) views. 
[/SIZE]  [SIZE=2]#define [/SIZE] [SIZE=2]MESHVIS_ALWAYS   (MESHVIS_EXTERNAL|MESHVIS_COCKPIT)[/SIZE]   [SIZE=2]Mesh is always visible. 
[/SIZE]  [SIZE=2]#define [/SIZE] [SIZE=2]MESHVIS_VC   0x04[/SIZE]   [SIZE=2]Mesh is only visible in virtual cockpit internal views.  
[/SIZE]  [SIZE=2]#define [/SIZE] [SIZE=2]MESHVIS_EXTPASS   0x10[/SIZE]   [SIZE=2]Visibility modifier: render mesh during external pass, even  for internal views. 
[/SIZE]
 
Last edited:
I have rewriten the inheritance code. I don't know any add-ons that will rely on it, so, I haven't been able to test it, could you give it a try.

Amazing, it works perfectly now ! :thumbup: :tiphat:
 
Great work Jarmonik:thumbup:
If you want, I can make logo or something(2D) for your client:thumbup:
What about advanced graphics module(with atmospheric scattering?).
 
I've just realized that your client makes it possible for me to fly Orbiter under Win7 without framerate falling to 3-6 fps at some ground bases. Thank you, jarmonik, your client is great! :thumbup:

Is it possible to make the additional HUD info of Kulch vessels (http://www.orbithangar.com/searchauth.php?search=kulch) visible under your client?
 
Back
Top