Hello I’m currently building a tool and want to use a ramp in a multiparm. How do I link the ramp parameter from the multiparm to a node inside my tool? For floats, strings and int I found that you link it with strcat and the iteration value from the loop but I can’t get ramps to work.
Some experessions I tried:
`chs(strcat("../ramp",detail(-1, "iteration", 0)+1))`
chramp(strcat("../ramp",detail(-1, "iteration", 0)+1))
`chramp(strcat("../ramp",detail(-1, "iteration", 0)+1))`
chramp(`chs(strcat("../ramp", detail(-1, "iteration", 0)+1))`, 1, 1)
[Help] How to link ramp parmeter from muliparm?
1411 1 0-
- AkumaRex
- Member
- 2 posts
- Joined: April 2020
- Offline
-
- tamte
- Member
- 9380 posts
- Joined: July 2007
- Offline
if you can change your multiparm to start at 0 you can avoid having to do ugly +1
if however you need +1, add it in parentheses
the .5 is the position you want to evaluate the ramp at
and 0 is the component of the ramp, 0 for float ramps, 0, 1 or 2 for r, g, b of color ramp
so most likely you want to control the position with another parameter like for example having "u" parameter on the same node that can also have its value different per iteration
or if you need it in VEX you have to explicitly convert int to string using itoa() and position can even be for example some vex variable or anything, and no need for component index
chramp("../ramp" + detail(-1, "iteration", 0), .5, 0)
chramp("../ramp" + (detail(-1, "iteration", 0) + 1), .5, 0)
the .5 is the position you want to evaluate the ramp at
and 0 is the component of the ramp, 0 for float ramps, 0, 1 or 2 for r, g, b of color ramp
so most likely you want to control the position with another parameter like for example having "u" parameter on the same node that can also have its value different per iteration
chramp("../ramp" + detail(-1, "iteration", 0), ch("u"), 0)
or if you need it in VEX you have to explicitly convert int to string using itoa() and position can even be for example some vex variable or anything, and no need for component index
float u = @ptnum/(@numpt - 1.0); float x = chramp("../ramp" + itoa(detail(-1, "iteration")), u);
Edited by tamte - Aug. 1, 2022 23:12:37
Tomas Slancik
CG Supervisor
Framestore, NY
CG Supervisor
Framestore, NY
-
- Quick Links

