New Release D3D9Client Development

Felix24

Active member
Joined
May 13, 2010
Messages
245
Reaction score
95
Points
43
I was also experimenting with the heat effect and came up with this, it's different but can't say if it's better or worse.
Code:
// Fetch Heat map
//
if (gCfg.Heat) {
    float fH = (gMtrl.specialfx.x * gMtrl.specialfx.x * gMtrl.specialfx.x);
    float iH = 1.0f / max(fH, 0.001f);
    fHeat = pow(abs(tex2D(HeatS, frg.tex0.xy).g), iH) * pow(abs(fH), 0.02f * iH);
}
else fHeat = (gMtrl.specialfx.x * gMtrl.specialfx.x * gMtrl.specialfx.x);

Interesting. It looks decent when I test it. If I were to change it, I would only change the fHeat line to this. It makes the hotspots not heat up quite so quickly relative to the cooler areas.
fHeat = pow(abs(tex2D(HeatS, frg.tex0.xy).g), iH) * pow(abs(fH), 0.1f * iH);

Is there a risk of it being too computationally intensive?

And thanks for adding the ability to reload textures! This will be a huge time-saver. I'm not connected to the SVN repository, so will you upload it soon to http://users.kymp.net/~p501474a/D3D9Client/ ?
 

jarmonik

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 28, 2008
Messages
2,651
Reaction score
785
Points
128
And thanks for adding the ability to reload textures! This will be a huge time-saver. I'm not connected to the SVN repository, so will you upload it soon to http://users.kymp.net/~p501474a/D3D9Client/ ?
Sorry, I though you were able to compile the client. I have upload a new beta on the project site.

Is there a risk of it being too computationally intensive?

It shouldn't be a problem. The pow(abs(fH), 0.1f * iH) is actually a constant so pre-shader should take care of that. But "heat" effect is your work so it's up to you how you want it to work.
 

Felix24

Active member
Joined
May 13, 2010
Messages
245
Reaction score
95
Points
43
The Reload Textures button doesn't work for normal textures, but only for the heatmap texture. Can it reload all of a vessel's textures?

Edit:
There's some other weird stuff happening that may be the root cause. I changed the base Shuttle texture, saved and clicked Reload Textures, but nothing changed. I then completely restarted Orbiter, but the Shuttle still was using the old texture, which seems impossible.

Then I tried modifying and resaving the heatmap texture, and the Reload Textures button updated that one correctly, but the base texture was still showing the old one.

Anyone have any idea what I did wrong? How can the base texture still show the same thing after being modified and restarting Orbiter?
 
Last edited:

jedidia

shoemaker without legs
Addon Developer
Joined
Mar 19, 2008
Messages
10,842
Reaction score
2,105
Points
203
Location
between the planets
How can the base texture still show the same thing after being modified and restarting Orbiter?
The textures are referenced in the mesh file, so unless D3D9client changes those (which could be considered rude), that sounds like expected behavior.
 

jarmonik

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 28, 2008
Messages
2,651
Reaction score
785
Points
128
The Reload Textures button doesn't work for normal textures, but only for the heatmap texture. Can it reload all of a vessel's textures?
Orbiter, but the Shuttle still was using the old texture, which seems impossible.
It should reload all textures. But there are some exceptions like if a texture is modified by a Sketchpad or by oapiBlt(), then the reload is disabled.
The anomaly with a stock Atlantis is likely due to base texture being loaded from "Textures2" folder.
 

Felix24

Active member
Joined
May 13, 2010
Messages
245
Reaction score
95
Points
43
The anomaly with a stock Atlantis is likely due to base texture being loaded from "Textures2" folder.
I bet that's the problem- I was only editing the one in the "Textures" folder. Thanks! ?‍♂️
 

Felix24

Active member
Joined
May 13, 2010
Messages
245
Reaction score
95
Points
43
So, can you make the modifications to the shader ? I have included a new binary that enables the specular map for the shader.
Here's the shader with modifications, attached as a zip file. I duplicated and modified the existing lighting implementation. Changes are clearly marked in the shader.

If no spec texture is present, all lighting effects are generated using diffuse, metal, and rghn, like normal.
If a spec texture is present, a new lighting effect is added which is independent of diffuse, metal, and rghn.

It also shines (haha) when used for bare metal foil surfaces like Hubble. Image with brighter metal is with spec.
 

Attachments

  • Metalness.zip
    4.2 KB · Views: 10
  • hubble1.jpg
    hubble1.jpg
    399.4 KB · Views: 44
  • hubble2.jpg
    hubble2.jpg
    417.9 KB · Views: 46

DaveS

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Feb 4, 2008
Messages
9,429
Reaction score
680
Points
203
I think this is the right thread to report this in. I've noticed something ever since I installed this add-on: Boca Chica Base and that is that the terrain at KSC/CCAFS has vanished and the surface textures is vibrating like crazy. If I disable terrain flattening, everything is as it should be. Re-enable terrain flattening and the issue is back.

Orbiter is 2016 release with D3D9Client R.4.19.
 

jarmonik

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 28, 2008
Messages
2,651
Reaction score
785
Points
128
Here's the shader with modifications, attached as a zip file. I duplicated and modified the existing lighting implementation. Changes are clearly marked in the shader.
Sorry about the delay. I have now uploaded the modification into the SVN. Yes, the one with a specular map does indeed look much better. Thanks about that.

If nobody oppose, I will remove the "Specular" shader intended for a typical specular PBR workflow just to simplify things and reduce work load.
 

jarmonik

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 28, 2008
Messages
2,651
Reaction score
785
Points
128
I think this is the right thread to report this in. I've noticed something ever since I installed this add-on: Boca Chica Base and that is that the terrain at KSC/CCAFS has vanished and the surface textures is vibrating like crazy. If I disable terrain flattening, everything is as it should be. Re-enable terrain flattening and the issue is back.
Orbiter is 2016 release with D3D9Client R.4.19.

Is anyone else able to reproduce that ? Is there a problem in the client or is this something else ?
 

Face

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 18, 2008
Messages
4,390
Reaction score
577
Points
153
Location
Vienna
I think this is the right thread to report this in. I've noticed something ever since I installed this add-on: Boca Chica Base and that is that the terrain at KSC/CCAFS has vanished and the surface textures is vibrating like crazy. If I disable terrain flattening, everything is as it should be. Re-enable terrain flattening and the issue is back.

Is the addon *.flt file the only one in the /Textures/Earth/Flat/ directory? If not, could it be that another file is present that changes the KSC area?
 

DaveS

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Feb 4, 2008
Messages
9,429
Reaction score
680
Points
203
Is the addon *.flt file the only one in the /Textures/Earth/Flat/ directory? If not, could it be that another file is present that changes the KSC area?
Only file in there.
 

Nikogori

Donator
Donator
Joined
Mar 14, 2015
Messages
235
Reaction score
92
Points
43
Location
Osaka
Website
orbinautjp.github.io
I've seen "surface texture vibration" in multiple scenarios, too. Terrain flattening is enabled.
Usually it disappears when I zoom out and zoom in. (using mouse wheel)
 

DaveS

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Feb 4, 2008
Messages
9,429
Reaction score
680
Points
203
I got this weird difference in shading on the SRM segments. The shader is Metalness and I have the Light glow post-processing selected. Again, this with D3D9Client R4.19 and Orbiter 2016.
 

Attachments

  • D3D9Client_different_shading_on_SRM_segments.jpg
    D3D9Client_different_shading_on_SRM_segments.jpg
    877.7 KB · Views: 35

Donamy

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Oct 16, 2007
Messages
6,904
Reaction score
196
Points
138
Location
Cape
looks like messed up vertices.
 

jarmonik

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 28, 2008
Messages
2,651
Reaction score
785
Points
128
I got this weird difference in shading on the SRM segments. The shader is Metalness and I have the Light glow post-processing selected. Again, this with D3D9Client R4.19 and Orbiter 2016.

I have uploaded R4.20 does that fix the issue there ?
Also, I tested the Boca Chica base and couldn't detect any flickering issues.
 

DaveS

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Feb 4, 2008
Messages
9,429
Reaction score
680
Points
203
I have uploaded R4.20 does that fix the issue there ?
Also, I tested the Boca Chica base and couldn't detect any flickering issues.
The issue remains with R4.20. And the terrain and flickering problems are at KSC with the BC add-on installed.
 

jarmonik

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 28, 2008
Messages
2,651
Reaction score
785
Points
128
Looks like the SRM is composed from a several independent mesh segments, so, are there simply different settings applied to a different segments ? I couldn't see anything unusual when tested material settings there.
 

DaveS

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Feb 4, 2008
Messages
9,429
Reaction score
680
Points
203
The problem with the SRMs seems to be gone now after I deleted the original GC cfgs for them and re-set up the materials.
 
Top