Hey everyone,
I am looking for someone who can clear up my confusion about the orientation topic.
A little background info:
We are for instance modeling assets in zbrush, blender, maya. We mostly still export alembics or objs. We ingest the geometry via Houdini (sopimports) in to USD. At some point we go from USD to maya again to animate and finally export USD geometry caches from maya back to USD.
→ Now somewhere along this process things go wrong. We noticed that if we simply import some of our USD assets in to Maya, the uvs are either scrambled or they look good but are actually not connected. Going then back to USD makes our asset not renderable, because displacements are completely off they render black or some other issue. We noticed that those issues could be fixed by turning on the “Reverse Polygon Vertex Ordering” option in the Houdini sopimport node. But I am not sure why!
First of all the basics:
This link provides som info about orientation in USD:
https://openusd.org/release/api/usd_geom_page_front.html#UsdGeom_WindingOrder
- Question 1: As far as I understand orientation is an attribute that indicates the orientation of the coordinate system that the mesh was created in?
It can either be leftHanded or rightHanded.
While rightHanded is: up is +Y, right is +X, and the forward viewing direction is -Z
Correct me if I’m wrong!
- Question 2: What does the orientation attribute actually affect?
In the link above it says:
That is, the normal computed from (e.g.) a polygon’s sequential vertices using the right handed winding rule determines the “front” or “outward” facing direction, that typically, when rendered will receive lighting calculations and shading.
- Question 3: That means a leftHanded system has a different seqeunces of vertices and therefore calculating normals the rightHanded way wouldn’t work? So the orientation is all about an algorithm that tries to calculate normals?
Reading from this link above, I understand that the default orientation in USD is rightHanded.
But it seems that different DCCs use different orientations.
I am wondering how does this affect me as a user, especially when working with softwares that have no usd support.
- Question 4: Do I have to know the orientation of each software the mesh was created in, and then import that mesh in to USD with the correct settings?
For instance we often first get our obj or alembic in to houdini sops, clean up some attributes, name the meshes and then we go to USD via sopsimport.
In the sopsimport we can specify to “Reverse Polygon Vertex Ordering”. The documenation says about this option:
while SOP geometry is always left-handed ordering. When this option is on, the importer always reorders vertices (and associated primvars) to be right-handed.
- Question 5: From a workflow perspective, is it required / recommended to have all meshes in your USD stage in the rightHanded default orientation? Or is it only important that the the orientation is set correctly and renderers / viewports etc will draw and calculate accordingly?
And last but not least, to prevent the issues we have currently in the future:
-
Question 6: Whose responsibility is it to handle the orientation of meshes when moving data from different DCCs? Shouldn’t all DCCs export this information in the mesh itself and also read this attribute on import and then optionally convert the orientation if it doesn’t match their own space?
-
Question 7: How is all of this handeled when we talk about other formats like objs, alembic or fbx? Here we usually import it in to sops and then to lops. How does orientation handeling work here? Is orientation also stored in those formats or do I need to specifically set it as user?
Sorry I know these are a lot of questions but I finally want to clear up my confusion about this.