instance and @orient

   2141   2   1
User Avatar
Member
12 posts
Joined: July 2015
Offline
I have RBD simulation and export “Create Point to Represent Objects” after i am using node “transformpieces” and this working well.
But i need use instance and points from RBD simulation and this not good work with att @orient.
Help me how can i make so the instance worked as “transformpieces”
Edited by unitmotion - Feb. 22, 2017 14:38:39

Attachments:
test instant.hip (276.3 KB)

User Avatar
Staff
1681 posts
Joined: March 2012
Offline
It looks like (on frame 1) @orient is (0,0,0,1), the identity quaternion, so it's not transforming the geometry. The transformation in the object named “sim” is from the Copy SOP using @N from its second input, and it's applied to the intrinsic transform of the packed geometry primitives.

It took a bit of trial and error, but it seems to work if you change the Import Style on the Dop Import SOP named “time” to Fetch Geometry from DOP Network, then in an Attribute Wrangle SOP before the “out” node, do:

@orient = quaternion(matrix3(primintrinsic(0,"transform",@primnum)));
v@pivot = primintrinsic(0,"pivot",@primnum);

This gets the orientations and pivots from the packed primitive transforms. After the Attribute Wrangle, you can optionally delete the primitives but keep the points, if you want, but instancing will just look at the points.

In the Instance object, you'll need to keep “pivot” in addition to “orient” in the Attribute Delete SOP.
Edited by ndickson - Feb. 23, 2017 11:28:32

Attachments:
test instant_2.hip (281.2 KB)

User Avatar
Member
12 posts
Joined: July 2015
Offline
many thanks!
  • Quick Links