Following a forum discussion http://www.flightgear.org/forums/viewtopic.php?f=47&t=19693
I've done some experiments with terrain self-shading based on changing the balance between ambient and diffuse light. The results look fairly compelling and the illusion (even without a real shadow-map) is usually pretty good (in fact, one has to go looking for cases where it breaks, they don't usually stick out even in complicated terrain) http://users.jyu.fi/~trenk/pics/light_balance_new05.jpg http://users.jyu.fi/~trenk/pics/light_balance_new06.jpg Since it's not based on a shadow-map, it works still 100 km out http://users.jyu.fi/~trenk/pics/light_balance_new02.jpg It works by reducing ambient light in the terrain shader, and to compensate for the loss of scene brighness, diffuse light has to be oversaturated (is this problematic ?). One problem is that I don't know the default ambient and diffuse reflection coefficients of terrain, so I have to experiment. If anyone knows these, please let me know, then I could compute rather than experiment. I do know that full ambient light has an intensity of about 0.5 in each channel and full diffuse light has 1.0. Downstream, to preserve the illusion of shadows, I've had to alter the tree shader to purely ambient lighting based on sun angle above the horizon. But that seems to be a good idea in general - not only is this cheapter to compute, but also our tree sprites have flat suraces with a clear normal, so they have very pronounced directional scattering - real trees have random orientation of leaves and needles and a leaf can also transmit light, so I think real trees have much weaker directional light scattering and isotropic scattering is actually the better approximation. I'm describing this in detail because the change is rather small (3 lines in the shader including all the environment dependencies on cloud cover and sun angle) - so this is an extremely good bang for the buck, and I would perhaps suggest considering similar changes in the other rendering schemes. I'll try to push a test modification to the highest quality terrain shader and the tree shader on Monday, so that you can experiment a bit and make up your mind * Thorsten ------------------------------------------------------------------------------ Precog is a next-generation analytics platform capable of advanced analytics on semi-structured data. The platform includes APIs for building apps and a phenomenal toolset for data science. Developers can use our toolset for easy data analysis & visualization. Get a free account! http://www2.precog.com/precogplatform/slashdotnewsletter _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel