sunlight
Posted: October 24th, 2011, 7:23 pm
I found a couple of interesting things while poking around the src.
sunlight R B G to set the color of the sunlight, much like settling the color of the skylight.
sunlightscale 0, 1, 16 is a multiplier of the color values... I don't see much point in changing this from the default value of '1'. Maybe there might be a couple of lighting effects that can use this.
sunlightyaw 0, 0, 360 to set the location of the sun light-source's position in degrees on a compass. I'm assuming '0' and '360' are "north"
sunlightpitch -90, 90, 90 to set the angle of the sun light-source with respect to the horizon.
This just seems like a nice way to set the position of the sun, rather than fiddling with the placement of a light entity within the cube volume.
Of course, sunlightpitch and sunlightyaw set the direction of the sun in a vector sunlightdir.
It might be neat to set a script to increase glare* as the player's line-of-sight direction gets closer and closer to the sunlightdir... then decrease the amount of glare more slowly over time as eyes adjust again; nothing like looking directly at the sun to screw up your eyesight.
For sunlightscale, sunlightyaw and sunlightpitch, the 3 numbers shown are the minimum, default and maximum values allowed.
* it looks like there are a number of variables for playing with glare, too
sunlight R B G to set the color of the sunlight, much like settling the color of the skylight.
sunlightscale 0, 1, 16 is a multiplier of the color values... I don't see much point in changing this from the default value of '1'. Maybe there might be a couple of lighting effects that can use this.
sunlightyaw 0, 0, 360 to set the location of the sun light-source's position in degrees on a compass. I'm assuming '0' and '360' are "north"
sunlightpitch -90, 90, 90 to set the angle of the sun light-source with respect to the horizon.
This just seems like a nice way to set the position of the sun, rather than fiddling with the placement of a light entity within the cube volume.
Of course, sunlightpitch and sunlightyaw set the direction of the sun in a vector sunlightdir.
It might be neat to set a script to increase glare* as the player's line-of-sight direction gets closer and closer to the sunlightdir... then decrease the amount of glare more slowly over time as eyes adjust again; nothing like looking directly at the sun to screw up your eyesight.
For sunlightscale, sunlightyaw and sunlightpitch, the 3 numbers shown are the minimum, default and maximum values allowed.
* it looks like there are a number of variables for playing with glare, too