Cameron White

cwhite

About Me

Expertise
Developer
Location
Canada
Website

Connect

Recent Forum Posts

Plot crowd agent animation back to bones April 21, 2017, 2:18 p.m.

There's an open RFE to have an easy way to bring an agent's joint transforms into CHOPs (such as a new mode on the Agent CHOP), but it could probably also be done with the new wrangle CHOP and the agentlocaltransform() VEX function.
You'd have to be careful about the rotation order (bones use ZYX) and the presence of any pretransforms on the objects.

If you're not trying to transfer it back onto the original rig, the following snippet may be a useful starting point - it builds a joint hierarchy and sets their transforms to match the agent's current pose.

# 'agent' is a hou.Agent instance, such as geo.iterPrims()[0]
root = hou.node("/obj")
subnet = root.createNode("subnet", "import_from_agent")
rig = agent.definition().rig()
# Create joints.
joints = []
for xform_idx in range(0, rig.transformCount()):
    xform_name = rig.transformName(xform_idx)
    joint = subnet.createNode("null", xform_name)
    joint.setParmTransform(agent.localTransform(xform_idx))
    joints.append(joint) 
    
# Wire up the nodes.
for xform_idx, joint in enumerate(joints):
    parent_idx = rig.parentIndex(xform_idx)
    if parent_idx >= 0:
        joint.setNextInput(joints[parent_idx])
subnet.layoutChildren()

Autorig and crowds April 19, 2017, 2:21 p.m.

I wouldn't expect any issues - it should be roughly equivalent workflow-wise to using the Mocap Biped 1/2/3 HDAs, so you'd use the Object Subnet / Scene mode of the Agent ROP/SOP instead of the FBX mode.

Houdini Crowds: Orient different crowdsource nodes April 5, 2017, 3:04 p.m.

I'd suggest submitting an RFE for this. It might be a useful addition to something like the POP Steer Align DOP.