New Release D3D9Client Development

DaveS

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Feb 4, 2008
Messages
9,434
Reaction score
689
Points
203
In this experiment Earth shine comes from the environment map (reflection map) which can contain parts of the vessel itself lit by local lights. If the "FullScene" option is selected. So, through the env map local lights can contribute to global ambient light. This experiment would still require some work to get it to behave properly.
I understand. Another local light question which I brought up earlier: is there any way to get rid of the fogginess of local lights using the metalness shader? I've attached a photo from STS-133 with a comparison screenshot taken from a similar position and angle. As you can probably tell, the lights in D3D9Client has a very foggy look to them, while the ones in the real photo are clear.

The screenshot has reflections disabled.
 

Attachments

  • s133e011365.jpg
    s133e011365.jpg
    1.8 MB · Views: 35
  • s133e011365_comparison.jpg
    s133e011365_comparison.jpg
    1.7 MB · Views: 34
Last edited:

jarmonik

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 28, 2008
Messages
2,666
Reaction score
795
Points
128
I understand. Another local light question which I brought up earlier: is there any way to get rid of the fogginess of local lights using the metalness shader? I've attached a photo from STS-133 with a comparison screenshot taken from a similar position and angle. As you can probably tell, the lights in D3D9Client has a very foggy look to them, while the ones in the real photo are clear.
Do you mean the camera at the end of the robotic arm ? That's a result from the "Light Glow" post processing. The purpose is to make the light look brighter but in that particular case it doesn't work too well, so, some shader calibrations are required. What would happen if the light attenuation parameter att0 is set somewhere between 0.25 and 1.0 that should make the light less bright from a such a close range.

s1-jpg.24201
 

DaveS

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Feb 4, 2008
Messages
9,434
Reaction score
689
Points
203
Do you mean the camera at the end of the robotic arm ? That's a result from the "Light Glow" post processing. The purpose is to make the light look brighter but in that particular case it doesn't work too well, so, some shader calibrations are required. What would happen if the light attenuation parameter att0 is set somewhere between 0.25 and 1.0 that should make the light less bright from a such a close range.
Well, that and the PLB flood lights. If you look closely, you can see the detail of the PLB vent filter screens and the PLB itself is almost washed out. I think the attached screenshot shows it pretty well.
 

Attachments

  • D3D9Client_new_shader8.jpg
    D3D9Client_new_shader8.jpg
    942.5 KB · Views: 21

Felix24

Active member
Joined
May 13, 2010
Messages
245
Reaction score
95
Points
43
Well, that and the PLB flood lights. If you look closely, you can see the detail of the PLB vent filter screens and the PLB itself is almost washed out. I think the attached screenshot shows it pretty well.
I think the washed-out effect is from the light beams simply adding together where they are overlapping. This addition doesn't seem to be gamma-correct (I think it's gamma, correct me if I'm wrong). To our eyes, two overlapping lights of the same brightness don't look twice as bright, but more like 1.5 times as bright. Something like that.

Or, maybe the brightness falloff with distance from the light source is incorrect?
 

DaveS

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Feb 4, 2008
Messages
9,434
Reaction score
689
Points
203
I think the washed-out effect is from the light beams simply adding together where they are overlapping.
No such luck as shown by the attached screenshot where only one light is active.
 

Attachments

  • D3D9Client_new_shader8B.jpg
    D3D9Client_new_shader8B.jpg
    559.6 KB · Views: 20

DaveS

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Feb 4, 2008
Messages
9,434
Reaction score
689
Points
203
Another issue with the new metalness shader, the ODS isn't lit up by the PLB flood lights for whatever reason.
 

Attachments

  • D3D9Client_new_shader9.jpg
    D3D9Client_new_shader9.jpg
    1.7 MB · Views: 15

DaveS

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Feb 4, 2008
Messages
9,434
Reaction score
689
Points
203

jarmonik

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 28, 2008
Messages
2,666
Reaction score
795
Points
128
Another issue with the new metalness shader, the ODS isn't lit up by the PLB flood lights for whatever reason.
If you play around with the material setup does it remain unlit ?
 

DaveS

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Feb 4, 2008
Messages
9,434
Reaction score
689
Points
203
If you play around with the material setup does it remain unlit ?
Yes. Just to clear up any confusion, both the airlock (illuminated bottom part) and the ODS (unilluminated part) itself are using the exact same settings and shader (Metalness).
 

N_Molson

Addon Developer
Addon Developer
Donator
Joined
Mar 5, 2010
Messages
9,286
Reaction score
3,255
Points
203
Location
Toulouse
Just a thought I had :

Would it be possible to add some dynamic pressure effects through the client ? I have something like KSP on mind, a white-ish transparent shell with a moving texture around the mesh to simulate condensation effects that happen when the aerodynamic load is high. It could be used for reentry effects too (as in KSP).

I get we can use particle streams for all that stuff, but the render is so-so and is "getting old".

D-Q0N9aXkAI8WR5.jpg
 

kuddel

Donator
Donator
Joined
Apr 1, 2008
Messages
2,064
Reaction score
507
Points
113
A graphics client has no sense of "velocity" (or at least it should not have ;) ), so an additional API would be needed.
I don't think that this should be handled by a graphic client.
A C++ library (template or a "recipe") that uses the vessels geometry and velocity information to "prepare" the best data for the graphic client - that wold be my wish...
A special shader implementation to assist however, is something a graphic client should provide.
 

kuddel

Donator
Donator
Joined
Apr 1, 2008
Messages
2,064
Reaction score
507
Points
113
The current clbkCreateReentryStream(...) callback (the logic when it is called is handled by Orbiter core)
might get a brother like clbkCreateBowshockStream(...), but that is something the core has to provide,
so it's not something we can expect to work for Orbiter 2016...

So, a well-tuned C++ code using only clbkCreateParticleStream(...) etc. would be the preferred way for now.

Does anyone have a nice example (-code) of a well done dynamic pressure effect?
 

kuddel

Donator
Donator
Joined
Apr 1, 2008
Messages
2,064
Reaction score
507
Points
113
While I was thinking about it, ...let me wish ;)

Something like a generic header/source combo that might look a bit like this:

C++:
enum GeneralShape {
  CYLINDRICAL, ///< like "regular" rockets (e.g. Saturn V)
  SPHERICAL,   ///< like e.g. Soyuz
  WEDGE,       ///< like the e.g. the DeltaGlider or the Space Shuttle Orbiter
  CUBOID        ///< like a brick ;)
};

/// Interpolation between start and end:
enum Timing { LINEAR, LOGARITHMIC, SQUARE, CUBICAL };

struct ShockParam {
  GeneralShape shape;            ///< mainly for "cross section" in direction of travel
  VECTOR3      offset;           ///< offset from Vessels CoG (default to {0,0,0})
  double       dynPressureStart; ///< dynamic pressure [Pa] when effect should start
  double       dynPressureEnd;   ///< dynamic pressure [Pa] when effect should stop (bigger than 'start')
  Timing       progress;         ///< "Timing" is not the right word here, but...
  short        osc;              ///< oscillating frequency [Hz] for pulsing effect (default: 0 a.k.a "off")
  //...
};

// To be called once at initialization
HANDLE CreateDynamicPressureEffect(ShockParam p);

// Called every Nth timestep
void RenderDynamicPressureEffect(const OBJHANDLE hVessel, const HANDLE &sph);

// ...
// which does something like:
//   if ( !isInAtmosphere(vessel) || standsStill || ... ) return; // quickly deduce if we can return as soon as possible
//
//   if (vessel->GetDynPressure() BETWEEN (dynPressureStart, dynPressureEnd) )
//   {
//     InterOrExtrapolate(progress) => call whatever is needed to render nicely ;)
//   }

this is of course not thought through in every detail.
Just a little brainstorming on my side while watching the SLS test fire :D
 

DaveS

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Feb 4, 2008
Messages
9,434
Reaction score
689
Points
203
I can happily report that revision 1381 which was checked in earlier this afternoon, resolves all the issues with local lights I have previously reported. Everything looking proper now with the metalness shader and local lights. The only thing missing with local lights now are self-shadows. And if you could get multi-cam reflections going, then we're in business.
 

Attachments

  • D3D9Client_new_shader10.jpg
    D3D9Client_new_shader10.jpg
    868.6 KB · Views: 26

DaveS

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Feb 4, 2008
Messages
9,434
Reaction score
689
Points
203
First time I noticed this (purple color of the orbiter during sunrise):
 

Attachments

  • D3D9Client_weird_sunrise_color.jpg
    D3D9Client_weird_sunrise_color.jpg
    1.2 MB · Views: 27

jarmonik

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 28, 2008
Messages
2,666
Reaction score
795
Points
128
Kuddel, There is something very wrong in the 1382 commit. I am not an expert on SVN, so, how is one supposed to undo a commit ?

  • DeltaGliders virtual cockpit is completely broken, Broken Horizon, switches/animations not moving, pilots head visible from inside, texts and labels missing, etc...
  • The "Pick" feature isn't working
  • Lots of CTDs

How does the "nullptr" differ from regular "NULL" we have use so-far ?
 

jarmonik

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 28, 2008
Messages
2,666
Reaction score
795
Points
128
There is one shader file missing from r. 1381 Place it in Modules/D3D9Client/
 

Attachments

  • IrradianceInteg.zip
    738 bytes · Views: 2
Top