Pdg based usb model variants ?

   2416   5   2
User Avatar
Member
52 posts
Joined:
Offline
I guess im wondering what would be the correct PDG workflow for:
1- Create a piece of geometry like a rock (easy)
2- have a topnet that does wedges of it (say 5 different easy)
3- create a usd file from this wedges, and configure each of the variants from the resulting bits of geometry as a ‘model’ variant for that first rock in a usd
4- then, at the end, save a usd file of this with the model variants, etc.

I had a look around but I don't see any tutorials that combine usd and pdg workflows..

Any thoughts ?
User Avatar
Member
603 posts
Joined: Sept. 2016
Offline
There's nothing in TOPs to automate creating USD variants from wedges yet. However something to try might be using an ‘Add Variant’ LOP inside a foreach loop. Then you could use the ROP USD TOP to generate the USD file from the LOP net.
User Avatar
Member
52 posts
Joined:
Offline
I see. Is there a chance of a small example? I tried having the wedge'd out object, imported as a sopImport in lops and had a look at the for each node, but Im unsure how to get it to perform with add variant to existing primitive and the pdg_input set of work items..

If you happen to be able to show us a quick example, that would be super appreciated! Otherwise I'll keep trying
User Avatar
Member
603 posts
Joined: Sept. 2016
Offline
You would need a `waitforall` TOP before the ROP USD to gather all the geo files, then I expect you could use `@pdg_input.N` to get the input file path for each iteration in LOPs. If the number of variants is fixed you could start by hard coding the `Add Variant to Existing Primitive` nodes so you don't have to worry about iterating. I don't have an example for you now (will have time after next week), but you might have better luck asking on the Solaris forum or submitting a question to support.
User Avatar
Member
52 posts
Joined:
Offline
I've done a couple tests but I am stuck in how to load the resulting wedges into the LOPs addVariant loop.

I've also posted a new thread on the Solaris forum.
https://www.sidefx.com/forum/topic/71275/?page=1#post-302119 [www.sidefx.com]
User Avatar
Member
603 posts
Joined: Sept. 2016
Offline
Responded in the Solaris forum, repeated here:

Hi, check out the attached hip file. It sets wedge geometry as LOP variants, using the `foreach` block to iterate over @partitionsize wedges.

Attachments:
lopvariants_v1.hip (185.0 KB)

  • Quick Links