RE: [Algorithms] Lightmap Terrain
Brought to you by:
vexxed72
From: Fredo D. <fr...@gr...> - 2000-08-25 14:31:28
|
It is a classical misunderstanding to believe that radiosity needs closed environments. There is no problem (neither theoretical nor practical) with unbounded scenes. Francois Sillion has a paper about hierarchical radiosity for terrains and sky: Hierarchical Lighting Simulation for Outdoor Scenes http://www-imagis.imag.fr/Membres/Francois.Sillion/Papers/Index.html I had also seen some work that simulated the interreflexions between mountains to simulate the snow coverage. Can't remember where though. if you want radiosity code: http://www.graphics.lcs.mit.edu/~fredo/Book/code.html under global illumination But this won't give you real-time. I guess you could accelerate this by doing only one bounce, and by gathering light only from nearby vertices. See also the paper by Heidrich et al. at Siggraph this year, it is in fact very related (they compute interreflections for bump maps, and bump maps are height fields). It is also quite related to the horizon map idea discussed in a previous e-mail. http://www.ag2.mpi-sb.mpg.de/~heidrich/ But, as already said, there is no way you can in a cheap way integrate smoothly the illumination coming from the sky. I guess you could use a simple heuristic for the sky illumination from a vertex. What you want to do is to integrate the light coming from the whole sky, that is, a hemisphere, taking shadowing into account. Assume that only the adjacent faces and the global terrain hide the sky. Thus, for each face you subtract the corresponding wedge from the hemisphere (I have made a figure at http://graphics.lcs.mit.edu/~fredo/sky.jpg) I'm sure that this has been already used somehere, but I have no idea where. For the shadowing of direct lighting from the sun, I don't know if Musgrave describes such an optimization, but you could also sweep "shadowing horizons" from the parallel light source direction to compute the illumination along parallel lines on the terrain. Sounds not clear? See the figure http://graphics.lcs.mit.edu/~fredo/shadow.jpg Note that because the light direction is not a multiple of 45 degrees, the sweep lines don't fall on all the vertices. Well, I'm sure that you can find a way to deal with that with weights or something else. To summarize, you have three problems: - illumination from the sun (the most important light source): use the cosine law, parallel light source and maybe try my sweep idea - illumination from the sky (very important for overcast days), nasty but intersecting the wedges from the hemisphere may give you something. - interreflexion from the neighbouring terrain: I propose to consider only one bounce from the adjacent vertices. Of course add an ambient term too. Fredo -- Fredo Durand, MIT-LCS Graphics Group NE43-255, Cambridge, MA 02139 phone : (617) 253 7223 fax : (617) 253 4640 http://graphics.lcs.mit.edu/~fredo/ |