Since I could not figure out a way to see the calculated offsets in Python (they all returned null when I tried to read them), can someone confirm what the particle contact offset (PCO) should be, given this basic scenario:
Lets say I have a Point primitive that I’ve created a Particle Set from, who’s width has a value of 1.0 (1 scene unit), what value should the PCO be set too? 0.5 (half of the particle width) or 1.0 (equal to particle width) or something else?
Also, are the other offsets (contact, rest, solid rest, fluid rest) calculated automatically whenever the PCO is changed, is that a correct assumption?
I agree the offset tuning is not straightforward. You can find an overview here - at the end you see the equations that we use for autocomputation of the offsets from the particle contact offset: Particle Simulation — Omniverse Extensions documentation
And you may have a look at the Python code that sets up the ParticlePostProcesing Tutorial in the Demo Scenes for an example setup for a fluid.
If I follow the math for the particle spacing, I think you could use 0.84, but 1.0 should work fine, too.
Interestingly, I peeked inside the PostProcessing sample and didnt see much in there around the subject. The fluid rest offset is calculated, but I dont see it being used/applied in any Physx API calls, only the PCO.
I did however, create a large Cone in Omniverse, create a ParticleSampler from that, export it as .usda so I can see what the widths value was versus the PCO.
The widths value was 5.94
The PCO value was 5.0
So, looks like that works out too: PCO = Width * 0.8417
Yes, the fluidRestOffset computation and its relation to the particle-grid spacing was what I thought could be helpful to you.
As for the schema API, please refer to the scripting guide that has the schema doxy: Help > Physics Scripting Manual > Physics Extensions > USD Physics Schema > here in our USD Schema Documentation.