Filter Prims by Attribute After Unpacking in SOPS
983 2 2- nd_sliu
- Member
- 30 posts
- Joined: 9月 2023
- Offline
I want to be able to group/filter unpacked USD geometry based on prim attributes.
Here's the example:
I have 3 groups in a LOP network: cubes, terrain, and spheres. The mesh prim of each object has an "identity" attribute which helps identify them, and an additional USD Asset Identifier.
When I unpack the LOP network into SOP using Unpack USD node, I kind of lose these attributes. Unpack USD gives me 2 options:
Option 1: Output as Polygons
In the Import Attributes field, I can put "identity". And the "terrain", "cube", "sphere" attributes transfer to each prim.
Option 2: Output as Packed Prims
Each prim is nice represented as PackedUSD prims. However, Import Data is grayed out and I lose the "identity" attribute.
I've attached an example file. Without modifying what's inside lopnet1 ideally, is there a way to filter prims by USD attribute using Option 2? I'd appreciate any advice/discussions!
Here's the example:
I have 3 groups in a LOP network: cubes, terrain, and spheres. The mesh prim of each object has an "identity" attribute which helps identify them, and an additional USD Asset Identifier.
When I unpack the LOP network into SOP using Unpack USD node, I kind of lose these attributes. Unpack USD gives me 2 options:
Option 1: Output as Polygons
In the Import Attributes field, I can put "identity". And the "terrain", "cube", "sphere" attributes transfer to each prim.
Option 2: Output as Packed Prims
Each prim is nice represented as PackedUSD prims. However, Import Data is grayed out and I lose the "identity" attribute.
I've attached an example file. Without modifying what's inside lopnet1 ideally, is there a way to filter prims by USD attribute using Option 2? I'd appreciate any advice/discussions!
Edited by nd_sliu - 2023年11月2日 19:08:00
- nd_sliu
- Member
- 30 posts
- Joined: 9月 2023
- Offline
I found a way to do this via Attribute Wrangle SOP. Since we get the prim path on each primitive, I queried the "identity" attribute at each prim's path. It would still be nice to build the feature into the USD Unpack node, but this way is simple enough.
I attached the solution
I attached the solution
Edited by nd_sliu - 2023年11月3日 00:07:02
- BillyCoopDraws
- Member
- 5 posts
- Joined: 5月 2024
- Offline
-
- Quick Links