Orbiter-Forum  

Go Back   Orbiter-Forum > Orbiter Space Flight Simulator > Orbiter Visualization Project
Register Blogs Orbinauts List Social Groups FAQ Projects Mark Forums Read

Orbiter Visualization Project Orbiter external graphics development.

Reply
 
Thread Tools
Old 05-25-2017, 07:07 PM   #4366
DaveS
Addon Developer
 
DaveS's Avatar


Default

So I want the radiator panels of the shuttle to reflect with this dark blue color at a high angle and this more neutral white color at low angles. How can I accomplish this with D3D9Client R2? I had this working in an earlier beta of R2 before Felix's reflection map fix was incorporated.
DaveS is offline   Reply With Quote
Old 05-25-2017, 07:50 PM   #4367
Donamy
Beta Tester


Default

It would change color differently, depending on what was being reflected, water, clouds, land or space. I would think.
Donamy is offline   Reply With Quote
Old 05-25-2017, 08:07 PM   #4368
DaveS
Addon Developer
 
DaveS's Avatar


Default

Quote:
Originally Posted by Donamy View Post
 It would change color differently, depending on what was being reflected, water, clouds, land or space. I would think.
True, but right now there's just a very small change between high angles and low angles of reflection. In reality, it should change to very light color at low angles when it is reflecting something dark, like space. This video of the STS-133 R-BAR Pitch Maneuver (RPM) shows the effect very well as the observer position stationary (ISS Lab camera) while the orbiter rotates changing the reflection angle:

DaveS is offline   Reply With Quote
Thanked by:
Old 05-25-2017, 08:25 PM   #4369
Xyon
Puts the Fun in Dysfunctional
 
Xyon's Avatar


Default

Evening folks; at some point soon, I will need to take the my server properly offline for a short while, which will impact your access to the SVN service on it. Would there be a date or time when this would be especially inconvenient?
Xyon is offline   Reply With Quote
Thanked by:
Old 05-25-2017, 08:34 PM   #4370
Donamy
Beta Tester


Default

Quote:
Originally Posted by Xyon View Post
 Evening folks; at some point soon, I will need to take the my server properly offline for a short while, which will impact your access to the SVN service on it. Would there be a date or time when this would be especially inconvenient?
When ever you need too !

Quote:
Originally Posted by DaveS View Post
 True, but right now there's just a very small change between high angles and low angles of reflection. In reality, it should change to very light color at low angles when it is reflecting something dark, like space. This video of the STS-133 R-BAR Pitch Maneuver (RPM) shows the effect very well as the observer position stationary (ISS Lab camera) while the orbiter rotates changing the reflection angle:

[STS-133] RPM (Rendezvous Pitch Maneuver), Last ever for Shuttle Discovery - YouTube


Must be blinding, when it reflects the sun.

Last edited by Donamy; 05-25-2017 at 08:37 PM.
Donamy is offline   Reply With Quote
Old 05-25-2017, 09:13 PM   #4371
DaveS
Addon Developer
 
DaveS's Avatar


Default

Quote:
Originally Posted by Donamy View Post
 Must be blinding, when it reflects the sun.
Nearly so: https://spaceflight.nasa.gov/gallery...2003e13227.jpg

Here's the STS-122 RPM, note the high specular reflection level on the radiator panels:
DaveS is offline   Reply With Quote
Thanked by:
Old 05-25-2017, 10:22 PM   #4372
kuddel
Donator
Default

Quote:
Originally Posted by Xyon View Post
 Evening folks; at some point soon, I will need to take the my server properly offline for a short while, which will impact your access to the SVN service on it. Would there be a date or time when this would be especially inconvenient?
Whenever it is convenient for you is the best time
kuddel is offline   Reply With Quote
Old 05-26-2017, 12:36 PM   #4373
Xyon
Puts the Fun in Dysfunctional
 
Xyon's Avatar


Default

Quote:
Originally Posted by kuddel View Post
 Whenever it is convenient for you is the best time
Quote:
Originally Posted by Donamy View Post
 When ever you need too !
Thanks. I'll put something in Announcements, but I think probably sometime soon, once I have a clear plan in mind.
Xyon is offline   Reply With Quote
Old 05-27-2017, 12:29 PM   #4374
jarmonik
Beta Tester

Default

Quote:
Originally Posted by DaveS View Post
 So I want the radiator panels of the shuttle to reflect with this dark blue color at a high angle and this more neutral white color at low angles. How can I accomplish this with D3D9Client R2? I had this working in an earlier beta of R2 before Felix's reflection map fix was incorporated.
In the "dark blue" photo, the radiators are fully lit by the sun light and they are reflecting nothing (just empty space). So, that photo should show a true diffuse color of the radiators and that's pretty much what the diffuse texture should be. On the other hand, in the "natural white" photo, the reflected color is pretty close to the color of the Earth that's being reflected. A viewing angle does have an effect to the reflected image (intensity, sharpness) but that's starting to become noticeable below 20 deg. So, neither photo should be effected by viewing angle dependencies.

A few words about the "Felix's Fix". If you create a gold foil texture for the DX7 inline engine, that texture would have pretty bright gold color applied to it. That's pretty much it when a renderer doesn't support reflections. However, in a reflective environment a diffuse color of a gold foil would need to be close to a black. And that's because of an energy conservation, if 75% of incoming light is reflected then only 25% of the incoming light can go through diffuse scattering. One purpose of the "Felix's Fix" is to avoid a need of a separate diffuse textures for DX7 and DX9, and an other is to prevent over powering/saturating the reflections.

The equation:
cDiff.rgb *= (1.0f - fRefl);

Will shift the color of the diffuse texture towards a black when the reflectivity "fRefl" increases. You didn't tell what's wrong with the current rendering of the radiators. But I would assume the color to be too dark. If the diffuse texture has the color and intensity shown in the "dark blue" photo then the "Felix's Fix" correction factor would not be needed and it's darkening something that's already correct.

There are a few quick tests you could try:

Remove/Comment out the line 365 from the PBR.fx:
//cDiff.rgb *= (1.0f - fTot);

If that doens't help then you could try to alter the line 369 to this:
cDiff.rgb *= (1.0f - fRefl*fRefl);

You can alter the brightness of the diffuse texture from the D3D9Mesh debugger by using "Tune Albedo" property but that will of-course effect to the whole texture not just the selected group. "Tune X" features works only when the mesh debugger is open. Currently the diffuse material property can't be adjusted above above 1.0.

A few notes:
- It would be good idea to ask Felix's opinion about this.
- Fresnel behavior is not yet implemented and few other issues are still open.
- I am further looking into this matter.
- Might be good idea to wait a little with major texture works. Small changes in the rendering behavior can happen.

Last edited by jarmonik; 05-27-2017 at 12:34 PM.
jarmonik is offline   Reply With Quote
Thanked by:
Old 05-27-2017, 12:50 PM   #4375
DaveS
Addon Developer
 
DaveS's Avatar


Default

Quote:
Originally Posted by jarmonik View Post
 In the "dark blue" photo, the radiators are fully lit by the sun light and they are reflecting nothing (just empty space). So, that photo should show a true diffuse color of the radiators and that's pretty much what the diffuse texture should be. On the other hand, in the "natural white" photo, the reflected color is pretty close to the color of the Earth that's being reflected. A viewing angle does have an effect to the reflected image (intensity, sharpness) but that's starting to become noticeable below 20 deg. So, neither photo should be effected by viewing angle dependencies.

A few words about the "Felix's Fix". If you create a gold foil texture for the DX7 inline engine, that texture would have pretty bright gold color applied to it. That's pretty much it when a renderer doesn't support reflections. However, in a reflective environment a diffuse color of a gold foil would need to be close to a black. And that's because of an energy conservation, if 75% of incoming light is reflected then only 25% of the incoming light can go through diffuse scattering. One purpose of the "Felix's Fix" is to avoid a need of a separate diffuse textures for DX7 and DX9, and an other is to prevent over powering/saturating the reflections.

The equation:
cDiff.rgb *= (1.0f - fRefl);

Will shift the color of the diffuse texture towards a black when the reflectivity "fRefl" increases. You didn't tell what's wrong with the current rendering of the radiators. But I would assume the color to be too dark. If the diffuse texture has the color and intensity shown in the "dark blue" photo then the "Felix's Fix" correction factor would not be needed and it's darkening something that's already correct.

There are a few quick tests you could try:

Remove/Comment out the line 365 from the PBR.fx:
//cDiff.rgb *= (1.0f - fTot);

If that doens't help then you could try to alter the line 369 to this:
cDiff.rgb *= (1.0f - fRefl*fRefl);

You can alter the brightness of the diffuse texture from the D3D9Mesh debugger by using "Tune Albedo" property but that will of-course effect to the whole texture not just the selected group. "Tune X" features works only when the mesh debugger is open. Currently the diffuse material property can't be adjusted above above 1.0.

A few notes:
- It would be good idea to ask Felix's opinion about this.
- Fresnel behavior is not yet implemented and few other issues are still open.
- I am further looking into this matter.
- Might be good idea to wait a little with major texture works. Small changes in the rendering behavior can happen.
Thanks for the lay down on how the reflections work. Right now the problem is that the "natural" top-down reflection color is just too dark. This is the main diffuse texture of the texture and as you can see, the radiator panels are painted in the correct dark blue color but yet, they appear pitch black in-sim.
. I tried both fixes but none really had any effect. Which map of the roughness map controls the gamma channel? The diffuse map or the alpha map?

Last edited by DaveS; 05-27-2017 at 12:52 PM.
DaveS is offline   Reply With Quote
Old 05-27-2017, 01:30 PM   #4376
jarmonik
Beta Tester

Default

Quote:
Originally Posted by DaveS View Post
 Which map of the roughness map controls the gamma channel? The diffuse map or the alpha map?
I don't understand the question.

In the "Tune X" debug controls, the gamma field is used to apply a gamma curve into the texture's RGB data channels. The gamma control, along side by side with the RGB brightness control allows to adjust texture contrast.

The "Tune _Spec" doesn't have gamma control. The last field controls the specular power value. Which in SSU case will specify the roughness value for reflection blurriness. Since, no additional _rghn map is specified.

If _rghn map is specified, then the roughness value comes from the green color channel because the DXT1 compression quality is best for the green channel.

There doesn't exists a texture that would have a per pixel gamma value.
jarmonik is offline   Reply With Quote
Old 05-27-2017, 01:38 PM   #4377
DaveS
Addon Developer
 
DaveS's Avatar


Default

Quote:
Originally Posted by jarmonik View Post
 I don't understand the question.

In the "Tune X" debug controls, the gamma field is used to apply a gamma curve into the texture's RGB data channels. The gamma control, along side by side with the RGB brightness control allows to adjust texture contrast.

The "Tune _Spec" doesn't have gamma control. The last field controls the specular power value. Which in SSU case will specify the roughness value for reflection blurriness. Since, no additional _rghn map is specified.

If _rghn map is specified, then the roughness value comes from the green color channel because the DXT1 compression quality is best for the green channel.

There doesn't exists a texture that would have a per pixel gamma value.
I have converted the SSU payload bay textures to use the PBR engine after reading the D3D9Client guide. After that final piece of information the roughness texture, I think I have gotten the textures just right.
DaveS is offline   Reply With Quote
Old 05-27-2017, 01:39 PM   #4378
jarmonik
Beta Tester

Default

Quote:
Originally Posted by DaveS View Post
 Thanks for the lay down on how the reflections work. Right now the problem is that the "natural" top-down reflection color is just too dark.
The reflection intensity in _refl map could be too high. Which would take down the diffuse color down to zero (black).

Also, because of the diffuse texture attenuation towards black (Felix's Fix), the diffuse texture would need to have brighter color for the radiators. Maybe 2-4 times brighter.

Well, maybe we could have on/off switch for the attenuation or something...
jarmonik is offline   Reply With Quote
Old 05-27-2017, 01:53 PM   #4379
DaveS
Addon Developer
 
DaveS's Avatar


Default

Quote:
Originally Posted by jarmonik View Post
 The reflection intensity in _refl map could be too high. Which would take down the diffuse color down to zero (black).
That was part of the problem, the reflection intensity was too high as determined by playing with the tuning utility. I also decreased the green channel of the roughness texture, once again determined by tuning utility of D3D9Client.
DaveS is offline   Reply With Quote
Thanked by:
Reply

  Orbiter-Forum > Orbiter Space Flight Simulator > Orbiter Visualization Project

Tags
d3d9client, graphicsclient


Thread Tools

Posting Rules
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Jump


All times are GMT. The time now is 07:39 AM.

Quick Links Need Help?


About Us | Rules & Guidelines | TOS Policy | Privacy Policy

Orbiter-Forum is hosted at Orbithangar.com
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright 2007 - 2012, Orbiter-Forum.com. All rights reserved.