Snyder90 Posted November 18, 2019 Share Posted November 18, 2019 Hey, I simulated low res RBD pieces and am using a transform Pieces node to apply the position / rotation back onto the highres geo. To get the orientation / pivot for the template points input of the transform pieces node I used a "dop import" node which is set to create points to represent objects. But I had to bake out the RBD objects and animate on top of em in Maya and brought em back to houdini. I made sure the name attribute is exactly the same as on the highres geo again and packed it and currently just using an attribute wrangle to delete all prims so I only have points left. But those only come with P and name. How can I get the correct orientation / pivot back to align my highres geo correctly using the Transform Pieces node? Thanks guys! Quote Link to comment Share on other sites More sharing options...
toadstorm Posted November 18, 2019 Share Posted November 18, 2019 (edited) Assuming you're using Alembic to get your primitives out of Maya and back into Houdini, you need to get the "packedfulltransform" intrinsic of each packed Alembic. In VEX you can use the "primintrinsic" function to get this matrix. However, points don't have primitive intrinsics, and so when you delete your primitives you're going to lose all your transform information except for @P. You'll want to keep the primitives loaded, unless you're manually converting the primitive intrinsic transforms to template point attributes. To manually get an orient attribute from a packed Alembic: matrix m = primintrinsic(0, "packedfulltransform", @primnum); matrix3 m3 = matrix3(m); p@orient = quaternion(m3); To get the pivot: vector3 pivot = primintrinsic(0, "pivot", @primnum); v@pivot = pivot; If you want to try the easy route, MOPs has built-in tools to handle this. Use MOPs Extract Attributes on your Alembic primitives, and it'll automatically pull an `orient` and `pivot` attribute out of your primitives (make sure to enable Extract Full Transform). You can then use Transform Pieces, or use MOPs Apply Attributes if your source and destination primitives have either the same sorting order or matching i@id attributes. Edited November 18, 2019 by toadstorm Quote Link to comment Share on other sites More sharing options...
rayman Posted November 19, 2019 Share Posted November 19, 2019 (edited) You can also try Extract Transform - it can convert the geometry transforms to point representation. Edited November 19, 2019 by rayman Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.