New Release D3D9Client Development

jarmonik

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 28, 2008
Messages
2,339
Reaction score
381
Points
83
Website
users.kymp.net
Let's check if the sheen really comes from the Ambient (indirect) light. So, could you add line 266 "cAmbient = length(cAmbient)" in metalness.fx and see if the sheen has disappeared.

Code:
    // Apply base ambient light
    cAmbient = max(cAmbient, gSun.Ambient);
    cAmbient = length(cAmbient);
#else
 

DaveS

Space Shuttle Ultra Project co-developer
Addon Developer
Donator
Beta Tester
Joined
Feb 4, 2008
Messages
9,158
Reaction score
421
Points
173
Let's check if the sheen really comes from the Ambient (indirect) light. So, could you add line 266 "cAmbient = length(cAmbient)" in metalness.fx and see if the sheen has disappeared.

Code:
    // Apply base ambient light
    cAmbient = max(cAmbient, gSun.Ambient);
    cAmbient = length(cAmbient);
#else
Added line 266 to Metalness.fx and this is the result.
 

Attachments

  • SRMS_metalness_modified.jpg
    SRMS_metalness_modified.jpg
    63.8 KB · Views: 19

jarmonik

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 28, 2008
Messages
2,339
Reaction score
381
Points
83
Website
users.kymp.net
I have uploaded a new version. Could you check if the sheen and frame rate issues are fixed.
 

DaveS

Space Shuttle Ultra Project co-developer
Addon Developer
Donator
Beta Tester
Joined
Feb 4, 2008
Messages
9,158
Reaction score
421
Points
173
Frame rate issue with shadows: Not fixed. Getting the same FPS no matter what ShadowMapSize in D3D9Client.cfg is set to.
Metalness shader issue: Fixed.
 

DaveS

Space Shuttle Ultra Project co-developer
Addon Developer
Donator
Beta Tester
Joined
Feb 4, 2008
Messages
9,158
Reaction score
421
Points
173
Another issue: I decided to change the SRBs over to the Metalness shader (they're D6AC steel tubes after all) but only the aft segments are rendered using the Metalness shader as shown in the included screenshots. The weird thing is that they're rendered just fine when the D3D9Client Debug Controls window is open, screenshot showing this is attached.
 

Attachments

  • Metalness_shader_not_applied.jpg
    Metalness_shader_not_applied.jpg
    65.5 KB · Views: 30
  • Metalness_shader_applied.jpg
    Metalness_shader_applied.jpg
    73.9 KB · Views: 32

jarmonik

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 28, 2008
Messages
2,339
Reaction score
381
Points
83
Website
users.kymp.net
Another issue: I decided to change the SRBs over to the Metalness shader (they're D6AC steel tubes after all) but only the aft segments are rendered using the Metalness shader as shown in the included screenshots. The weird thing is that they're rendered just fine when the D3D9Client Debug Controls window is open, screenshot showing this is attached.
The shader needs to be applied to each mesh separately, it's likely that the segments are separate meshes not just mesh groups.
 

DaveS

Space Shuttle Ultra Project co-developer
Addon Developer
Donator
Beta Tester
Joined
Feb 4, 2008
Messages
9,158
Reaction score
421
Points
173
The shader needs to be applied to each mesh separately, it's likely that the segments are separate meshes not just mesh groups.
Sorry for the late reply, but this is correct. In SSU the SRBs are made up of separate individual meshes, rather than a single mesh group for the entire thing, this is to enable stacking of the individual SRB elements in the VAB (KSC) or directly on the Launch Mount (Vandenberg).

Is there anything that could be done or is it a limitation of D3D9Client?
 

jarmonik

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 28, 2008
Messages
2,339
Reaction score
381
Points
83
Website
users.kymp.net
Is there anything that could be done or is it a limitation of D3D9Client?
That's how it's designed to work. It would be possible to control a shader in per mesh group basis but that would be headache for developers due to insufficient tools and large amount of groups. So, per mesh basis is chosen as compromise between per vessel and per group basis.

Is there a problem ?
 

DaveS

Space Shuttle Ultra Project co-developer
Addon Developer
Donator
Beta Tester
Joined
Feb 4, 2008
Messages
9,158
Reaction score
421
Points
173
This is how the SRBs are set up mesh-wise:

Code:
            hSRMSegmentMesh[0] = oapiLoadMeshGlobal("SSU/STS1_LSRB_aft_segment");
            hSRMSegmentMesh[1] = oapiLoadMeshGlobal("SSU/STS1_LSRB_aft_center_segment");
            hSRMSegmentMesh[2] = oapiLoadMeshGlobal("SSU/STS1_LSRB_fwd_center_segment");
            hSRMSegmentMesh[3] = oapiLoadMeshGlobal("SSU/STS1_LSRB_fwd_segment");
            hSRMSegmentMesh[4] = oapiLoadMeshGlobal("SSU/STS1_LSRB_fwd_skirt_assy");

As you can see, the SRB is multi-mesh vessel. And yes, the each SRB is a separate vessel with a common module. The entire Space Shuttle is made of separate vessels (Orbiter, External Tank, Left SRB and Right SRB) held together by attachment points. When it is time to jettison we simply send a command through the OAPI to detach and Orbiter handles the rest.
 

GLS

Well-known member
Orbiter Contributor
Addon Developer
Joined
Mar 22, 2008
Messages
4,560
Reaction score
784
Points
138
So I'm doing some early playing with the "advanced D3D9" materials and textures and I have some questions:
  • there are different lists of "*_abcd.dds" textures in the D3D9Client.pdf and in the D3D9GraphicsGuide.pdf docs... is one of them incomplete, old info or something else?
  • I assume that the textures serve to provide per-pixel "material control" (e.g., shiny bolts on a dull surface, without the need to have separate meshes and materials). If I'm correct, is there a list or table to relate the textures to the materials? Also, does the presence of a texture override the corresponding material?
  • in the Advanced control window there are materials starting with an underscore, what do they control?
  • the material indexes in the GC/vessel.cfg folder files, they are 0-based as opposed to the 1-based indexes in the meshes, right?
 

TCR_500

Developer of Solar Lander
Joined
Mar 3, 2009
Messages
631
Reaction score
36
Points
28
Website
www.tchapman500.com
I cannot get the DX9 client to work with Orbiter Beta (x64 release build). Also, the repository fails to build.
 
Top