Hello,
I am following a tutorial and a part of it shows how to use bounding box expression to make a color gradient using the old point sop. That's all fine but I want to make it work using the new point node, hence with vex. I have attribute set to color and I wrote relbbox(@P).y in the “VEXpression” area but that ignores my color and just makes a black to white gradient. If I write the expression in one of the color parameters for example red, the node defaults everything to black.
Vex - bbox color graident (new point node)
4839 3 0- Thunderbeast
- Member
- 50 posts
- Joined: Nov. 2016
- Offline
- bonsak
- Member
- 459 posts
- Joined: Oct. 2011
- Offline
Hi
This node is not so intuitive the first time around
1. Either you can set Cd (or any of the other attributes) directly in the vexpression field like this:
set(relbbox(@P).y,0,0)
2. Or you can use the “Constant Value” as a sparse parameter to do math operations with:
value * relbbox(@P).y and setting “Constant Value” to 1,0,0. This is the same as saying: take the vector in “Constant Value” and muiltiply it with “relbbox(@P).y” If you want to change the color or animate it later on you wouldn't have to change your code, just the “Constant Value” directly.
Hopes this made a little sense.
-b
This node is not so intuitive the first time around
1. Either you can set Cd (or any of the other attributes) directly in the vexpression field like this:
set(relbbox(@P).y,0,0)
2. Or you can use the “Constant Value” as a sparse parameter to do math operations with:
value * relbbox(@P).y and setting “Constant Value” to 1,0,0. This is the same as saying: take the vector in “Constant Value” and muiltiply it with “relbbox(@P).y” If you want to change the color or animate it later on you wouldn't have to change your code, just the “Constant Value” directly.
Hopes this made a little sense.
-b
- jsmack
- Member
- 7794 posts
- Joined: Sept. 2011
- Online
- Thunderbeast
- Member
- 50 posts
- Joined: Nov. 2016
- Offline
Worked like a charm . Using value * relbbox(@P).y is much nicer and more intuitive.
Thanks a lot, and now to continue teaching my noobness more vex.
Thanks a lot, and now to continue teaching my noobness more vex.
-
- Quick Links