Sun & sky problems

I’m trying to setup a proper sun & sky system using absolute values. Meaning that for a high sun I’d have to stop down exposure significantly. I’m basing the sun setup on this read, and here is where I’m at:



I have to add the red nodes to prevent it going wacky at extreme angles.
However, in the text he’s using secant whereas I’m using cosecant, and I have absolutely no idea what I’m doing here :slight_smile:
I’m only using the sine output to choose the color temperature, is this even remotely correct?
I’m wondering, have anyone else tried something like this, and what was the end result?

Side question: For the sky texture, is there a way to drive the input to it numerically? I want to use the sun lamp rotational values to drive the vectors somehow rather than try to match the sensitive click area.

Can’t say I clearly understand what’s going on there… :confused:
For sky textures, the one I like most is the nishita sky (it’s an osl shader, and I never tried to do it with nodes).

For driving a sky texture with a Sun lamp, you can use the ‘matrix_world[2]’ from the lamp and use it to drive the normal on the sky.
(matrix_world[2][0] goes to X, matrix_world[2][1] to Y and matrix_world[2][2] to Z)

  1. I’m just setting sun intensity and blackbody based on its elevation above the horizon, based on how I interpret the linked read. Isn’t nishita sky a much older one than hosek/wilkie? Anyhow, osl isn’t an option since forced GPU only for me. Adjusting gamma, brightness, and contrast of hosek I don’t think it looks too bad, except it doesn’t have sun disk or irradiance.

  2. Is that LISP? Seriously though, doing it with drivers is just too messy for a day to day thing. I can’t stand them, or figure out what’s going on. In any case, I figured out all I had to do was activate the Sun Position addon, it drives the sky texture for me. I figure I can just leave the sky at 70 strength and call it a day (according to the read linked above).

Although sun position addon updates the sun rotation properly, it doesn’t adjust its strength and color temperature. SO basically, what’s the best way to set those in absolute terms?