Too good to be true?
Im currently working on a lightmap-engine for a heightmap-created terrain. It stores the lightmap in a couple of textures wich are streched over the whole terrain. It then blends these lightmap-textures over the usual textures using multitexturing.
The idead I got works like this: Why not throw in the primary textures (and all other textures I will use on the terrain) and blend them with the shadows (using software) before I build the lightmap textures, creating a single texture that is blended and ready? This way I would''nt need to use multitexture, and I would still be able to have lightmaps, different textures at different alltitudes and other cool effects.
The obvoius dissadvantage is ofcourse that in order to have higher texture-quality, it would suck up a huge amount of videomem, but I could live with that. Now where''s the catch?
Whats great about lightmaps is that you only need to store one low-mem texture per face, and can use more general ho-mem textures more places..
hi_mem = full color full detalie
lo_mem = grayscale low detalie..
this gives great visuals on less mem!
I think it would look ewen better with one texture per face, but it would suck up both mem and work, to create the levels...
for your idea, if you have just one texture stretched out over the whole landscape, the lightmap idea will use more memory then one texture with all the information, and is therefore no good idea, BUT you should make two maps and filter them together to one... you should ewen think of letting you computer calculate the lightmap based on your heightmap! This would give accurate results, and less work!
hi_mem = full color full detalie
lo_mem = grayscale low detalie..
this gives great visuals on less mem!
I think it would look ewen better with one texture per face, but it would suck up both mem and work, to create the levels...
for your idea, if you have just one texture stretched out over the whole landscape, the lightmap idea will use more memory then one texture with all the information, and is therefore no good idea, BUT you should make two maps and filter them together to one... you should ewen think of letting you computer calculate the lightmap based on your heightmap! This would give accurate results, and less work!
-Anders-Oredsson-Norway-
The computer currently calculates the whole lightmap, based on the hightmap before runtime, and builds it as a greyscale texture. I think Ill have a go at making the lightmap a rgb texture instead and storing all the textureinfo there. The main advantage I have is that I can change textures throughout the terrain as manny times as I like, and blending them in different ways, without affecting the speed of the application.
If you were originally doing this with three stages:
- Entire map size color texture
- Entire map size lightmap
- Small grayscale tiled detail texture
...then you can easily get away with this without losing quality:
- Entire map color/lightmap combined texture
- Small grayscale tiled detail texture
Advantages are that you can preprocess textures and blend them in ways that you wouldn''t be able to do on hardware in realtime. Disadvantages, however, are that you lose most of your ability to perform dynamic lighting.
- Entire map size color texture
- Entire map size lightmap
- Small grayscale tiled detail texture
...then you can easily get away with this without losing quality:
- Entire map color/lightmap combined texture
- Small grayscale tiled detail texture
Advantages are that you can preprocess textures and blend them in ways that you wouldn''t be able to do on hardware in realtime. Disadvantages, however, are that you lose most of your ability to perform dynamic lighting.
Loosing the ability to use opengl''s dynamic lightning is no problem. The idea behind the lightmap I am creating is to eliminate all need of opengl''s lighting, so that I have full control over the light on the terrain.
What is that small tiled deltailed texture your talking about? Is it like in serious-sam, to make undetailed textures look detailed on closeup?
What is that small tiled deltailed texture your talking about? Is it like in serious-sam, to make undetailed textures look detailed on closeup?
if you have a gpu supporting multitexturing and you DONT USE THIS ABILITY you lose half of its power because it does it always automatically
and in fact every gpu used for gaming now has multitexturing
and u can use tons less memory
and in fact every gpu used for gaming now has multitexturing
and u can use tons less memory
If that's not the help you're after then you're going to have to explain the problem better than what you have. - joanusdmentia
My Page davepermen.net | My Music on Bandcamp and on Soundcloud
>>Now where''s the catch?<<
no problems (in fact some games/apps do it this way) the catch is like u say lots of texture memory is involved if u want highdetail.
+ of course the shadows are baked in (not good for dynamic lighting)
http://uk.geocities.com/sloppyturds/gotterdammerung.html
no problems (in fact some games/apps do it this way) the catch is like u say lots of texture memory is involved if u want highdetail.
+ of course the shadows are baked in (not good for dynamic lighting)
http://uk.geocities.com/sloppyturds/gotterdammerung.html
Ok. If noone can think of a worse problem than the memory problem, or the dynamic light problem, then its ok with me. Thanks for your oppinions. You will see the result in the lotr competition.
you won''t believe that this is the biggest problem of todays gpu-programming. memory size, memory bandwith. gpu''s are faster to do more calculations than to do less with more memory..

If that's not the help you're after then you're going to have to explain the problem better than what you have. - joanusdmentia
My Page davepermen.net | My Music on Bandcamp and on Soundcloud
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement