Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #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
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 10:39 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.