Skip to content
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

storm ignores subd normals #2981

Closed
ben-arx opened this issue Mar 1, 2024 · 4 comments
Closed

storm ignores subd normals #2981

ben-arx opened this issue Mar 1, 2024 · 4 comments

Comments

@ben-arx
Copy link

ben-arx commented Mar 1, 2024

Storm ignores normals with higher subd levels, increasing complexity adds more geometry, but the normals stay the same, resulting in smooth shading and softer edges on the very high complexity mesh compared to the same mesh with subdivisions baked into the geometry.
Attached is a simple example of a cube mesh with a crease weight of 10, showing the same smooth normals and shading with complexity low and very high and then compared with subd baked into the mesh instead.
Renderman and Karma render subd with the proper normals.

cube.zip

low
cube_low

very high
cube_very_high

baked
cube_baked

@davidgyu
Copy link
Member

davidgyu commented Mar 1, 2024

The default method of displaying subdivision surface meshes in Storm is limited as you point out, especially with respect to meshes with sharpened creases and other features. You can get a higher fidelity representation by enabling adaptive subdivision with GPU tessellation, e.g.

`% env HD_ENABLE_OPENSUBDIV3_ADAPTIVE=1 usdview --complexity medium cube_creased.usda`

It would be good if this was exposed in a way that was more discoverable.

@ben-arx
Copy link
Author

ben-arx commented Mar 4, 2024

Thank you for that env var, adaptive subdivision looks promising with better normals, but it does create some artefacts and not enough subdivision compared to the fixed subdivision.
Is there any way to control adaptive subdivision resolution with an env var or some other way?
It seems to always subdivide to roughly the same screen space polygon size resulting in black faces near sharper creases and not rough edges for small subd detail. Increasing complexity doesn't seem to fix issues or result in higher resolution subdivision.

Attached is an example of a simple square tube with rounded edges, top and bottom crease weight of 5, that shows black faces near creases when moving further away and even further it will not subdivide much at all showing faceted edges instead of smooth subd shapes.

complexity mid close enough so everything looks good
image

complexity very high with normal issues at the creases
image

complexity mid with the same normal issues, but only starting further away
image

complexity mid not subdividing enough far away
image

edit: added tube.usda zipped example
tube.zip

@jesschimein
Copy link
Contributor

Filed as internal issue #USD-9383

@davidgyu
Copy link
Member

davidgyu commented Mar 7, 2024

@ben-arx Agree those tessellation artifacts are undesirable. There should be a fairly straightforward fix for that bug, we'll take a look. We haven't yet exposed any additional controls for adaptive tessellation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants