LIGHT MAP GENERATION

Started by
37 comments, last by Basiror 21 years, 3 months ago
i want to use a 512*512*4(RGBA) lightmap

i can make 256 tiles out of it and give all completely black polygons the same lightmap but that still needs a lot of memory

http://www.8ung.at/basiror/theironcross.html
Advertisement
Why do you want an alpha channel in the lightmap?

You could try using 16bit colour if it really is too big.

You must determine the lightmap size from the size of the polygon. Lightmaps only look good if they all have the same scale (ignoring ''detail'' lightmaps), which means a large polygon needs a larger lightmap.

instead you could make a nice large enough image with the lightmaps packed tight and export the necessary texture coordinates to go with it.
thats what iam doing but this still needs a lot of memory for huge polygon counts
http://www.8ung.at/basiror/theironcross.html
BTW - do all good 3D engines based on OpenGL use lightmaps or can good enough effects be achieved with OGL lighting?
LoudCloud46... tiny games developer
well as far as í know there is no really fast method to do realtime shadows on environments with more than 50000 polys visible



what i am doing now is i generate a 32*32*4 lightmap for every polygon
and then i merge several lightmaps which like very similar

eg:
lightmap 1 has

244
245
237

lightmap 2

238
237
244

and merge it to
241
242
240


or i don t apply lightmaps when the enviroment light stands perpendicular to the surface of a polygon or when the angle is <5°

that should reduce quite a few lightmaps

another thing i thought about is using OGL lights with the light colorsettings and only apply a luminance texture
http://www.8ung.at/basiror/theironcross.html
Sorry for the shameless plug (again ), but I just had to post this, when I read the last post

"[Basiror] well as far as í know there is no really fast method to do realtime shadows on environments with more than 50000 polys visible"

Approx. 290000 polys visible, 67 fps on a GF4. Not a single lightmap used. 100% dynamic perpixel lighting with shadowmaps:


Never underestimate the power of modern perpixel lighting. You should consider using PP lighting instead of lightmapping, it can be a real alternative on newer hardware.

/ Yann

[edited by - Yann L on January 9, 2003 6:40:42 PM]
Yann, I hate you.

karg

ps. how''s the game going? any expected release dates?
Couldnt you store lightmaps as grayscale, 8 bit, and store a hue/saturaton value for color? It might not be completely accurate, but you would shve 75% off the data...
Hi Yann,

whats the difference between a lightmap and a shadowmap?
Beside this, I plan do compute the lightning for my indoor racing game through radiosity. Will the result of the radiosity calculations then be more lightmap-like or shadowmap-like?

This topic is closed to new replies.

Advertisement