Jeff Lait


About Me

Not Specified


My Tutorials

obj-image Masterclass
Houdini 16.5 Masterclass | OpenCL
obj-image Masterclass
Houdini 16 Masterclass | Heightfields
obj-image Masterclass
Houdini 16 Masterclass | Compiled SOPs
obj-image Masterclass
H15 Masterclass | Grains
obj-image Masterclass
H15 Masterclass | Loops
obj-image Masterclass
H15 Masterclass | Distributed Simulations

Recent Forum Posts

Strange behavior with edge transport April 2, 2018, 10:27 a.m.

Total sets each point to the total of all *previous* points. It does not include itself. If I add back in the original relax attribute of each point after the transport, you will get the same result in both cases.

OpenCL CPU uses more ram? Sept. 26, 2017, 12:44 p.m.

OpenCL uses flat grids, while the native system uses tiled grids. This allows the native system to collapse constant tiles and use less memory. One of the big speed advantages OpenCL has on the CPU is due to the flat grids, however, so this is probably a trade off that will remain.

pcopen to add points based on distance Sept. 20, 2017, 10 p.m.

I strongly recommend using pcfind() instead. The pciterate loop is a bit odd, and pcimport doesn't help you with general attribute import problems, while the point() works everywhere.

// If closest point to us is farther than threshold,
// add point at midpoint

float threshold = 1;
int nearpts[] = pcfind(0, 'P', @P, /*maxdist*/1e20, /*numpt*/ 2);

// Nearest point is ourself, so we are interested in second
if (len(nearpts) > 1)
int pt = nearpts[1];
vector npos = point(0, 'P', pt);
if (length(@P - npos) > threshold)
// Too far, add a point.
vector midpoint = (npos + @P) / 2;
addpoint(geoself(), midpoint);

Note the difference between len() and length().