Kishimisu Shader in COPs

calendar_today

03.12.2023

label

Texturing

mouse

Houdini 20.0

Description

A VEX version of Kishimisu's shadertoy artwork in Houdini's COPs with most variables exposed as parameters.

1 Code discussion

Houdini snippet-node in a VOPCOP2-generator.

The palette-function returns harmonic color combinations by combining the color vectors a, b, c and d. The method is described here: https://iquilezles.org/articles/palettes/

All circular patterns are created based on the centered uv coordinates ranging from -1.0 to 1.0 along the horizontal axis. uv0 is a duplicate of uv, to be repeated as tiles several times across the canvas. The color palette is offset with each iteration i. Essentially a sine wave on the distances towards the centers of uv and uv0 creates lots of intersecting circles.

// (c) kishimisu 2023
// https://www.kishimisu.art/
// https://www.shadertoy.com/user/kishimisu


function vector palette(float t){
    vector a = vector(0.5);
    vector b = vector(0.5);
    vector c = vector(1.0);
    vector d = set(0.263, 0.416, 0.557);
    return a + b * cos(PI * 2 * (c * t + d));
}

vector2 uv = set(X, Y) * 2.0 - 1.0;
vector2 uv0 = uv;
vector clr = vector(0.0);

for(int i = 0; i < iterations; i++){

    uv = frac(uv * repetitions) - 0.5;
    
    float d = length(uv) * exp(-length(uv0));
    vector col = palette(length(uv0) + i * offset + TIME * offset);
    
    d = sin(d * speed + TIME) / speed;
    d = abs(d);
    d = pow(falloff / d, contrast);
    
    clr += col * d;
}

assign(R, G, B, clr);

2 Source

Published with friendly permission by kishimisu, https://www.youtube.com/@kishimisu.

download

downloads

smart_display

videos

An introduction to Shader Art Coding