From the course: Houdini: Particles
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Create instance
- [Instructor] Alright, so now we're gonna create an attribute called "instance" that's a string attribute on each of the points that is actually the full path to the instance geometry we want on that point. And we're gonna use a node we haven't used yet, which is the attribute wrangle, so grab this little cowboy hat guy here, and the attribute wrangle basically allows us to do all this stuff we're doing in the point VOPs, but do it in code over here, and some of it is a preferential thing, how you like to work, and some things are easier to do in one context or another. So this is what we're gonna do. We're gonna write an expression, that basically for each of the points it's gonna randomly assign one of the four instance geometries based on a modulus of the ID number. So as we remember, let me close this, we have instance 00123, so if we use a modulus 4 on the ID attribute, we're gonna get a value that's zero, one, two, or three, so if we manually prefix it with everything up to the…
Practice while you learn with exercise files
Contents
-
-
-
-
-
-
Scene overview1m 1s
-
(Locked)
Particle source object overview2m 4s
-
(Locked)
Create particle sim1m 17s
-
(Locked)
POP Source nodes1m 51s
-
(Locked)
POP Wind: Down2m 8s
-
(Locked)
POP Wind: Noise1m 36s
-
(Locked)
POP Drag: Random1m 40s
-
(Locked)
POP Drag: Age1m 33s
-
(Locked)
POP Drag: Spin1m 41s
-
(Locked)
POP Collision Detect1m 40s
-
(Locked)
POP Kill1m 44s
-
(Locked)
Cache particles2m 13s
-
(Locked)
Process v 14m 57s
-
(Locked)
Rotate N and up by v5m 1s
-
(Locked)
Process v 22m 22s
-
(Locked)
Create pscale3m 22s
-
(Locked)
Create instance3m 2s
-
(Locked)
Create Cd4m 50s
-
(Locked)
Material SOP4m 30s
-
(Locked)
Instance node3m 18s
-
(Locked)
Final render2m 20s
-
-