originalClown Posted May 10, 2020 Share Posted May 10, 2020 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 Quote Link to comment Share on other sites More sharing options...
toadstorm Posted May 10, 2020 Share Posted May 10, 2020 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) Quote Link to comment Share on other sites More sharing options...
originalClown Posted May 11, 2020 Author Share Posted May 11, 2020 Hi thanks for the reply, I actually managed to get a solution from Reddit in the end. Added a random offset variable to the scattered points that could then be applied to a timeshift node Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.