qLab / qLib

A procedural asset library for SideFX Houdini. https://www.facebook.com/qLibHoudini
http://qlab.github.io/qLib
Other
741 stars 117 forks source link

functionality to deform volumes #432

Closed johnnyquest closed 8 years ago

johnnyquest commented 8 years ago

https://www.facebook.com/qLibHoudini/photos/a.396009720432818.98425.145692112131248/1162383330462116/?type=3&theater

some code!

int prim;
vector uv, p0;

xyzdist(chs('deformgeo'), @P, prim, uv, 0.0001);

if (prim>=0) {
p0 = primuv(chs('restgeo'), 'P', prim, uv);
@density = volumesample(0, 0, p0);
} else @density=0;

limiting the xyzdist() lookup and using the if() is way faster than just blindly looping through the volume

should work with vector (velocity) fields

put an additional vdbactive at the end to get rid of empty areas

duplicate of #408

johnnyquest commented 8 years ago

geometry:

johnnyquest commented 8 years ago

first prototype done, so i'm closing this