Hi guy’s, i am trying to loop seamlessly the noise W value and i did a search on this and found a few post but they are not clear enough for me to understand.
I don’t think this is going to look what you expect though. Using only one parameter, a function returning back to base will have to do acceleration and deceleration and at some point stand completely still. What you want is a continuous motion around a circle, but that needs two parameters, and you can only get 2D noise. So instead of trying to use both cos and sin in a non working magical fashion into W, you use cos into a coordinate axis (say, Z) and sin into W. Something like this should work, at the cost of not having 3D output:
I think you should be able to extend this at least a little bit in the 3rd dimension by mapping the texture’s Z coordinate (which you left open) onto an offset on the Amplitude value. As long as this offset is small compared to the Amplitude base value, the distortions should remain small.
Updated with using object.z → all 4 inputs, muting some, experiment with it.
Better than stretching maybe, but not ideal as you get a pulsating “motion” in the noise.
Mapping it on using triplanar blended approach didn’t work well either, as noise breaks its continuity.
Adding object.z to amplitude just made the front evolve more than the rear. Not best either.
Yeah, I observed the same, I think this only works if you multiply object.z with a factor much lower than the base amplitude value (maybe a factor 10 smaller) before adding it to the amplitude.
Maybe one could also rotate the coordinates additionally, to spread this issue around all coordinates? (Something like a twisted torus in 4D space)
In this particular case, I’d probably use the coordinate with the smallest object dimension to drive the amplitude, in order to minimize the distortions.
Note that you can use something similar to loop non-loopable generators across at least one seam. UV in → some math → 3D vector out for 3D generator that loops perfectly across one seam. Very useful for bendable cylindrical shapes where you need to use UVs and you need looping noise over the seam. Since it loops at UV.x edge the UV has to fill the space and will impact density of cylinders with varying thickness and quite impossible to implement on branching shapes. But I use this all the time (for aniso rotation).
So the UV version creates the surface of a 2D torus in 4D space, right? This means that if you embed the torus in 3D space instead, you could use the 4th dimension for animation, including, of course, some distortions along the way.
Edit: I tried it and, while it works, the distortions are probably too much for most cases:
Only purpose for me for the torus mapping was to use it to create seamless lookup textures. But I found it too hard to control what’s going in within that coordinate space. Obviously it would have been much better and easier if we had a repeat switch for the xyzw parameters. The cylinder (2D->3D, seamless over one axis) is much more useful and something I use all the time for real objects.