A volumewrangle finds nearby points with pcopen()
, blends their colors using pcfilter()
and assigns them to a UV map.
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;