ela1995 Posted April 7, 2021 Share Posted April 7, 2021 I have colored gradient for each extruded primitive using For Each Loop. How do I do the same thing with vex? I'm not familiar with prim array. Can anyone help me? Thanks in advance. how to foreach prim with vex.hip Quote Link to comment Share on other sites More sharing options...
Librarian Posted April 7, 2021 Share Posted April 7, 2021 @ela1995 I think this gonna be useful. https://handlespixels.wordpress.com/2019/01/24/texturing-in-houdini/ Quote Link to comment Share on other sites More sharing options...
anim Posted April 7, 2021 Share Posted April 7, 2021 you can do this for example in point wrangle after your Connectivity SOP int class = prim(0, "class", @primnum); // get class of point's prim string grp = sprintf("@class=%s", class); // ad-hoc group string for all prims with that class value vector rbb = relbbox(0, grp, @P); // rel bbox of point's p within bbox of all prims in that group v@Cd = chramp('color',rbb.y); // profit how_to_foreach_prim_with_vex_fix.hip 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.