Hi All,
One thing that has popped up onto my radar is when using Alembic data in your scene there is no transform / rotational data to hook into like FBX which has key framed values.
You can using the rivet sop which although nice is not really useful for pulling anything but transform data. So If I have a cube moving through a scene and rotating , what are people doing to pull out trans / rot data .
Rob
Extracting Alembic Data
20460 10 2- circusmonkey
- Member
- 2624 posts
- Joined: Aug. 2006
- Offline
- tamte
- Member
- 8766 posts
- Joined: July 2007
- Offline
well, you can parent anything to Alembic Xform node
or
get any portion of its transform through origin() expression
or
use Object CHOP
EDIT:
but if you are talking about cached deforming meshes, not animated objects, then you are left with
Rivet Object
or
Extract Transform Object
or
custom VOP or python solution to extract transform from relative point movements
or
get any portion of its transform through origin() expression
or
use Object CHOP
EDIT:
but if you are talking about cached deforming meshes, not animated objects, then you are left with
Rivet Object
or
Extract Transform Object
or
custom VOP or python solution to extract transform from relative point movements
Tomas Slancik
FX Supervisor
Method Studios, NY
FX Supervisor
Method Studios, NY
- circusmonkey
- Member
- 2624 posts
- Joined: Aug. 2006
- Offline
- Stalkerx777
- Member
- 183 posts
- Joined: Nov. 2008
- Offline
- buki
- Member
- 1773 posts
- Joined: Dec. 2006
- Offline
hi!
I found that the easiest way is using the object chop, it grabs world position baked down from parents.
Also you can filter the transforms only from the alembic file when reading in.
I found that the easiest way is using the object chop, it grabs world position baked down from parents.
Also you can filter the transforms only from the alembic file when reading in.
daniel bukovec | senior fx td | weta digital
qLib -- http://qlab.github.io/qLib/ [qlab.github.io]
qLib -- http://qlab.github.io/qLib/ [qlab.github.io]
- circusmonkey
- Member
- 2624 posts
- Joined: Aug. 2006
- Offline
- koen
- Member
- 792 posts
- Joined: April 2020
- Offline
- circusmonkey
- Member
- 2624 posts
- Joined: Aug. 2006
- Offline
- nguyen thuy
- Member
- 3 posts
- Joined: Nov. 2013
- Offline
hi there, i want to extract a transform data from alembic file but i only can export one object, so what i want to do i want to do for all object in alembic archive. i want to use alembic transform as template point to use with copysop .. any idea?
import _alembic_hom_extensions as abc node = hou.pwd() geo = node.geometry() # Add code to modify contents of geo. # Use drop down menu to select examples. abcPath = "D:/thuy_max/00_max/export/OBJ/soleil/SOLEIL_LOCATION_thuy_00_export/test.abc" objectPath = "/Plane001" sampleTime = 1 abcXform = abc.getLocalXform(abcPath, objectPath, sampleTime) geo.addAttrib(hou.attribType.Point, 'abcXform', abcXform[0])
- nguyen thuy
- Member
- 3 posts
- Joined: Nov. 2013
- Offline
well i got it but right now i don't know how to cenvert it into an orient attribute it's a quaternion data type and the data i got it is an matrix4
import _alembic_hom_extensions as abc node = hou.pwd() geo = node.geometry() # Add code to modify contents of geo. # Use drop down menu to select examples. abcPath = "D:/thuy_max/00_max/export/OBJ/soleil/SOLEIL_LOCATION_thuy_00_export/test.abc" sampleTime = 1 x4_attrib = geo.addAttrib(hou.attribType.Point, "m4", ( 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0)) x3_attrib = geo.addAttrib(hou.attribType.Point, "m3", ( 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 )) ori_attrib = geo.addAttrib(hou.attribType.Point, "ori",( 0.0, 0.0, 0.0 )) for prim, point in zip(geo.prims(), geo.points()): objectPath = prim.attribValue("path") abcXform = abc.getLocalXform(abcPath, objectPath, sampleTime)[0] x4 = hou.Matrix4(abcXform) x3 = x4.extractRotationMatrix3() srt = x4.explode(pivot = point.position()) point.setAttribValue(x4_attrib, x4.asTuple()) point.setAttribValue(ori_attrib, srt["rotate"]) print srt["rotate"]
- nguyen thuy
- Member
- 3 posts
- Joined: Nov. 2013
- Offline
i got it, simple use wrangle node
//extract orient
matrix thuy = primintrinsic(0, “packedfulltransform”, @primnum);
@orient = quaternion(matrix3(thuy));
// get objs
string path;
getattribute(@OpInput1, path, “prim”, “path”, @ptnum, @vtxnum);
string objs = split(path, “.”);
// set instance path
s@instancefile = chs(“instance_Path”) + objs + “.obj”;
//extract orient
matrix thuy = primintrinsic(0, “packedfulltransform”, @primnum);
@orient = quaternion(matrix3(thuy));
// get objs
string path;
getattribute(@OpInput1, path, “prim”, “path”, @ptnum, @vtxnum);
string objs = split(path, “.”);
// set instance path
s@instancefile = chs(“instance_Path”) + objs + “.obj”;
-
- Quick Links