Hello there,
I'm quite new to VFX and really took a liking to Houdini,
Question:
As shown in my image, I'm trying to use a "For Each Point" loop to copy some geometry onto points. I've gotten most of it to work and understand what's happening. Now, I want the geometry to scale according to the velocity of the points.
What I don't know is how to transfer the velocity of the points to the scale, which I'd like to multiply using a function like length($VX, $VY, $VZ). My understanding is that I need to extract this value from the loop because it is point-specific. If this doesn't have to be done, I would appreciate any alternative solutions. However, I would still like to know: Is it possible to access attributes after the "For Each Begin" node?
Thanks a lot
Alex
For each Loop and using attributes on the outside.
826 2 0-
- N9Alex
- Member
- 3 posts
- Joined: May 2024
- Offline
-
- PaQ WaK
- Member
- 100 posts
- Joined: Jan. 2015
- Offline
Hello
If all you do is transforming the object you want to copy, you don't need to use a loop at all.
"Just" set the appropriate attribute on the point cloud (pscale,scale,N,up,orient etc).
Here's an example of a fountain type emitter, where the boxes a aligned to the velocity, and scaled by the velocity length.
The random hscript expression can be replaced by "rand(@ptnum)" in vex, that will return a random float based on the particle id for example.
If all you do is transforming the object you want to copy, you don't need to use a loop at all.
"Just" set the appropriate attribute on the point cloud (pscale,scale,N,up,orient etc).
Here's an example of a fountain type emitter, where the boxes a aligned to the velocity, and scaled by the velocity length.
The random hscript expression can be replaced by "rand(@ptnum)" in vex, that will return a random float based on the particle id for example.
Edited by PaQ WaK - July 25, 2024 19:41:53
Gameloft
-
- N9Alex
- Member
- 3 posts
- Joined: May 2024
- Offline
PaQ WaKThanks a lot!
Hello
If all you do is transforming the object you want to copy, you don't need to use a loop at all.
"Just" set the appropriate attribute on the point cloud (pscale,scale,N,up,orient etc).
Here's an example of a fountain type emitter, where the boxes a aligned to the velocity, and scaled by the velocity length.
The random hscript expression can be replaced by "rand(@ptnum)" in vex, that will return a random float based on the particle id for example.
-
- Quick Links