julca
Aug. 2, 2023 11:56:38
Hello,
I want to convert duplicated and transformed asset into a point instancer for further operations. I can get all positions but I don't know how to get back their orientations.
Cf. screenshot, on the left what I do manually and on the right when I try to get back in instancer, from source node "out_for_transform", the transformations.
Do you know how to do ?
(cf. simple scene file)
Thank you.
npetit
Aug. 3, 2023 07:27:48
orient should be a quaternion, not a matrix, and it should live on the (packed) points, not inside the packed geometry.
There is a much simpler way of doing this however - copy the usdxform attrib from the unpacked polys onto the packed USDs, rename it to transform and set the packed USD point positions back to the origin.
Here's an updated hip file.
julca
Aug. 3, 2023 08:10:58
Hello @npetit,
Super, thank you for your explanation and solution.
That's simple to use and very useful.
tamte
Aug. 3, 2023 17:47:52
alternatively you can just append Point Wrangle after your lopimport1
string stage = primintrinsic(0, "usdFileName", @primnum);
string path = primintrinsic(0, "usdPrimPath", @primnum);
3@transform = matrix3( usd_worldtransform(stage, path) );
julca
Aug. 4, 2023 10:46:53
Wouahoo that's just one node !
Next step is only magic
!
Thank you @tamte for this quick and short solution.