Dynamically adding new geo to a dops sim

   4312   6   1
User Avatar
Member
319 posts
Joined:
Offline
Hey all,

So I want to add new RBD object dynamically to my DOP simulation as the sim calculates. I got this to sort of work but not in the way I need it to work.

At first I thought it would be as easy as checking the ‘use deforming geometry’ checkbox on the rbd fractured object node but this has proved not the case.

When using the rbd object dop, checking this option does work, and introduces boxes (in my test hip attached) as the sim progresses. The problem with this is then multiple, unconnected boxes are treated as one connected object. It seemed a simple enough idea to swap using the rbd object dop to using the rbd fractured object dop, check the ‘use deforming geometry’ checkbox and away I go. Alas this does not work. Doing this simply runs the sim with one box and doesn't dynamically introduce any new geo.

I unlocked the fractured object dop and poked around inside for a bit and basically managed to get it to dynamically bring in new boxes as the sim progresses, but in doing so ‘broke’ the mechanism which causes the fractured dop to recognize individually grouped, unconnected geo as separate objects in the dop sim.

Does anyone know the solution to getting the fractured object dop to dynamically add geo as the sim progresses and to dynamically group the added geo into its own unique group and treat it as a unique object?

Please see hip file attached for where I am at currently.

Thanks!

Houdini apprentice 10.0.430 ,winxp

Attachments:
dynamic_rbd.hipnc (155.6 KB)

User Avatar
Member
44 posts
Joined:
Offline
Hey Dean,

I think the problem is that you need to also dynamically update the creation frame. Here is your scene revised with a fix. I set it up to continue creating up to frame 5, just for a quick test. Remember to change it back for the final test. The big issue is that at the dop level, it continuously adds the objects at each creation frame which will really slow things down. Not sure how to delete these duplicated objects. Anyway, that issue is bypassed at the object level. Just look at the scene file, and hopefully, you'll understand what I mean. It's not perfect but may work for your situation.

HTH

Attachments:
dynamic_rbd_revised.hipnc (124.9 KB)

User Avatar
Staff
809 posts
Joined: July 2006
Offline
Yes, Creation Frame is the key to getting a node like RBD Fractured Object to create objects on several different frames. (It just triggers the Activation of the underlying Empty Object DOP)

One way to handle the multiple objects is just make sure that your SOP network only produces the geometry that is to be turned into DOP objects for the current timestep. Then uses a “nprims” expression to only update the CreationFrame when there are new objects to create.

See the attached example.

Attachments:
add_rbd_fractured.hipnc (96.8 KB)

User Avatar
Member
319 posts
Joined:
Offline
Thanks a lot guys, much appreciated.

I also found a good way around the duplicate geometry within the dop network is to use the ‘Group Mask’ field to specify only the geo you want to bring in at that frame. For example when using connectivity/partition to generate your groups in sops, they are usually nicely numbered, like in my test hip box_0, box_1, box_2 etc. We can use this to our advantage with a simple expression on the group mask to pull in only the geo we want each frame, in my case this was:-

box_`$F-1001`

(my frame range starts at 1001). So now I get box_0 pulled in on frame 1001, box_1 on frame 1002 etc.

Thanks again!

Dean.
User Avatar
Member
44 posts
Joined:
Offline
Hey Dean,

Glad it works. I actually tried different expressions in the group mask field but nothing worked. Thanks for updating us. Such a simple expression but it works.

cheers
User Avatar
Member
319 posts
Joined:
Offline
np!
User Avatar
Staff
809 posts
Joined: July 2006
Offline
You're right, I think using the group mask is a better way to do it, assuming you can generate group names that contain multiple objects and can be calculated from the frame number or otherwise.

In that case, your SOP network doesn't necessarily need to be time-dependent and can cook only once, which is always a good thing. Also, the Fractured Object creates no objects if the provided group is empty, so you can just set the Creation Frame to $F and be done. Definitely cleaner than my example.
  • Quick Links