nguyen vuducthuy
nguyen thuy
About Me
Connect
LOCATION
Not Specified
WEBSITE
Houdini Skills
Availability
Not Specified
Recent Forum Posts
Extracting Alembic Data July 19, 2016, 3:22 a.m.
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”;
Extracting Alembic Data July 13, 2016, 6:44 a.m.
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"]
Extracting Alembic Data July 12, 2016, 10:25 a.m.
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])