I am working through a H13 tutorial at the moment and it's using the old point sops frequently. Most of them I could easily replace with an attribute wrangle but there is one that keeps fighting against me.
After a sort the point sop is coloring a 2D area with an Add Color and the expression 1-$PT/$NPT which makes the point in the center a clear red and the points at the border and farthest away almost black.
I tried this with the wrangle but to no success. I assumed it would have to look like this: @Cd = set(@elemnum/@npt,0,0);
Since I am fearly new to houdini I look forward to any advise.
The solution was something else. I tried @ptnum and @numpt but since it did't work I thought they were wrong. Silly me tried this: @Cd.x = 1 - @ptnum/@numpt;
Which looks right but will not work because of int -> float. I needed to do this: