NVIDIAGameWorks / rtx-remix

Combined repo for the RTX-Remix runtime
https://www.nvidia.com/en-us/geforce/rtx-remix/
MIT License
1.37k stars 69 forks source link

[Toolkit feature]: Displacement Default Scale Too Large #520

Open FreedomsFlame opened 4 months ago

FreedomsFlame commented 4 months ago

Contact Details (Optional)

No response

What is the context of the feature/improvement?

When replacing materials, the default scale for Displacement is far too high (by about two orders of magnitude).

Default ( 1 ) Default Scale Correct Scale ( .01 ) Correct Scale

Please describe the feature/improvement?

Reduce the default scale so that the values are more usable. Set '1' to equal what is currently '.01'.

What would be your solution? (optional)

...

Version

2024.3.1

automata-rtx commented 4 months ago

Me and many artists working on Remix have also found this to be the case. The default value of "1" is so extreme that it's unusable in all typical use-cases, no exceptions. The idea values for natural looking displacement is almost always 0.01 to 0.1. I propose that the default be dramatically lowered. I believe the current 0.05 value should be the default "1" value, with space to adjust up and down from there.

As a personal anecdote, the last material I added to my project looks best at 0.1, but most heightmaps I have are set to 0.02 to 0.05

MarkEHenderson commented 4 months ago

[REMIX-3112] for tracking.

Just as an FYI, the displace_in value is actually something you should be calculating based on the values used to create the heightmap. It represents the ratio of the width of the UV space (i.e. how wide the texture is if you draw the entire texture on a flat quad) to how deep it will be. If the texture is displayed as 1 meter wide, then a displace_in value of 1 means the POM will be at most 1 meter deep. A displace_in value of 0.1 means that same 1 meter wide quad can be at most 0.1 meters deep.

If you're using Substance Painter with the default 100x100 preview quad, then displace_in should just be Substance Painter's Height Scale attribute divided by 100.

automata-rtx commented 4 months ago

[REMIX-3112] for tracking.

Just as an FYI, the displace_in value is actually something you should be calculating based on the values used to create the heightmap. It represents the ratio of the width of the UV space (i.e. how wide the texture is if you draw the entire texture on a flat quad) to how deep it will be. If the texture is displayed as 1 meter wide, then a displace_in value of 1 means the POM will be at most 1 meter deep. A displace_in value of 0.1 means that same 1 meter wide quad can be at most 0.1 meters deep.

If you're using Substance Painter with the default 100x100 preview quad, then displace_in should just be Substance Painter's Height Scale attribute divided by 100.

In that case it makes the most sense to me to make the value cm by default. I don't see any artists making heightmaps a meter deep, so I think it should be centered around the most common usecase instead

MarkEHenderson commented 4 months ago

In that case it makes the most sense to me to make the value cm by default. I don't see any artists making heightmaps a meter deep, so I think it should be centered around the most common usecase instead

The value is a ratio, not a distance. The same texture can be used at different scales across a game, and we want to keep the aspect ratio of the map a constant. If you make a hemisphere with the heightmap, it still look like a hemisphere if the texture is rendered on a 1x1 quad or a 100x100 quad.

I do agree with you that the default values and range for it should be more reasonable, but to avoid invalidating existing assets we'll probably solve this by modifying the slider's range.