rtx-remix icon indicating copy to clipboard operation
rtx-remix copied to clipboard

[Runtime Bug]: Transluscent shader not behaving correctly until clip distance is small.

Open Safemilk opened this issue 8 months ago • 5 comments

Describe the bug

While in the runtime, transluscent shader materials behave differently after 1.0.0

They will behave as mostly opaque until the camera flies extremely close to them, then they will start to look like they do in the Remix Toolkit.

How do you reproduce the bug?

Setup a material to be a high IOR transluscent material, IOR of 3 or 4 etc.

Add the diffuse as a transmission material.

Note it's appearance in the toolkit.

Load up the runtime and view the object.

Now move the camera extremely close to the object and notice the correct rendering clip inward.

What is the expected behavior?

The runtime should render the correct translucence at all distances from the camera as it did before the 1.0.0 updates

Version

1.0.0

Logs

No response

Crash dumps

No response

Media

Image

Upon pulling the camera away from the object: Image

Safemilk avatar Mar 29 '25 19:03 Safemilk

Worth noting a IoR of 3 or 4 is pretty much an incorrect value to begin with for modeling realistic materials, diamonds which have pretty much the highest IoR of most natural materials have an IoR of 2.4 and you won't find anything beyond 3 or less than 1 on a translucent material outside of very unusual edge cases.

Remix as such only supports IoR values in the range [1, 3], values outside that range are undefined behavior which is likely causing the issues you're seeing. The Translucent MDL used in the toolkit has a hard limit on that range to try and prevent values beyond that, so I am not sure why it lets you set that value, probably just a quirk of Omniverse.

It still probably shouldn't allow that though, so I'll consider this a toolkit bug not a runtime one, as the runtime is behaving more or less "as expected" here. The runtime still could probably handle this case better, I assume there's some difference in the value being sanitized between it being loaded by the runtime from USD vs provided via the Remix API when used in the toolkit which would explain the difference in behavior you're seeing, but it is outside the expected range so it's not really expected to work properly at least.

anon-apple avatar Mar 31 '25 18:03 anon-apple

@anon-apple I should have phrased this differently, I used 3 or 4 to illustrate the issue as it's more obvious. Clamping the values in the toolkit sounds like a good change if it aligns with what the runtime is supposed to do. But I need to stress that the same occurs when IO is from 0 to 3 as well. This is still a runtime issue.

I also need to stress that the behavior in the Runtime is different than it was prior to 1.0.0 It's possible this is a different issue and I'm describing it in a way that is not accurate:

Same result in 1.0.0 with IOR of less than 3. Image

Prior to 1.0.0 Seemed to have better blending of the thin walled diffuse mixed with the IOR refraction/reflection. Image

Very clearly different results between versions.

Safemilk avatar Mar 31 '25 22:03 Safemilk

I've created a ticket to track the related issue of the toolkit limiting acceptable attribute values as REMIX-4115.

@Safemilk Are you saying that you are still seeing visual errors with values between 1-3? Not sure if your previous comment means the value might still "out of range" in 0-1 for those screenshots.

nxkb avatar Apr 08 '25 18:04 nxkb

@nxkb sorry for my imprecision here! I'm not exactly sure how to describe this accurately.

Basically, regardless if my values are between 0 and 1 or 3 to 4 etc. for IOR, I'm seeing a very different result in 1.0.0 from this shader.

Prior to 1.0.0 this would produce a result that was fairly clear, while incorporating the diffuse and mixing it correctly and reflecting.

Post 1.0.0 it seems to blend in the diffuse layer way too much resulting in a very bright and opaque visual.

I was able to get a shot from the same spot so hopefully this will explain it better, this happens regardless of IOR value, when Diffuse as Transmission is on.

Oops forgot image! Image

Safemilk avatar Apr 08 '25 23:04 Safemilk

Also filed REMIX-4193 for internal tracking

NV-LL avatar May 08 '25 21:05 NV-LL