Extract transform

   1516   2   1
User Avatar
Member
388 posts
Joined: July 2018
Offline
i have a library of packed primitives with a unique name attribute that i import, copy and transform, and mirror.

I need to extract these final transforms to export a json. Is there a way to do that?

Usually i have the orient attribute that helps me to generate a 3x3 transform but in this case i don't have any other attributes other than the position. The mirror sop doesn't output any transforms
User Avatar
Member
9380 posts
Joined: July 2007
Offline
Each packed primitive has "packedfulltransform" intrinsic attribute (4x4)
Or "transform" (3x3)

I'd recommend getting the former one though and that contains actual full transform

matrix xform = primintrinsic(0, "packedfulltransform", @primnum);
Tomas Slancik
CG Supervisor
Framestore, NY
User Avatar
Member
388 posts
Joined: July 2018
Offline
tamte
Each packed primitive has "packedfulltransform" intrinsic attribute (4x4)
Or "transform" (3x3)

I'd recommend getting the former one though and that contains actual full transform

matrix xform = primintrinsic(0, "packedfulltransform", @primnum);


how would i use this in this simple example?
a lot of the values inside the 4x4 seem to be the same actually.

the copy to points is there just to see if it is correct but i guess i need an orient attribute to do that?
its not necessary, what i would like to know is if the "packedfulltranform" attribute is all i need.
Does that include the mirror operation?
Edited by papsphilip - May 1, 2022 16:53:17

Attachments:
extract_transform.hip (213.1 KB)

  • Quick Links