Instanced Actors don't move with transform data

I’m building a 3D hand from LeapMotion data that I want to include in a collision simulation. When I try to use tx, ty, tz to instance joints in an Actor COMP, the instances do not update with the CHOP they are being instanced from. Pulsing the “initialize actor” parameter will update the instances with current positions, but then it’s frozen.

Is this intentional? Is there any plan to make it so I can instance from fluctuating data? For now I’m just using a replicator to make 20 actors and referencing joint positions, but I imagine instancing would be far more efficient.

3d_Leap_Actor.tox (2.9 KB)

To modify transform data during the simulation use the Bullet Solver CHOP + Feedback CHOP parameter on the Actor/Bullet Solver COMP. There’s a few Bullet Solver snippets showcasing the workflow.

I thought it might have something to do with that, was a little tricky getting all the parameters correct, but it’s working now. Thank you!

I’m curious how you solved this. I’m having the same difficulty.

@michael_e
There’s a feedbacking example in the operator snippets that helped me get my head around it. You use a Bullet Solver CHOP to get the data from an Actor, then replace the data you want to control, in my case [tx, ty, tz] and use the resultant CHOP in the Bullet Feedback CHOP parameter of the target Actor. I think it’s important to keep the metadata channels [actor_id, body_id, active] that the Bullet Solver CHOP gives you. Also make sure you start the simulation.

I can upload an example if you’re still having trouble, I’m just digging into this project again after a month-long hiatus.

found it!: ) thanks for the clues.

Heads up, if you want the instanced actors to collide, modifying/feedbacking transform data actually won’t work. I just figured this out in the past few days: since you’re just forcing an update to the position, there’s no velocity/momentum, and so no transfer of energy to another object.

I tried calculating velocity using the Slope CHOP and feedbacking the velocities… did not work so great, but I’m going to play with it some more.

Heads up, if you want the instanced actors to collide, modifying/feedbacking transform data actually won’t work. I just figured this out in the past few days: since you’re just forcing an update to the position, there’s no velocity/momentum, and so no transfer of energy to another object.

Yeah, if the goal is to move the body while maintaining simulation integrity then feedbacking with velocity is the way to go, rather than position.

If you haven’t already, you should check out the 2D attraction snippet. It uses a simple technique to move bodies to a point using velocity feedbacking.

I’m getting a value of -1 as both the colliding_actor_id and body_id for the motion instanced actors … in the CHOP/DAT table from the ‘regular’ instanced actors. I’m not sure why?

I do get functional looking collisions with just the position, but the CHOP/DAT pull shows another story : (

Maybe need to pull both the position and rotation into the feedback CHOP to get fully accurate momentum from collisions. Makes sense.

I’m getting a value of -1 as both the colliding_actor_id and body_id for the motion instanced actors … in the CHOP/DAT table from the ‘regular’ instanced actors. I’m not sure why?

Do you have the perform contact test toggle enabled on the bullet solver COMP?

I’m not sure I’m following though. What are the CHOP/DAT tables you’re referring to? Are those the instancing inputs? What’s the end goal you’re trying to achieve?

Perform contact test is on, yes.

Right, so the BulletSolverCHOP output, CHOPtoDAT table is what I’m looking at.

One actor is instanced from SOP points, the other from incoming motion data. Their collisions register as -1 in the output table.

I’m trying to keep track of which SOP instances are colliding with the motion instances.

Does the onCollision python callback work?

It surely does : ) I’m having trouble finding much information, tutorial or examples though. Do you know where these might be found? There are many “Basic Setup” examples but rather few beyond that. At least that my searches are returning… for instance, this seems to be the only thread in the forum containing “OnCollision bullet callbacks” … is that possible?

There is a snippet that shows the fundamentals of the collision callbacks but not much beyond that.

Essentially, each collision is a tuple containing two body objects and an impact flag: Body Class - Derivative

Regarding the collision channels: it’s possible the collision is happening within a frame and isn’t captured accurately by the channel. Could you attach your toe file so I can try to reproduce the issue?