USD variants from alembic 'name' or 'path' attributes
3233 6 5- Sixjames1000
- Member
- 52 posts
- Joined:
- Offline
Hi all,
been looking at creating usd variants from the following, thinking on using this to create a model with variants from a kitbash type asset:
1- sopimport an object into LOPS with ‘path’ or ‘name’ prim attributes.
2- create an add variant to existing primitive block
3- done
Any ideas on how to iterate through each of the ‘path’ or ‘name’ primitive attributes to create this variants? In a way using attributes to define geometry pieces without having to create a hundred prune nodes..
Thanks in advance!
been looking at creating usd variants from the following, thinking on using this to create a model with variants from a kitbash type asset:
1- sopimport an object into LOPS with ‘path’ or ‘name’ prim attributes.
2- create an add variant to existing primitive block
3- done
Any ideas on how to iterate through each of the ‘path’ or ‘name’ primitive attributes to create this variants? In a way using attributes to define geometry pieces without having to create a hundred prune nodes..
Thanks in advance!
- jason_iversen
- Member
- 12397 posts
- Joined: July 2005
- Offline
It might help to post a hip file of the kind of setup you're after. It may be that a ForEach LOP can be configured to do it – perhaps look at the Create LOD LOP internals.
Jason Iversen, Technology Supervisor & FX Pipeline/R+D Lead @ Weta FX
also, http://www.odforce.net [www.odforce.net]
also, http://www.odforce.net [www.odforce.net]
- Sixjames1000
- Member
- 52 posts
- Joined:
- Offline
Ah of course!
Adding a hip example. Im very much a newbie on all this, and Im having issues with how to reference some of this data back and forth.
the example includes a simple sphere object with 2 prim groups colored for convenience and a LOPS network where Im pulling this and trying to figure out a way to loop through each group and turn it into a variant.
Adding a hip example. Im very much a newbie on all this, and Im having issues with how to reference some of this data back and forth.
the example includes a simple sphere object with 2 prim groups colored for convenience and a LOPS network where Im pulling this and trying to figure out a way to loop through each group and turn it into a variant.
- Sixjames1000
- Member
- 52 posts
- Joined:
- Offline
- user1111
- Member
- 5 posts
- Joined: Sept. 2015
- Offline
Don't think it's correct but the best I could find was to put it in a add variant block in a for each loop with everything but the thing you want to be a new variant deleted (pack, delete everything else with a removepoint in a wrangle, unpack) using the contextoption("ITERATIONVALUE") to select the correct one.
Load as reference seemed to be required for me to get it to work, don't know USD enough to know why unfortunately. It's nearly procedural with the main value that has to be hand done is the total iteration number.
It's really a mess though, hopefully we get a node that takes packed prims and turns them to variants or from a sop attribute. Would be glad to see a better way than what I've kludged too.
Load as reference seemed to be required for me to get it to work, don't know USD enough to know why unfortunately. It's nearly procedural with the main value that has to be hand done is the total iteration number.
It's really a mess though, hopefully we get a node that takes packed prims and turns them to variants or from a sop attribute. Would be glad to see a better way than what I've kludged too.
if (@ptnum!=`contextoption("ITERATIONVALUE")`){ removepoint(0,@ptnum); }
- pavgv44
- Member
- 2 posts
- Joined: May 2023
- Offline
user1111Hi, I seem to have the same issue with trying to create variants from multiple SOP geometry. Could you post this hip file so we can have a look?
Don't think it's correct but the best I could find was to put it in a add variant block in a for each loop with everything but the thing you want to be a new variant deleted (pack, delete everything else with a removepoint in a wrangle, unpack) using the contextoption("ITERATIONVALUE") to select the correct one.
Load as reference seemed to be required for me to get it to work, don't know USD enough to know why unfortunately. It's nearly procedural with the main value that has to be hand done is the total iteration number.
It's really a mess though, hopefully we get a node that takes packed prims and turns them to variants or from a sop attribute. Would be glad to see a better way than what I've kludged too.Image Not FoundImage Not FoundImage Not FoundImage Not Foundif (@ptnum!=`contextoption("ITERATIONVALUE")`){ removepoint(0,@ptnum); }
- ohmelf
- Member
- 3 posts
- Joined: Oct. 2019
- Offline
-
- Quick Links