Difference between revisions of "Houdini learning"
Jump to navigation
Jump to search
Line 44: | Line 44: | ||
// Kill emission on a smoke source after frame 300 | // Kill emission on a smoke source after frame 300 | ||
if (@Frame>300) @density = 0; | if (@Frame>300) @density = 0; | ||
+ | </pre> | ||
+ | |||
+ | === Attribfrommap - Use UDIMs images === | ||
+ | <pre> | ||
+ | // Replace 1001 by <UDIM> and check UDIM Filename Expansion | ||
+ | </pre> | ||
+ | |||
+ | === Attribwrangle - Udim number on primitives attributes === | ||
+ | <pre> | ||
+ | // In a wrangle set on Primitives | ||
+ | vector uv = primuv(0, "uv", @primnum, set(0.5, 0.5, 0)); | ||
+ | i@udim = 1001 + int(uv.x) + int(uv.y)*10; | ||
</pre> | </pre> |
Revision as of 16:01, 8 September 2020
Contents
Houdini learning
Increase Volume Density
// In a volumewrangle @density *= 10;
Substract any VDB by another VDB
// In a volumewrangle if (volumesample(1,"surface",@P)<0)@density=0; //inverse: if (volumesample(1,"surface",@P)>0)@density=0;
Get bound & centroid
// In a null object bbox(opinputpath('.',0),D_XSIZE) bbox(opinputpath('.',0),D_YSIZE) bbox(opinputpath('.',0),D_ZSIZE) centroid(opinputpath('.',0),D_X) centroid(opinputpath('.',0),D_Y) centroid(opinputpath('.',0),D_Z)
UVs
// In this order : uvautoseam - uvflatten - uvlayout In uvflatten : Seams = seams
Attribwrangle - if...
// Kill emission on a smoke source after frame 300 if (@Frame>300) @density = 0;
Attribfrommap - Use UDIMs images
// Replace 1001 by <UDIM> and check UDIM Filename Expansion
Attribwrangle - Udim number on primitives attributes
// In a wrangle set on Primitives vector uv = primuv(0, "uv", @primnum, set(0.5, 0.5, 0)); i@udim = 1001 + int(uv.x) + int(uv.y)*10;