Jump to content

RBD packed in Bullet, ptnum change when object is active


wandersonp

Recommended Posts

Recently I discover something interesting after smash my head against wall for a few days.

 

Im creating a simulation using bullet and packed prims, and I need activate (using i@active variable ) the pieces in choreographed way over the frames

 

But the thing make me crazy is that bullet change ptnum of each packed primitive over the time, and I think is about some priority list inside the algorithm of the solver.

 

because after the simulation I need to atach some atributes for each simulated piece. Then I realize that I need to attach theses attributes before simulation or atach some sort of ptnum tracking for them.

 

post-6054-0-47462400-1442670863_thumb.pn

bullet activate order points_v001.hip

Link to comment
Share on other sites

it looks like bullet splits active and inactive pieces for some internal computation and then merges them one after another, maybe it's for optimization purposes or maybe it doesn't matter and can be prevented, whatever is the case

@ptnum is not guaranteed to produce consistent results anyway, what if you start adding/deleting rbds in the sim?

 

you should be using @id or @name to match your pieces, not @ptnum

 

EDIT: btw, bullet creates and tracks @id attribute internally, so you don't need to create your own

Edited by anim
  • Like 1
Link to comment
Share on other sites

I fixed this in H15 - it was just an unintended side effect of how deforming objects were updated. Note that your setup marks the objects as both animated and deforming, which probably isn't what you want. And, as anim noted, relying on ptnum is dangerous if objects are ever removed from the sim.

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...