1
$\begingroup$

Vector to orient normal node

Hi, I´ve followed this: How to correctly drive a normal node with lamp rotation?

I´ve tried the same setup but I need an empty to drive the direction of the mapping node onto the normal shading. I think the problem is on the curve drive. What I need is to translate the empty on world space and the mapping node will update the normal node as if it was the "light" direction. Please help.

$\endgroup$
1

1 Answer 1

1
$\begingroup$

I propose a similar setting, but where the normal is driven by a vector defined by the difference between the empty location and the rendered point location (that could be whole sphere location instead).

Here is opposite views when the empty is moving:

enter image description here

Here is the material setup:

enter image description here

  • The driver is set on the location vector of a mapping (with no input)
  • From that there is the calculation of the difference between the driven values and the rendered location
  • The output is normalized and plugged as normal vector

Each driven axis is defined this way, respectively for X, Y and Z:

enter image description here

$\endgroup$
1
  • $\begingroup$ This setup will not work for other objects surrounding the empty. Their light directions are all dislocated. $\endgroup$ Commented Nov 7, 2018 at 22:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .