Community
Bifrost Forum
Welcome to the Bifrost Forum. This is the place for artists using Bifrost to ask and answer questions, browse popular topics, and share knowledge about creating effects procedurally using Bifrost. You can also visit the Bifrost Community on AREA to download an array of ready-to-use graphs, read Bifrost news and updates, and find the latest tutorials.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Saved USD asset normals count is half of the vertex indices numbers

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
IRONIC3D
614 Views, 5 Replies

Saved USD asset normals count is half of the vertex indices numbers

Hey everyone

 

When saving a USD stage for a mesh, the object appears smooth when rendered through Maya USD ecosystem, however when loaded into other USD DCCs apps the prim is usually faceted. Upon further investigation and comparison between the output of a simple sphere using Maya USD 23, Bifrost 2.7 and other Apps. It turns out the number of normals doesn't corresponds to the number of vertex indices.

In fact there are two behavior's. Exporting through Maya USD 23 doesn't include the normals!!!. Exporting through BiFrost 2.7 USD exports only half the number of normals.

 

Steps to reproduce

  1. create a basic poly sphere
  2. save as usda through bifrost
  3. load into Multiverse for Maya (free) and the sphere is half smoothed (see attachment)
  4. print the content of the usda file, and the normals3f[] primvars:normals count is half.
  5. check attached image


Expected behavior
a complete normal count that matches the number of vertex indices for each mesh prim needs to be present.

Tags (1)
Labels (3)
5 REPLIES 5
Message 2 of 6

Hi,

It is working fine on my side. Note that a USD mesh can be described as "subdivided mesh" or simple "polygonal mesh". You have to choose that when converting to USD. More info about it here https://github.com/PixarAnimationStudios/USD/blob/release/pxr/usd/usdGeom/generatedSchema.usda#L1686
In Bifrost USD, in the "define_usd_mesh" compound, if you set the "Subdivision Scheme" to "none", it will then create the normals. If you set the "Subdivision Scheme" to "catmullClark", no normals will be created (as specified by USD Geom schema). Finally, when using the Maya USD exporter, you can do the same thing in the Geometry section of the exporter.
If it is not working for you, could you please attach a Maya scene?
Thanks
 In my test with a basic poly sphere or poly cube, it is working fine in both usdview and Maya.


Guillaume Laforge
Software Development Manager
Message 3 of 6

Thanks Guillaume

 

This makes sense. I did try to recreate the sphere that had half of the normals written but I couldn't. I believe the problem is that the default behaviour is that both checkmarks are enabled, and if Normals is enabled then SubD type is ignored from what I read in the documentation. I did a test where I explicitly set Normals on Vertex off and the resulting USD didn't have the type of SubD written, although clicking on the mesh it shows that is Cat-Clark in the attribute editor.

 

I am attaching the scene along with the graph for your reference. The exports three types, SubD only, Normals only, and default states. In Maya and Arnold all three spheres have smooth interpolation, when importing into MV they are all treated as SubD for some reason. But that is another issue for MV.

I do have one last question. I've been setting up the USD assets with Cat-Clark in Bifrost and in Maya USD. The attribute shows in the inspector and in the usda file. However, when rendering with Arnold in Maya, or through MV, or through Houdini Solaris using Arnold, Karma, RMan, octane or 3delight, it is never rendered as SubD. Not a single assets generated out of Maya with SubD is rendered as SubD!!! Why is that? With other USD plugins there are overrides that allow me to fix this issue by applying SubD after the fact. But with Maya USD there is none! how do you render a USD prim with SubD attribute to actually be render as SubD in Arnold Maya?

 

Is this feature not implemented yet?

 

Note. I've I save an object as SubD in either MV or Solaris then all rendering engines will honor it except for Octane and Arnold since the number of iterations needs to be set so it only works through an override.

 

Thank you.

Iyad

Message 4 of 6

Someone asked the exact same question about applying mesh subdivision in Arnold on Bifrost Addict server on Discord today! Here is the link to the conversation: https://discord.com/channels/872260298508222534/1092388158294982757/1092468747782078545
And just in case you can't access it, I'm also adding it bellow with the video and files.

Arnold uses its own way to apply mesh subdivison in USD because it allows to control the subdivision per object, compared to USD that is (at the moment) applying it for every meshes with the "subdivisionScheme" set to catmullClark. So in order to create a USD Mesh that Arnold can subdivide, you can take a look at what Arnold is generating when it is exporting to USD. You will find out that it is adding "primvars:arnold:subdiv_iterations" and "primvars:arnold:subdiv_type" attributes. You can do the same using Bifrost USD nodes like in the attached video. Note that other renderers might also allow per mesh subdivision control but with a different attribute name, still a similar process would apply.


Guillaume Laforge
Software Development Manager
Message 5 of 6

Hi Guillaume

 

Thank you heaps for your help and insight on this issue. That person on discord is me 🙂 I got your solution working.

 

Cheers,

Iyad

Message 6 of 6

working perfect...thank you for the example

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators


Autodesk Design & Make Report