Match FBX Scale, Translation and Rotation in Houdini

   2799   2   2
User Avatar
Member
1 posts
Joined: Sept. 2022
Offline
Hello,

I'm trying to export a number of meshes (using fbx) from an external program - in this case Unreal Engine, and then copy an instances of another mesh on top of the original mesh at the exact pivot location, with the exact same scale, location and rotation.

Currently, what I'm doing is using the attributes that come in with an fbx, (fbx_translation, fbx_scale and fbx_rotation) to create a point for each mesh, and then use a Copy to Points to spawn the new mesh in the same location.

The Location and Scale are easy - I'm just copying the values from fbx_translation and fbx_scale to the spawned point, but I can't figure out how to take the fbx_rotation and feed that into @orient. I've read up a lot on quaternions, and I think I understand less now than I did originally .

Any ideas on how to match the fbx rotation with something Houdini could use? Or is there another way to do this entirely?

Attachments:
scaleandtranslation.png (56.4 KB)
fbxprop.png (38.9 KB)

User Avatar
Member
404 posts
Joined: April 2017
Offline
IIRC the `fbx_rotation` vector is just storing XYZ rotations as radians. You can feed this to the VEX `eulertoquaternion` function to create an orient attribute from this vector:

p@orient = eulertoquaternion(v@fbx_rotation, 0);

The second argument there is the rotation order; 0 is XYZ.
MOPs (Motion Operators for Houdini): http://www.motionoperators.com [www.motionoperators.com]
User Avatar
Member
4 posts
Joined: Feb. 2023
Offline
Hello,

have you figured it out? I work on something similar now as well and I can't figure out how to orient copied meshes. I am not sure how to use this @orient variable in order to actually orient the mesh
EDIT: I figured it out, so ont important anymore
Edited by gosiaS - March 22, 2023 08:25:11
  • Quick Links