View Single Post
  #1  
Old 02-03-2010, 06:57 AM
12171217 12171217 is offline
Banned
Join Date: Jan 2009
Posts: 453
12171217 has a spectacular aura about
Lightmapping/Shadows

My experiments with lightmapping that will hopefully be finished soon.

Right now the editor supports RGBA values for each light and a falloff value. I want to add support for multiple equations for falloff, such as inverse square, etc. There's more to be added later, such as proper anti-aliasing, support for custom resolution lightmaps (Right now it's half resolution of a Graal level, which is 512x512), but whatever!

Here's a video showing the editor and lightmap compiling.



Note: I clipped the compiling time. It took 19 seconds in that instance (The compiler's not optimized at all at the moment.) and the editing time was sped up by a factor of two. Also, the software I was using to record raped my video. It's 8-bit =(

When you click render, it does the proper calculations and bakes the lights into two PNG files; a colored light map, and a shadowmap, saved as levelName_lightmap.png and levelName_shadowmap.png. Lights blend correctly with one another as well.

Also, I can't release this until V6 is released, as I need to use the requesturlfromgamefile function for this to work 100% properly. That function isn't available in the V5 client.

umm to-do list:

1) More falloff equations.
2) Spotlights.
3) Custom resolution lightmaps.
4) Fake walls in the editor, and likewise ignoring walls.

Oh, if anyone wants this, PM me, I guess.

Last edited by 12171217; 02-03-2010 at 07:08 AM..
Reply With Quote