About Me

Not Specified
Not Specified


Recent Forum Posts

Agent unpacking for the purpose of extracting their skeletal animations? July 30, 2018, 7:45 p.m.

you don't need to unpack agents to access their bones. there's a few vex functions for looking at their animation.

for example, this will make a single point with a transform from an agent bone called “r_wrist_01”:
// extract a named bone transform from agents
p@orient = 0;
i@agentId = @ptnum;
s@boneName = 'None';

//get agents rig transforms and names
matrix agent_transforms[] = agentworldtransforms(0, @ptnum);
string agent_transform_names[] = agenttransformnames(0, @ptnum);

//get agent transform
matrix agent_xform = primintrinsic(0, 'packedfulltransform', @ptnum);

string bone = "r_wrist_01";
int idx = agentrigfind(0, @primnum, bone);
if (idx >= 0) {
  matrix boneMat = agentworldtransform(0, @primnum, idx);

  //get pos
  vector pos = {0,0,0} * boneMat;

  //add point at joint position + add agent xform
  int virtual_pointnum = addpoint(0 , pos *=agent_xform);

  //get orient + add agent xform
  matrix3 rotmat = polardecomp(matrix3(boneMat*agent_xform));
  vector4 qrot = quaternion(rotmat);

  int set_bonename = setpointattrib(0,'boneName', virtual_pointnum , bone);
  int set_orient = setpointattrib(0,'orient', virtual_pointnum , qrot);
  int set_charId = setpointattrib(0,'agentId', virtual_pointnum , @ptnum);

removepoint(0, @ptnum);

you get the general idea. extrapolate to multiple bones, use python HOM, whatever.


switch from lores geometry to hires and re-apply paint node. April 22, 2018, 7:16 p.m.

Attribute transfer from the low res is probably your best bet. Paint sop seems to be point order based, so a different topology will mess up the application of the data.


Pycharm or Visual Studio interpreter Dec. 6, 2017, 10:35 p.m.

I've had some mild success generating some dummy stubs using this as a base: []

it makes some mock hou modules that you can add to your python paths

it does leave some gaps where the inspect module isn't able to *ahem* inspect everything. but it's a good start.