How to scale pieces of a dynamic object depending con color??

   2321   1   0
User Avatar
Member
1 posts
Joined: Nov. 2016
Offline
Hello! I have a scattered model falling into lot of pieces, and i add a noise of red color so the pieces with Black color turn red, and i would like to scale the pieces depending on the amount of red.

So if the res is 1, the size of the pieces is 1.

How can i do that? Im sure ill need to use the foreach but i cantón get these effect.
Tnanks forma all!
User Avatar
Member
2658 posts
Joined: June 2008
Offline
You don't really need a for loop, just an AttributeWrangle (which is essentially a multi-threaded loop processor) running over the primitives.
v@scale = set(v@Cd.r,v@Cd.r,v@Cd.r) * 1;
This will set the scale equal to the red color. You can also multiply the scale as needed.
Edited by Enivob - Dec. 12, 2016 12:42:30
Using Houdini Indie 20.5
Windows 11 64GB Ryzen 16 core.
nVidia 3060RTX 12BG RAM.
  • Quick Links