mikethomson Posted September 19, 2016 Share Posted September 19, 2016 Hi guys - relatively new Houdini user here... I have an alembic animation of a flying cube which I want to copy a detailed model on. How do I access the rotation information from the alembic (maya transform, no shape deformation)? When I import the alembic animation, there's rotation info in there, but I only see the P attribute. Ideally I'd like to get the rotation of the alembic point and put it into the orient attribute. I'm not sure if I should go the orient() expression, lookat vex node, or some other route... Any help appreciated -Mike Quote Link to comment Share on other sites More sharing options...
mestela Posted September 19, 2016 Share Posted September 19, 2016 Mike! Alembics store their orientation on a hidden intrinsic attribute on the prim; you can see this in the geo spreadsheet if you go to primitives, and use the 'instrinsics' dropdown to display 'packedfulltransform' or any of the other similarly named transformy attribs. Anyway, to convert that to @orient means pulling out that 4x4 matrix, converting it to a orient quaternion, then promoting it dom from prim to point so you can drive a copy with it. This wrangle will do the first bit: matrix m = primintrinsic(0,'packedfulltransform',@ptnum); @orient = quaternion(matrix3(m)); And an attribpromote will do the second bit. I've attached a maya scene, houdini hip, alembic. alembic_transform.zip 2 Quote Link to comment Share on other sites More sharing options...
mikethomson Posted September 19, 2016 Author Share Posted September 19, 2016 (edited) Matt! I looked under prim intrinsics and it's pretty much zero'd out with no animation. Might be a weird alembic? It's just an animated cube in maya that I want to attach a model to... I'll have a poke around your example scene though Edited September 19, 2016 by mikethomson crap spelling Quote Link to comment Share on other sites More sharing options...
mikethomson Posted September 19, 2016 Author Share Posted September 19, 2016 Hmmm, looking at your foo.abc I get the same zero/one in intrinsic / transform. Should I be seeing results in the geometry spreadsheet? Ah, just re-checked. It seems intrinsic transform shows nothing, but packedfulltransform looks the goods. I'll try popping your point wrangle into my scene. Thanks! -Mike Quote Link to comment Share on other sites More sharing options...
mikethomson Posted September 19, 2016 Author Share Posted September 19, 2016 ...in the meantime, I hacked together a vaguely working version using the points on the three axes of my transform in a pointvop: Quote Link to comment Share on other sites More sharing options...
mestela Posted September 19, 2016 Share Posted September 19, 2016 many ways to skin that quat. 5 Quote Link to comment Share on other sites More sharing options...
eddgarpv Posted November 25, 2016 Share Posted November 25, 2016 Hello, I'm trying to do the same (get rotation) following Matt's suggestion but for some reason, there is a weird flip at some point in my orient attribute. I know I'm missing something, it's just I'm not really familiar with vex. Already tried a couple alternatives but this one looks more clear to me. I just wanted to create constraints and one thing leads to another I guess . test_constraint.zip 1 Quote Link to comment Share on other sites More sharing options...
mestela Posted November 25, 2016 Share Posted November 25, 2016 Huh, that's unexpected. I'm sure there's a flaw in my vex thinking, meanwhile I tried an alternative way with vops, seems to correct the flipping. primintrinsic -> extract transform -> deg to rad -> euler to quaternion -> orient keepconstraint_v3.hipnc 1 Quote Link to comment Share on other sites More sharing options...
fuat Posted November 25, 2016 Share Posted November 25, 2016 as Matt said. or in order to just attach or copy your model onto the alembic (without extracting the rotation matrix explicitly): primintrinsic (Signature Matrix4, Intrinsic packedfulltransform) pointing to your alembic file -> multiply by P (coming from geovopglobal) -> P (into geovopoutput). done. (this help comes from my friend Martin Matzeder aka booyabase and saved me 1 mio times so far....) Quote Link to comment Share on other sites More sharing options...
eddgarpv Posted November 25, 2016 Share Posted November 25, 2016 Thanks Matt, it is even more clear (I'm right now at the orient, matrices, quaternions and stuff ) Fuat: works good too, I'll see how much it changes within the dop network and constraints 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.