Blending object colors into a texture map

calendar_today

24.12.2022

label

Texturing

mouse

Houdini 18.0

Description

Transfering object colors onto a nearby mesh surface by filtering a point cloud.

1 Code discussion

A volumewrangle finds nearby points with pcopen(), blends their colors using pcfilter() and assigns them to a UV map.

CPP
        int samples = chi('samples');
float radius = chf('radius');

vector tex = relbbox(0, v@P);
vector pos = uvsample(1, 'P', 'uv', tex);

int handle = pcopen(2, 'P', pos, radius, samples);
vector color = pcfilter(handle, 'Cd');
v@Cd = color;
    
download

Downloads

link

Related articles

favorite

270

label

Texturing

Accumulating the amount of daylight

favorite

334

label

Texturing

Camera projection to a curved screen

favorite

271

label

Texturing

Camera visibility texture

favorite

282

label

Texturing

Mapping caustics from 3D meshes

favorite

261

label

Texturing

Circular Color Gradients in VOPs

favorite

294

label

Texturing

Cylindrical UV Projections with VEX