How Can We Help?
Attribute from color
![](https://www.mikeoakley.com/wp-content/uploads/2022/07/houdini-sortaA-960x379.png)
I have these three boxes that I would like to have a vertex color gradient across.
![](https://www.mikeoakley.com/wp-content/uploads/2022/07/houdini-sortaB-960x379.png)
With these nodes below I was able to get a ordered vertex across.
![](https://www.mikeoakley.com/wp-content/uploads/2022/07/houdini-sortaC-624x540.png)
SORT node
Point Sort: By X ( I started by sorting the vertex numbers by a direction/vector. This helps the coloring/values later on )
Enumerate node
Group type = Points
Attribute = _ptnum
Color node
Color Type : Ramp from Attributes
Attribute: _ptnum
Range: 0 to ( Max numbers you can see. I'm sure there is a way to gather this number)
// AttribWrangle
// Preset Grow Hair in Attribute wrangle
// In this instance I was using a 0-1 color grad to determined the length of the hairs by dividing a random length * @Cd
// THE USE OF A COLOR HERE TO DETERMIND HAIR LENGTH
pos += dir * (len * @Cd) / steps;
![](https://www.mikeoakley.com/wp-content/uploads/2022/07/houdini-sortaD-960x366.png)