What should I do to control the right side with empty02 and the left with empty01?
$\begingroup$
$\endgroup$
3
-
1$\begingroup$ Please add more details on which kind of control you wish to have on those "sides". $\endgroup$– m.arditoCommented Aug 11, 2017 at 17:03
-
$\begingroup$ Did you try the new way? Does it work for you? $\endgroup$– yannCommented Aug 20, 2017 at 9:24
-
$\begingroup$ I'm trying to control the transparency of the object without having to edit it like you did. Using these values the cube becomes transparent when the emptys are close to the center of it. But the animation is not correct with the two empty going one against the other. I updated the image. $\endgroup$– Leandro FerreiraCommented Aug 20, 2017 at 13:36
Add a comment
|
2 Answers
$\begingroup$
$\endgroup$
This is a better approach, so I'll post it as a new answer. I recorded every step this time.
- Create a plane, Tab into Edit-Mode and make two loop cuts (Ctrlr) as shown in the image.
- Go to vertex paint and with a strength of 1 paint half of your plane pure black (0,0,0).
- In Edit-Mode, select one of the cuts and type space + Hook to new Object. Repeat this for the other loop-cut.
- Each of the cuts can now be controlled by an empty
- Change the size and appearence of the empty if you wish
- Lock all transforms and leave only the axis your gradient should follow
- Select both empties, then select your plane. Ctrlp and parent to Object
- You can now rotate, translate, scale your plane, the empties are following. The empties only translate on their local x-axis.
- Create your shader. I would recommend to put a color-ramp between the vertex-color input to control the easing between the two loop cuts. Vertex-colors seem to blend always linear, so on the top right corner of the color-ramp play with other easing types and choose the one you like most (I often use ease).
$\begingroup$
$\endgroup$
1
One way would be to use drivers. This quick setup uses the global-x value of the empties and transferes it to the position of the colorramp sliders.
This is not the most elegant way to do this, because of the usage of global transformation values.
-
$\begingroup$ How i can do it? Please explain to me. $\endgroup$ Commented Aug 16, 2017 at 12:48