typedef struct dlightmap_s
{
unsigned char map[512][512];
}dlightmap_t;
LIGHT MAP GENERATION
is want to use this underneather for a lightmap
one lightmap is 32*32 which means i could pack 256 lightmaps into one object like this below
now my question is would a lightmap with 32*32 bet big enough for a solid which is 256*256?
or would i use a 64*64 there? because you d get this a step effect on your steps which is gay
and should i use a normal luminance/luminance alpha or even a normal RGBA? thats all the help i need to get started thx
I''d say it depends on the size of your object rather than on the size of your texture...
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning..." -- Rich Cook
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning..." -- Rich Cook
it depends on the size of you texture the smaller the texture the more visible the step effect
Also, it depends on your filtering...
for a better filtering effect, filter all you lightmaps trilinearly...
for a better filtering effect, filter all you lightmaps trilinearly...
for lightmaps, a normal luminance image is usually sufficient. but if i''m not mistaken, arent luminance maps translated implicitly to RGB in memory? just a thought.. neva was sure of it
yes but what about colored lights and not only white light with different brightness? use openGL lights? and find out which polygons are affected by it?
quote:Original post by Basiror
yes but what about colored lights and not only white light with different brightness? use openGL lights? and find out which polygons are affected by it?
don't do opengl lights if you're doing lightmaps, you should be using lightmaps because opengl lights don't look good enough ...
reading back data from opengl lighting to use in lightmaps is a really bad idea
edit: use colored lightmaps for colored lights.
[edited by - ga on January 7, 2003 5:48:58 PM]
lets say i have a 32*32*4 lightmap that consumes 4 kb
assume you have 20000 polygons which need lightmaps then you will get 80 mb of lightmaps
isn t that a bit too much?
assume you have 20000 polygons which need lightmaps then you will get 80 mb of lightmaps
isn t that a bit too much?
80 MB is too much. you can vary the size of the lightmap depending on how big the polygon is. Also you shouldn''t make a seperate lightmap for each polygon but rather some big lightmaps and each lightmap serves several polygons.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement