erich666/McUsd

Question about transparency results

Closed this issue · 6 comments

This is fascinating, and lovely work!

I am very curious about the alpha mode problems in the Storm render. Over here (https://github.com/usd-wg/assets/tree/main/test_assets/AlphaBlendModeTest) we've built an Alpha Blend Mode Test that identifies similar issues and I am wondering if you might have discovered more blending issues? In particular I notice that in our tests, the blending behavior on Omniverse is as far as we can tell not right versus the "reference" ground truth image, but nearly every renderer we have tested so far has some degree of incorrect behavior.

Would it be possible to pop our reference usd file in to your scene to try to narrow down where issues lie? I think there may be bugs to file against the Storm based on the odd rendering of the sunflower, but it would be good to have canonical reference so we all push consistently in the same direction and make sure we don't introduce new bugs.

We are also open to the idea that our blend test asset might be incorrect, and would definitely appreciate more eyes on it.

BTW, I'd like to invite you to pop in to a USD working group meeting to say hello and maybe show off your work a little :)

Also came here to ask about alpha and cutout :)

To the best of my understanding the actual problem is that there are multiple versions of UsdPreviewSurface with the most notable being 2.2 (introduction of opacityThreshold) and 2.3 (which according to the changelog clarifies behaviour of opacityThreshold but actually is a breaking change in behaviour).

Since there's no version in the schema in files, there's no way to know which behaviour is intended for a file (e.g., Apple's QuickLook uses 2.2 so files authored against 2.3 don't look right).

My question thus would be: are the files in this repository here authored against 2.2 or 2.3? And does anyone know what version of the schema Omniverse uses?

Good questions - I will follow up on them after this long Labor Day weekend. I do plan on going to the working group meetings this month.

Well, that Labor Day break was longer than expected ;). Sorry, I forgot to follow up here.

I am wondering if you might have discovered more blending issues?

On the Omniverse side, there are a few things happening. For the real-time renderer, Omniverse favors speed over quality (you can turn on the better quality render if you like), see https://github.com/erich666/McUsd/tree/usdwga/full_assets/McUsd#omniverse-adjustments

I did test with that great Alpha Blend Mode Test file, and it turned up a bug in the Omniverse Iray renderer, which I've duly reported.

My question thus would be: are the files in this repository here authored against 2.2 or 2.3?

I'm not sure what the "breaking change in behaviour" is about, but the files are authored against 2.3, that opacityThreshold acts both as a flag and an value. If 0.0 exactly, treat opacity as semitransparency; if 0.5, treat it as a cutoff. Here's a screenshot in Omniverse 2022.3.0.beta, using the path tracer:

capture 2022-10-26 17 52 15

Does this address all the issues you both are interested in? If so, I can close the issue then.

Ping on this one, @hybridherbst and @meshula (and, nice to see you yesterday, Nick).

Thanks for clarifying, hadn't seen your response for some reason –
Would be great if you can add to the repo description that materials are authored against 2.3 and thus are expected to look right in viewers that support/use the 2.3 spec.
Unfortunately (and I know @meshula is aware) there's currently no versioning for schemas inside USD files, so the file and viewer don't "know" how to interpret the values so that the result is what the author intended.

The breaking change is that opacity was treated as a multiplier in both cases in 2.2 (or rather, not fully specified) so the files look wrong in viewers that are authored against 2.2, such as Blender (at least 3.1) and Apple's QuickLook.
See for example https://github.com/usd-wg/assets/tree/main/test_assets/AlphaBlendModeTest#problem-opacity-values-combined-with-opacitythreshold-values

OK, done: https://github.com/erich666/McUsd/tree/usdwga/full_assets/McUsd - 2.4 is noted there. I believe this addresses the issues you mention, so I'll close it. Reopen it if not - I want to get this right.