Hamilton Meathouse
Feb. 12, 2021 01:15:04
Currently I am using a Lop Import sop to import some geometry scattered/instance in LOPs, which I want to export through our studio's sop layout publisher.
I need some primvars such as the Local Transform (T,R,S) of the prototypes plugged into the LOP instancer to make it into sops. Is there a way to do this? When using the LOP Import sop, and Unpack USD, I am unable to transfer the Local Transform attr which seems like some kind of Intrinsic attribute.
I'm assuming I need to create a custom primvar in LOPs that pulls values from Local Transform, then pass that through to my LOP Import sop?
mtucker
Feb. 12, 2021 13:45:10
It seems like the full "local to world" transform is the only one available through the intrinsics (in spite of all the different intrinsic names - packedworltransform, packedlocaltransform, usdLocalToWorldTransform - they all hold the same value). If that's the value you want, you can extract the intrinsic to a SOP level attribute with a wrangle:
4@lxform = primintrinsic(0, "packedlocaltransform", int(@prim));
Otherwise yes, you'll need to create a USD attribute in LOPs so you can explicitly import it into SOPs.
Hamilton Meathouse
April 27, 2021 22:20:36
Finally got back around to this.
4@lxform = primintrinsic(0, "packedlocaltransform", int(@primnum));
f@localuniformscale = getcomp(@lxform,0,0);
Did the job for me!