# Seamless noise

Hi

Maybe this node setup is useful for some. It’s basically a way of ensuring no visible seam when using noise on mapped coordinates. So the outputted noise level at x=0 and x=1 is identical. Previously I’ve just mirrored the x value at 0.5, but that obviously causes a very visible flip. This one does have the flip, but it’s at a disjointed location, meaning that at x=0.5 there is no visible flip.

The setup is using two noises with offset vector inputs (any random number in the vector add node will do).
Noise 1 goes up and down creating the mirrored effect.
Noise 2 goes up and suddenly switches to bottom then ramps up again.
Clever mixing of the two makes sure none of these mirrors and jumps are visible.

I’ve left the curves in the node tree so you can visualize what the math nodes actually do.
The blue and yellow nodes at the bottom are the contents of the custom math nodes. I use these a lot because curves just doesn’t work well.

Ok, so the node setup is like this:

I didn’t get conclusive answer in this thread about using color (3ch) nodes for math (1ch) stuff wrt efficiency, so I’m still using math based mixer (fLerp) rather than a color mixer.

When to use it?
Whenever you go “I need to hide this noise seam”, you should think of this post

### Attachments

It would be better if you provided a before and after render shot.

Good point, and I agree. I’ll see if I can update original post during the weekend. Besides, I’ve found a much simpler approach using a triangle wave mix mixing between normal modulo and offset modulo. For the rare occasion that Object coordinates needs to be used, I made a custom modulo function that is continuous when flipping from negative to positive coords. Proper examples of when I would typically use this will also be provided in original post.

Well, I wasn’t allowed to have more than 3 images per post, which kind of ruins the idea of me posting quick tutorials here.

So…
----- UPDATE -----
Same idea, just much simpler. Basic idea of the node setup goes like this:
[ATTACH=CONFIG]394841[/ATTACH]
The green math based modulo should be replaced with a group consisting of what is shown in the yellow frame IF:

• Object Coordinates are used such that x used in function is negative.
The yellow frame custom Modulo function will ensure mod 1 to be continuous even if it crosses zero. If Object Coordinates are used, but the result used is still positive (such as a node group doing polar and spherical coordinate transforms, x being angle 0 - 1), the original modulo can still be used.

Some examples of why I find this stuff actually useful (assembled picture due forum limits):

Noise output used in an exaggerated way to illustrate the point better. Not made to look nice.

Plane: Consists of 4 separate bordering planes. Note how noise becomes seamless over x in the right picture. Uses Object Coordinates as an experiment, which is how I spotted the modulo problem (see fix for that above), although it didn’t have to. This one requires the use of the custom Modulo function because x goes into the negative.

Teapot: UV Unwrapped where any procedural noise will create a visible seam, which is magically eliminated in the right picture. Also uses UV Map to drive anisotropic tangent. Mapping anisotropic tangent by UV direction/orientation appears to be slightly buggy in 2.75 (sharp shading artifact where the seam is, even if the noise over the seam itself is seamless).

Bushing: Utilizes a “Custom Mapping” node where one of the outputs is “Disk Mapping” rather than UV Unwrapped. Z axis used as tangent (instead of having a UV seam) so no shading artifact is showing. Uses Object Coordinates because the “Custom Mapping” node requires it, but output of that x is still in the 0 - 1 range (represents 0° - 360°), it can still use a regular math based modulo function.

Other uses: Either replace function of x to become function of z (and let x stay original), or possibly swap x and z, your can have a noise setup that is seamless in z. Mapping this to a flat ground plane and animating z, instead of a noise being seamless in a visible direction, you get a noise that is cyclic. Possibly useful to precreate animated cyclic textures.

Imagine the possibilities if we had 4D noise…

Hi, I’m looking for similar effect - my results is not so good - could you provide blend file of this material?
Thank you.
F