Painting textures with curves

calendar_today

14.05.2022

label

Texturing

mouse

Houdini 18.5

1 Example file

Demonstrating how to trail curves along surfaces and transfer them to textures.

2 Code

Remapping the distance from the mesh surface position to the streaking curves.

vector clr_bg = chv('background_color'); 

vector bb = relbbox(0, v@P);
vector uvw = set(bb.x, bb.y, 0.0);
vector pos = uvsample(1, 'P', 'uv', uvw);

int pr;
vector uv;
float dist = xyzdist(2, pos, pr, uv);
float stroke = chramp('stroke', uv[0]);
float mask = smooth(0.003 * stroke, 0.005 * stroke, dist);

vector clr = prim(2, 'Cd', pr);

v@C = lerp(clr, clr_bg, mask);
download

Downloads

smart_display

Videos

Painting textures with streaking curves - Houdini Tutorial