{"id":260,"date":"2010-04-12T00:47:26","date_gmt":"2010-04-12T00:47:26","guid":{"rendered":"http:\/\/the-witness.net\/news\/?p=260"},"modified":"2010-04-12T00:47:26","modified_gmt":"2010-04-12T00:47:26","slug":"graphics-tech-multi-lightmaps","status":"publish","type":"post","link":"http:\/\/the-witness.net\/news\/2010\/04\/graphics-tech-multi-lightmaps\/","title":{"rendered":"Graphics Tech: Multi-lightmaps"},"content":{"rendered":"

Ignacio has implemented the first version of the handling for light sources that change (doors that open or close, lights that can be switched on or off, etc). \u00a0The idea is that we just precompute different lightmaps for each of these cases and blend between them at runtime. \u00a0In the future (not the future of this game, but the general computer graphics future)\u00a0when we have realtime global illumination, this would not be necessary; but for now this is much faster to compute and much easier to implement. \u00a0The drawback is that we have to think about the different cases in advance (things can't be too<\/em> dynamic) and the amount of lightmap storage space grows rapidly as the number of variables grows.<\/p>\n

We don't yet smoothly interpolate between the maps in the shader; we just switch the maps outright. \u00a0Interpolation is coming soon. \u00a0But in screenshots you can't see changing conditions anyway, so it's time for some screenshots.<\/p>\n

First is the house with the door closed, then with the door open. \u00a0After that comes the sculpture room, with two light sources toggled in various ways (see the captions on each picture). For now you'll have to forgive the light leaking in the corners and the shadow speckles on the walls; they are due to issues with the dynamic shadow system (which is not really related to what is being shown here) and those issues have yet to be resolved!
\n


\n\n\n \t
\n [Show as slideshow]<\/a>\n\t\t\n\t<\/div>\n\t\t\t\n\t\t\t\t