Calling UsdGeomMesh and collsion api

Hello all,

I’ve been working on a custom dynamic mesh problem for some time. I have finally solved all the geometry issues. How would I go about generating a mesh from scratch? I already have the points, vertex and indices. I have a working mesh by inputting this data to a cylinder and over writting the data in action graph.

i ran into problems with the collison api. It picks up the origonal over written shape but not the custom input.

Any ideas how to have a completely custom mesh and how i would call the collsion api on it?

kind regards


Guess this is a problem of order of operations, if you apply the CollisionAPI right when you create the cylinder mesh it will pick up this mesh. Later when you change this, this change is for now ignored. (This will trigger recooking and recreation in next release).
This should work, if you generate the mesh and then apply the CollisionAPI.

Hey Ales,

I think I might be thinking about this the wrong way, I was thinking you meant in the Def mesh part but now I’m thinking it’s in the order of the code?

Do you mean if the custom mesh with the APIs is say line 10 and the write attributes is line 11 for example. Then it would just write the initial data to the API call?

If this is correct I would need to have the write attributes before the mesh is called? Ie write custom attributes line 9 and Def mesh APIs line 10?

I think this is what you mean.

Secondly is there a way to change the order of operations in the stage / action graph or would it need to be done purely in VScode?

Thanks for your help

No the important bit for physics is when the UsdPhysics.CollisionAPI is applied, when its applied the mesh points should have been already written. The definition of the UsdGeom.Mesh can happen at any point, this is not something physics reacts, however it does react if the CollisionAPI is applied.

I dont actually know where/how you do apply the UsdPhysics.ColllisionAPI that is not through the omni.graph right?

I’m applying convex hull, in properties tab. I think you mentioned this previously.

The write prim attributes are written in the action graph which in the code is before the Def mesh and Apis which are right at the end of the code.

Ah ok now I might be understanding the problem, so you are doing that post so in theory this should work. However the data are most likely written to Fabric, can you in your graph write the points back to the USD?

You can also send me eventually some simplified version, I can take a look. This should be possible, but maybe not out of the box, because physics initial parsing requires data to be in USD.


It’s not super complicated what I’m doing. I’m actually in the middle of the Indian ocean atm… I’ll sit down tomorrow and put something together that lays it out the line that’s the issue and send it over. Im pretty sure it’s an easy fix it’s just the way I’m doing it.