Attribute to different iterations of a for-each loop
600 3 0-
- bikonistudio
- Member
- 5 posts
- Joined: Sept. 2025
- Offline
Hello,
I have a problem that I'm trying to solve in Houdini :
Initially I have a simple plain grid on the ground. Then I have a for each loop primitive on fetch feedback with an extrusion (using polyextrude) inside it and also have side group activated. Now my main goal is to have a different id or different group on each iteration of these new sides faces. I've tried to put below an primitive wrangle using the metadata but it doesn't seem to work and I'm stuck. My geometry spradsheet also says that all my new side faces are still on id=0
Can someone tell me where I might have made a mistake ?
Thanks.
All example below:
I have a problem that I'm trying to solve in Houdini :
Initially I have a simple plain grid on the ground. Then I have a for each loop primitive on fetch feedback with an extrusion (using polyextrude) inside it and also have side group activated. Now my main goal is to have a different id or different group on each iteration of these new sides faces. I've tried to put below an primitive wrangle using the metadata but it doesn't seem to work and I'm stuck. My geometry spradsheet also says that all my new side faces are still on id=0
Can someone tell me where I might have made a mistake ?
Thanks.
All example below:
Edited by bikonistudio - May 16, 2026 06:36:04
-
- animatrix_
- Member
- 5283 posts
- Joined: Feb. 2012
- Offline
Hi,
You have a few issues:
1. The node name you are passing to the detail function is not correct.
2. It's iteration, not numiteration (correct one is numiterations)
3. You don't need the 3rd argument for the detail VEX function unlike Hscript.
4. It's better to use a spare parm.
5. It's better to use the Group field rather than check the group inside the code for this kind of attribute assignment.
You have a few issues:
1. The node name you are passing to the detail function is not correct.
2. It's iteration, not numiteration (correct one is numiterations)
3. You don't need the 3rd argument for the detail VEX function unlike Hscript.
4. It's better to use a spare parm.
5. It's better to use the Group field rather than check the group inside the code for this kind of attribute assignment.
Edited by animatrix_ - May 16, 2026 16:05:13
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com] https://lnk.bio/animatrix [lnk.bio]
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com] https://lnk.bio/animatrix [lnk.bio]
-
- Gaalvk
- Member
- 71 posts
- Joined: March 2025
- Offline
"numitertion" is the total number of iterations; it's the same for all iterations, obviously.
You probably need the "iteration" attribute (from 0 to numertion-1).
I haven't delved into your process, but I'll just remind you of a common beginner mistake: if you divide an int by an int, you get a rounded int, not a float. So, 5/10 = 0, not 0.5 as you might expect. Don't forget to change the type.
You probably need the "iteration" attribute (from 0 to numertion-1).
I haven't delved into your process, but I'll just remind you of a common beginner mistake: if you divide an int by an int, you get a rounded int, not a float. So, 5/10 = 0, not 0.5 as you might expect. Don't forget to change the type.
-
- bikonistudio
- Member
- 5 posts
- Joined: Sept. 2025
- Offline
-
- Quick Links


