Jump to content

Help with retiming multiple explosion instances


originalClown

Recommended Posts

Hi,

I've scattered 5 explosions to points using a switch node and a foreach loop. The explosion are randomly assigned to point but I need to have them offset at random as well. How would I go about achieving this? The effect I'm going for is flak in a WW1 scene but at the moment all the explosions start at the same time

image.png.31c44a8b8fe3275ccf8824635d90a45b.png

Link to comment
Share on other sites

If you're loading the explosions in as packed disk sequences (option is on the File SOP) then you can set the "index" primitive intrinsic attribute after the Copy operation to choose your offset. For example:

float rand_offset = fit01(rand(@elemnum), 0, 24);
setprimintrinsic(0, "index", @elemnum, floor(rand_offset), "add");

If your flak volumes have more than one primitive, you'd just want to make sure your random offset was the same for all primitives within a single volume (density, vel, temperature, etc)

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