LIGHT MAP GENERATION

Started by
37 comments, last by Basiror 21 years, 3 months ago
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

typedef	struct dlightmap_s
{
	unsigned char map[512][512];
}dlightmap_t;
http://www.8ung.at/basiror/theironcross.html
Advertisement
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"...nobody ever accused English pronounciation and spelling of being logical." -- Bjarne Stroustrup"...the war on terror is going badly because, if you where to compare it to WWII, it's like America being attacked by Japan, and responding by invading Brazil." -- Michalson
it depends on the size of you texture the smaller the texture the more visible the step effect
http://www.8ung.at/basiror/theironcross.html
Actually, it depends on both...

Height Map Editor | Eternal lands
Also, it depends on your filtering...
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
- To learn, we share... Give some to take some -
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?
http://www.8ung.at/basiror/theironcross.html
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]
Visit our homepage: www.rarebyte.de.stGA
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?

http://www.8ung.at/basiror/theironcross.html
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.
Visit our homepage: www.rarebyte.de.stGA

This topic is closed to new replies.

Advertisement