USD issue with exporting points

   1781   10   3
User Avatar
Member
224 posts
Joined: Feb. 2016
Online
Hello,
I am trying to export a particle simulation to USD. The effect starts with 0 particles and ends with 0 particles. USD doesn't seem to like this. When using the USD export sop and reading the file with USD import, you can see the issue. It seems like it won't allow there to be frames with 0 particles. If you look at the video I have the firework effect on the left side, and the usd exported version on the right side. On the first frame (also shown in a photo) the usd version holds the first frame where the particles first exist and the last frame holds the last frame where a particle exists (also shown in a photo). It seems like there cannot be frames where no particle exists so it finds the closest frame where a particle does exist. I don't have this issue when exporting to a USD sequence, but I need to get this working in one USD file.
Any thoughts?

Attachments:
help1.PNG (697.3 KB)
help2.PNG (593.2 KB)

Thanks,

Evan
User Avatar
Staff
359 posts
Joined: Feb. 2008
Offline
The problem is when you have no particles there is nothing for USD to create, so it won't create an empty points primitive.
Before exporting your particles, add an "Add" SOP and enable "Particles" > "Add Particle System"
User Avatar
Member
224 posts
Joined: Feb. 2016
Online
npetit
The problem is when you have no particles there is nothing for USD to create, so it won't create an empty points primitive.
Before exporting your particles, add an "Add" SOP and enable "Particles" > "Add Particle System"

Thanks! that solves the issue!
Thanks,

Evan
User Avatar
Member
224 posts
Joined: Feb. 2016
Online
npetit
The problem is when you have no particles there is nothing for USD to create, so it won't create an empty points primitive.
Before exporting your particles, add an "Add" SOP and enable "Particles" > "Add Particle System"
Actually still having trouble.

the first issue is that I was separating my particles with a name attribute so they would show up as separate primitives in solaris. The particle system breaks that.

Also I still get warnings/glitches (like the frame when the particles should not exist it still shows them and give a warning. if I refresh the render the particles do go away but I still get the warning).

maybe I should just add a point (out of camera) that stays throughout the whole shot to avoid this issue.
Edited by evanrudefx - June 15, 2023 16:21:59

Attachments:
name1.PNG (7.4 KB)
name2.PNG (3.0 KB)
error.PNG (7.0 KB)

Thanks,

Evan
User Avatar
Staff
451 posts
Joined: June 2020
Offline
Can you share your latest hip file?
User Avatar
Member
224 posts
Joined: Feb. 2016
Online
robp_sidefx
Can you share your latest hip file?

I got it working by adding a single point outside of the camera.
Thanks,

Evan
User Avatar
Member
8551 posts
Joined: July 2007
Online
I'd also like to know how to properly author empty Mesh or Points primitive on the stage from SOPs as that sounds like its important for proper usd stitching

EDIT: Particle System prim seems to work for creating empty Points primitive, however Particle System prim is not the most efficient since it has to have vertex for each particle
I'd almost expect an option to treat empty Packed Primitive as empty Mesh or empty Points prim when Packed Primitives is set to Unpack on SOP Import (the Mesh vs Points should be configurable per prim using usdconfig attributes even though they are currently separate detail attributes, while ideally they would be authored as usdconfig dict attribute which can be detail or prim for better granularity )
Edited by tamte - June 16, 2023 18:37:55
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Staff
359 posts
Joined: Feb. 2008
Offline
The reason using a single Add SOP with a particle system isn't working as you'd expect is it creates a single points primitive - when there are no points, it'll create an empty points prim and when simply adding points to the particle system, everything works as expected - you have an empty points prim that slowly fills up with points.
However, as soon as you have points with their own path or name attribute, this will take precedence over the particle system's path or name, and they'll create their own points prims. So you're back to your initial problem. The particles stick in space because as you're aggregating all the USD data, it only creates the points prims once you have particles so the first time sample it'll create (and hold for frames before that) already has points.

You'll need to create as many empty particle systems as there are unique names or paths in your points, and give them the appropriate name/path attributes.

Same goes for empty mesh prims.

Here's an example file - dive inside the sopnet for more details.

Attachments:
EmptyPoints.hip (99.3 KB)

User Avatar
Staff
359 posts
Joined: Feb. 2008
Offline
tamte
EDIT: Particle System prim seems to work for creating empty Points primitive, however Particle System prim is not the most efficient since it has to have vertex for each particle

You only need to create empty particle systems, the rest of the time the points with a name attrib is all you need.
User Avatar
Staff
359 posts
Joined: Feb. 2008
Offline
tamte
I'd almost expect an option to treat empty Packed Primitive as empty Mesh or empty Points prim when Packed Primitives is set to Unpack on SOP Import (the Mesh vs Points should be configurable per prim using usdconfig attributes even though they are currently separate detail attributes, while ideally they would be authored as usdconfig dict attribute which can be detail or prim for better granularity )

You can set "usdprimtype" and "usdkind" string point attribs on points to create the prim type/kind you're after, however that doesn't work on packed geo.
It will add points for prim types that have points in their schema, which doesn't exactly solve the empty geos we're after, although if you add a "usdvisibility" string attrib and set it to "invisible" to hide those prims it might do the job?
User Avatar
Member
8551 posts
Joined: July 2007
Online
I also tried those attribs on packed, if they worked it may be ok for this particular need

The visibility has its own issue as that's overrideable And also not automatic, so some USD layer can expose the residual frozen points later
It would also require to make sure particles always have at least 1 point

Being able to author empty prims without further user involvement would be ideal
Therefore packed primitives could be a way to go as they'd pack the input which can be empty on some frames but the prim could still hold config attributes and therefore author properly on stage without user having to manage visibility
Tomas Slancik
FX Supervisor
Method Studios, NY
  • Quick Links