Stanislav Posted July 26, 2021 Share Posted July 26, 2021 hello how to pass an expression to each primitive, now the gradient is applied to everything. thanks Quote Link to comment Share on other sites More sharing options...
Stanislav Posted July 26, 2021 Author Share Posted July 26, 2021 made with nodes for each Quote Link to comment Share on other sites More sharing options...
jamesr Posted July 26, 2021 Share Posted July 26, 2021 (edited) nice looks like you've got it. here's another solution using just the one wrangle like you tried originally: (Run Over: Primitives) int pts[] = primpoints(0, i@primnum); // List of points on the current prim int numpt = len(pts); for (int i = 0; i < numpt; ++i) { float grad = float(i) / (numpt-1); float ramp = chramp("ramp", grad); float pscale = fit01(ramp, chf("pscale_min"), chf("pscale_max")); setpointattrib(0, "pscale", pts[i], pscale); } primpoints.hiplc Edited July 26, 2021 by jamesr 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.