3
$\begingroup$

I followed this tutorial: https://www.youtube.com/watch?v=Jvbphr8EUYQ to create a fire material which basicly "runs" down a noise texture to create a fire effect.

so far so good, but I would like to create a perfect loop. with a little bit of googleing, I found out how to Loop a noise texture but my problem is now I lost the fire effect and just got this stationary wobble effect.

now to my question. whats the best way to perfeclty loop an animation like this? I can't wrap my head around the problem.

Can I mirror the noise texture somehow 4 times to after x time get back to "0" ? whats the best way to approach this?

Thanks a lot for your answers!

$\endgroup$

1 Answer 1

3
$\begingroup$

The principle behind this method is described here, and even here, but the group to implement it wasn't conveniently packaged for re-use, so I think this repetition is excusable. It works if an animation can be mixed over itself without loss of desired characteristics.

It relies on cross-fading an animation with a copy of itself, cut in the middle. The right trim of the copy is moved to the left, and vice-versa, so its matching cut is over the ends of the loop. The cross-fade conceals the jump in the middle. This group will do it:

enter image description here

The red nodes are the shifted A-roll, the green node the un-shifted B roll. The blue nodes do the cross-fade.

It can be used like this, with the driver for both rolls being the frame-count:

enter image description here

Simply duplicating is the quickest way, but the A and B roll don't have to be identical, although they look better with the same speed in the direction of animation. In this example, for convenient tweaking, the fields of the 'B' noise are driven by the fields of the 'A' noise, to keep them matched.

enter image description here

This demo .blend includes the group:

$\endgroup$
9
  • $\begingroup$ I knew you would… :) The cross-fade technique is kind of cheap for your skill level though and I thought you would use a 4D torus technique - or that doesn't work, because in the end of the day, if you move in circles to return where you started, it doesn't matter how many dimensions you move in, there always will be a side-motion visible? We could simplify the problem to separate flames, and ensure if one doesn't disappear till the end of animation, it continues from the beginning. That would require calculating the lifetime of the flame based on the noise which definitely isn't trivial… $\endgroup$ Commented Oct 25, 2022 at 9:48
  • 1
    $\begingroup$ @MarkusvonBroady Hehe :D I did consider it.. Your objection, (and laziness) is why I didn't go for it. A circle is a circle, however many dimensions it's in, and I think you would see a reversal in direction. But I haven't checked , so now you've blown away my afternoon... >8-/ $\endgroup$
    – Robin Betts
    Commented Oct 25, 2022 at 10:04
  • 1
    $\begingroup$ nerd sniped $\endgroup$ Commented Oct 25, 2022 at 10:06
  • $\begingroup$ @MarkusvonBroady EXACTLY! 8D ! $\endgroup$
    – Robin Betts
    Commented Oct 25, 2022 at 10:17
  • $\begingroup$ @RobinBetts Thanks a lot for your explanation and demo-file, I will tonight try to understand each node and learn a lot from it! $\endgroup$ Commented Oct 25, 2022 at 15:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .