Scene uses 3 lights - 1 directional light for sun and 2 hemisphere lights for sky color and reflected ground color. Hemisphere (Ancient Greek: half of a sphere) light is same Half Lambert. It is a perfect solution to imitate sky color and indirect lighting that comes from surfaces lit by the Sun.
float halfLambert(vec3 N, vec3 L)//N, L = Normal and Light vectors
{
retun max(0.0,dot(N,L)*0.5+0.5);
}
which, by the way is developed by Valve for Half-Life.
here are some illustrations:
this is an example scene - clear, blue skydome, Sun somewhere in middle between horizon and zenith and sand or dirt as the ground plane.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxylBh1U3x8WipMkZ3ZYF5OSBo6R4qUp55GlWuQB_yPL_YD70Tt_-W0hNbcYjZs-DN1JjovVERMhYh9hhF-JEYIIkSUHwBL2sivFwNhhb4oiqfcFQoLkonlAULpWiMuxEXkzUjd3ebdSkp/s400/skylight_0.jpg)
Sun. A directional light, lamp intensity is 1.0 and color is white.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnIz5vJ_jhZMH7n_Rp7Z4A2uIdxB8tJ0UIBGkVzPiCYY51ODWDytANXU1vNDIDCejSqmcbrl8m0HG27bjd0TCadUaQhubJO92NezaK_CRZqIVuPZAWVg-L9jF_u2zbhnzSXIXqiUTrc-dM/s400/skylight_sun.jpg)
Sky color. The whole skydome emits a lot of light, in our case, blueish. Hemi-light is pointing down .I usually use lamp intensity 0.2 and color (Red 0.0, Green 0.2, Blue 1.0)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5ODKdF3tIxpBiWDg6di9_XMirFR5jI_gStEQV4utH8MdHn055X8Z2MEKvl58yqOj501yf9XHfEyqCDaaXsihcEv0J6fOWktkpMOgNQeU30eplz8W_1Z3N9i9bRrz6k3txdZ5P6ZNQ2H7i/s400/skylight_sky.jpg)
Reflected ground color. It is an indirect light and the intensity and color depends on the surface color. Hemi-light is pointing up. Here we have light orangeish color as a sand or dirt would have.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-cnWlahg-FGFVGXhhB1YXEO8Bt8ZnmdhJG4rxKIpMW_z50j3Pi6XT_SfEOtWBrVcgAMKfChjQEaMckJnGe3cYvFNmvrY2Zo710ZkKImwfuD5fnKFkz25lZshXWIEHyl_SjnlDdnBhyphenhyphenOcB/s400/skylight_ground.jpg)
here we have all three lights combined together.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhy6K6QfV5mUHdsnVHchRyYuYZ-PCi9k-StzMa0sXhmXGOcVaO9Bun8mj7hCuJYOZda5Z3rYfI26zlDiS-Qkdmoi-LBmw2OMcpK_krHEss7KV2c4WDEcAVSIr1Ekj_4Ua6mjSmjYJpqPwQT/s400/skylight_together.jpg)
some screenshots from Blender viewport:
sunlight only (shadows on ground are baked in a texture)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhb2AlHyaVmgD9wo-2BLqPSowzSQIDW1cDpdm9Dk30XytkgiBCn6vKdaMePxLStm4V45FnzXmcpw3MLDuN-3Ftc6BN1RxVta_jEqrrx47nFF7LfR83vIAinvkp5b4K5Dqp-vJRTyfRpWFBk/s400/sunlight.jpg)
sunlight and reflected ground color
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQpm3UkQXfwHXQZytBv9DQHLhoxPP4cV55w7gjk3uqepxsBnfPEKv85-u2E6e9De8zB2cPeZopR4tNnY_8OQxv0vbkulb2tyAUZyu6KwQZNLXl1AT3yz-0TLH7cb6XGtuN_B4OEcvYM1q1/s400/groundlight.jpg)
sky color only (ambient occlusion on ground is baked in a texture)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZYps1UvMQNko-ZpfRP9n9n_WUptQxfmaBkpZk7XlMHO-Sh0IvpkklJfaf1UmPxNZoZ4NAGi2YR34YAXjkCPfjf4ApZ87BfT7yg-Cr-lcVNo-6XiW74J0gRmNk48aQ3TYaMI_DO2u-YzBu/s400/skylight.jpg)
full lighting model
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwNKGr6xVSwIXM74E12xFa-HwHbdxHX-T2Uy9grYqVm61rbkDUT_1cFRfuhVhVw9MiOHAMe701aq6rbvOql3bnEYsSUJeSkh5nwKt9a6rWi9yjlSpSRJj2bwQalzzxb_zhToh_OMyl_A8S/s400/grey.jpg)
dirt
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrBBvNAevWoeirpOIoWC3aMFlByamXcUgQrpxOSFFM3Kojbm7jQylwZNFZQSiA3-ZgqHSgjicgd5lncdVcMJoNKRnWs1-bCcnFv53rPeDfrivKF0SlDfqTUrkHNSX1TeN1q-28uBcllYbm/s400/dirt.jpg)
grass
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdoD5MCAspnYp4MSuRryuNjPEyyLEaiWl7Fl_PoSZftEGlP7VeS9U4suVaIVXHLbxAZM8GHvR4g7LPkqCKE5jg12FnCzcMokQFftYBWGBUkKcd4av7bWscF4zg_SY9pQjoQg7GN5qGoW5H/s400/grass.jpg)
blend file: HERE
Could you upload a .blend for this?
ReplyDeleteI added the download link. It is not exacty the file I used to take screenshots from, but the light setup is the same. I will try to find the real blend.
ReplyDeleteThanks!
ReplyDeleteHa funny... That is almost the same way I light my scenes :)
ReplyDeleteGreat Article Martins! This gets thinks clear! ^^
And by the way.. great Blog! I will bookmark it! :)
funny
ReplyDelete