Unity-Technologies / usd-unity-sdk

Integration of Pixar's Universal Scene Description into Unity. UPDATE: This package has been superseded by our new bundle of USD packages. Please see README & link below for further details.
https://forum.unity.com/threads/new-openusd-packages-now-available.1524583/
Apache License 2.0
499 stars 74 forks source link

Point vs Vertex normals (FTV-199) (USDU-227) #86

Open ssteinbach opened 5 years ago

ssteinbach commented 5 years ago

It looks like the 'import' normals option doesn't interpret point vs vertex normals correctly. Unity expects the number of normals to equal the number of points. So in houdini, add a vertex split SOP (set to "N" and promote) after your normal sop. Then delete the N vertex attr. I sent a test USD file to @jcowles with a test case

jcowles commented 5 years ago

These two cubes should look the same when imported: weighted_companion_test_cube.zip

lucillecaillaud commented 5 years ago

Hey guys, I'm a bit confused about this ticket.

I opened the usd file you linked Jeremy (I guess it is suppose to reproduce the problem) but I observe two things: (1) Opened in Unity I see the two cubes look the same (like they should if I understand correctly), (2) opened in maya, the normals are very different for both cubes and so render looks different.

I don't know if I missed something or if there is something that I'm doing wrong (maybe recent changes in the code fixed the issue?).

Thanks for your answers!

Tautalis commented 4 years ago

I can confirm this is still a problem. In my case it manifest itself when baking lightmaps. Basically with one cube in the usd file (produced by Houdini18) the cube looked fine as did the uv map produced by the "Generate Lightmap RVs", however when the lightmap was baked it was seriously wrong (black bands across the faces of the cube). However, after applying the fix suggested by ssteinbach (thanks!!) the lightmap baking worked correctly.