-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Indexed normal primvars with normal3d
type causes incorrect rendering
#2070
Comments
Hi Qingnan, I'm not sure why changing to normal3f fixes things, but the reason it's not rendering correctly with normal3d is that you have too many normal indices. There should be 1 normal index per face and there should be as many indices as there are faces. Here's a modified version of your file that works correctly for both normal3d and normal3f. #usda 1.0 def Xform "tmp_example" |
Is this true? To produce smooth shading everywhere except at sharp creases, it is often necessary to provide a per-face-vertex normal instead of a single normal for the entire face. I think face varying indexed primvars are designed for this purposes, otherwise we can just uniform primvars instead. |
I'm not an expert :-). But you had explicitly set "faceVarying" as the interpolation method, so I made changes to align with that. If you really intended different normals per vertex, I think the interpolation needs to be either "uniform" or "vertex" but then you'll still need to make some changes to the number of normals and indices. |
@qnzhou is correct - At production-scale, we gain quite alot of network/bandwidth/memory savings from single precision, relying on double-precision transforms to position primitives with fidelity. |
Thanks @spiffmon ! I always seem to get those interpolations backwards :-( |
Thanks @spiffmon ! I assume you are able to reproduce the bug. I choose |
Filed as internal issue #USD-7728 |
Description of Issue
When using indexed primvar to store faceVarying normals with
normal3d
type,usdview
does not produce the correct rendering.Steps to Reproduce
Here is a simple cube usda file to reproduce the problem:
Running
usdview tmp.usda
yields the following incorrect result:Interestingly, changing
normal3d
tonormal3f
fixes the problem.System Information (OS, Hardware)
MacOS 10.15.7
Package Versions
v22.8
Build Flags
Default.
The text was updated successfully, but these errors were encountered: