0 like 0 dislike
51 views
Hi,
I'm just started learning popcorn fx a couple of months ago, and it's really great! Also I have a couple of questions, that I could not figure out from tutorials or other sources. )

I was wondering, is there a way to start playing atlas animation from the random frame? Like for example if I have a looped smoke animation and I want each new particle to start playing from a random frame so the whole smoke effect would be more visually randomized. Of course, I tried plugging the "rand" node in the first frame ID in the flipbook node and switching it to "age" from "life ratio" but it didn't work properly.
by Valentyn (150 points)

1 Answer

2 like 0 dislike
 
Best answer
This is how I solved it - I am sure there are other ways. (For some reason I cant attach an image of the nodes - so here is the equivalent).

textureID = mod((randomFrame + Flipbook.TextureID), totalFrameCount);

Add your random offset to the output of the flipbook node (textureID). Then Mod that by the total frames of your flipbook - the output of that goes to your render node.

Hope that works for you.
- Brian
by brian.merrill (480 points)
Hi,

Indeed, Brian solution will work perfectly fine.

Some more insight on this : The flipbook node "just" contains some logic to generate an ID inside some specified range from a cursor. You can set its mode to "custom" and offset any custom cursor.

Let's assume you're animating using the age of the particle, you could do :

 https://i.ibb.co/TqKs3fj/Untitled.png

 Paul
It worked perfectly! Thank you, guys )
@brian.merrill > Quick note about linking images, the only way I know of is to upload your image on imgur or something, and link it as an image in here, and pasting the URL in the popup that shows up when you click the image icon in the reply form.
Kind of sad there isn't anything builtin to upload images in here.
...