Jeff Lait

jlait

About Me

Expertise
Developer
Location
Not Specified
Website

Connect

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

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().

General FLIP Questions Sept. 12, 2017, 8:45 a.m.

catchyid
seems like squeezing too many particles in one voxel that should eventually spread up to maintain their particle separation

A subtle point about FLIP sims is that particles are just markers. They don't actually take any space themselves. This is why spawning particles inside a tank doesn't cause the water level to rise.

catchyid
My question: who defines liquid surface in the first place?

It is a chicken and egg question :>

The particles define the surface; then the surface is used to define the particles. In standard FLIP, each frame the surface is created fresh from the particles and isn't used on the successive frame. But during the frame's computation it is used for things like determining if particles are deep in the fluid or not.