2
$\begingroup$

From watching videos and looking at other posts, it seems like the common way is to just straight up copy the sun's rotation values for the light direction vector. However, this also copies the roll (local z rotation) value, which it shouldn't, considering directional lights are spherical. As a result, N Dot L will change if you rotate the sun on its local z axis, which doesn't make sense. The regular diffuse shading models that the BSDF nodes use don't take the sun's roll into account, so what are they doing differently?

$\endgroup$
2
  • 2
    $\begingroup$ I may not have understand properly, but you could use the rotation vector you are talking about (which include z rot) to rotate à vector (I think (0,0,-1) In your case). You would get a direction vector instead of rotation vector, without any local z rotation. $\endgroup$
    – Lutzi
    Commented Mar 21 at 20:37
  • $\begingroup$ @Lutzi That actually works perfectly, thank you. Now I'm surprised I couldn't figure that out sooner $\endgroup$
    – LuigiTKO
    Commented Mar 21 at 21:23

0

You must log in to answer this question.

Browse other questions tagged .