Sine Wave

Generates a texture of soft stripes, rings or spokes.

Outputs

NameTypeDescription
Texture OutputTextureThe pattern, the same gray in red, green and blue.

Parameters

NameTypeDescription
ShapeEnumStraight stripes, rings around the center, or spokes from the center.Choices: Flat, Concentric, Radial
Texture TypeEnumThe channels of the output texture.Choices: R (u8), RG (u8), RGBA (u8)
Texture SizeVector 2 IntThe size of the output texture in pixels.
TransformTransform 3DMoves, turns and scales the pattern. Nothing connected leaves it centered and upright.
OffsetFloatThe gray the wave swings around.
AmplitudeFloatHow far the wave swings from the offset. 0.5 with an offset of 0.5 gives the full range from black to white.
FrequencyFloatHow many waves there are. For Flat that is across the width of the texture, for Radial around the full circle.
PhaseFloatSlides the wave along. Animate it to make the pattern move.
AlphaBoolWhether the transparency follows the wave too. When off the texture is fully opaque.

Sine Wave draws a pattern of smooth waves, fading between dark and light with no hard edges. Flat gives straight stripes. Concentric gives rings spreading from the center like ripples on a pond. Radial gives spokes around the center, and its frequency should be a whole number so the last spoke meets the first.

The frequency sets how many waves fit in the texture, and the phase slides them along. A steadily rising signal on the phase makes the stripes scroll, the rings spread or the spokes turn. The transform moves, turns and scales the whole pattern, so a rotated transform gives diagonal stripes. Offset and amplitude set the gray range. The defaults of 0.5 and 0.5 run from black to white, and a smaller amplitude gives a softer pattern.

With Alpha on, the transparency follows the wave as well as the gray, so the dark parts are see-through. That makes the pattern ready to lay over something else. Like Noise, it is a starting point rather than a finished image: color it with a Color Ramp, or use it to drive a Displace.

Keywords: stripes, rings, spokes, pattern, gradient, generator, waves, zebra