Jump to content

Random start or activation of sim objects


Recommended Posts

Using this excellent example as a starting point to staggger the start of simulation objects in a bullet solver

http://www.tokeru.com/cgwiki/index.php?title=HoudiniDops#RBD_inherit_.40v_and_.40w_after_initial_frame

 

But how would I modify this example so that the start is random instead of staggered?

 

This gif illustrates my original problem. Notice the tiles under the sphere clump and fall together.

random_start_sim_objects.gif.9c3a39cd7df37118b16f002d67b5b1a7.gif

 

 

Edited by art3mis
Link to comment
Share on other sites

Thanks. But I need a random, not any type of staggered effect.

Did a bunch of searching and think I'm closer. This thread in particular http://forums.odforce.net/topic/16867-per-fracture-object-density/

The key find for me in this thread I think is use of the Active Value DOP with default operation = Set Always. I then simply need a proper expression in the Active field, I'm guessing using $OBJID, that will evaluate to 1 at a random frame between say 1 and 100 using the OBJID as a seed for the random frame interval.

Thoughts?

Link to comment
Share on other sites

If you're working with packed objects you can set an active attribute on each objects in the SOP level.

I wrote this expression in a Point Wrangle to randomise the activation:

int randomF = ceil(fit01(rand(@ptnum), 1,30));
if(@Frame>=randomF){
    i@active = 1;
    }
    ;

Then under the rbdpackedobject1 node in the dopnet I checked "Overwrite attributes from SOPs"

randomActivation.hipnc

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...