-
Notifications
You must be signed in to change notification settings - Fork 327
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect UsdPreviewSurface opacity-metallic interaction #1719
Comments
@pablode This sounds like the topic that @erich666 and I brought up in an ASWF thread titled "Expected behavior of Transmission effects in UsdPreviewSurface metals": https://academysoftwarefdn.slack.com/archives/C02HJH53RN3/p1702324085845039 Near the end of the thread, both @klucknav and @spiffmon had a change to weigh in, and I believe the conclusion was that the MaterialX behavior is correct, but some earlier implementations of UsdPreviewSurface still need to be updated to match this behavior. Let me know if there are any updates beyond this, and we're happy to work with the USD team to make adjustments as needed. |
Ah, sorry for missing that - I remember it being largely about “how it should be done” but wasn’t aware of how this topic actually manifests in the wild. Nonetheless, it’s good to have this logged outside of Slack. In fact, I ran into this issue while rendering a supposedly transparent USDZ-converted asset from Sketchfab. Of course, similar assets will be broken if the spec and OpenUSD implementation get adjusted, unless some explicit versioning is used - which is another can of worms that probably has been discussed a lot and will delay any progress towards alignment of both implementations. |
That's a good point about making this question visible outside of Slack, and I'll post some highlights from the original question and its resolution here:
|
Karen Lucknavalai:
Eric Haines:
|
@pablode I'll go ahead and close this issue for now, but let us know if you believe any changes are needed on the MaterialX side, and we'll follow up. |
I believe to have stumbled upon a difference between the OpenUSD and MaterialX implementations of the UsdPreviewSurface standard.
In this image, you can see on the left side a native UsdPreviewSurface and on the right side a corresponding MaterialX material with parameters
![opacity_metallic](https://private-user-images.githubusercontent.com/3663466/307229644-9ef6a897-10c6-47b3-91a4-5e377f3fb139.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE3Njg5ODgsIm5iZiI6MTcyMTc2ODY4OCwicGF0aCI6Ii8zNjYzNDY2LzMwNzIyOTY0NC05ZWY2YTg5Ny0xMGM2LTQ3YjMtOTFhNC01ZTM3N2YzZmIxMzkucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDcyMyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MjNUMjEwNDQ4WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YzVmOTFmODZjYjQxYWQwYjFmN2E1ZjE1YjlmMDhhZTkxNzQ3ZGRiZDM5ZTBkYTNmMzFhYTkyOTFlMmMyMTdlNiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.AXfBDWglvDcD0xQ3dcowiT3pUE4xNiFXWAcJ4dQGqSU)
opacity=0.5
andmetallic=1.0
:(image rendered with USD dev and MaterialX 1.38.7, but the latest usd_preview_surface.mtlx)
Basically, the difference is that in the MaterialX implementation, the 'metalness' is layered over the transmission BTDF, meaning that when
metallic=1.0
, the material is opaque regardless of the value ofopacity
. The UsdPreviewSurface standard says for theopacity
input: "[...] if it is smaller than 1.0 then the prim is translucent [...]", which is then not the case. Therefore, I believe this to be a violation of the spec.I've attached a PoC for OpenUSD here: OpacityMetallicComp.zip
Perhaps this has been overlooked when validating the correctness a while ago? (cc @spiffmon, @klucknav I hope you don't mind)
The text was updated successfully, but these errors were encountered: