|
DeleD Community Edition Forums
|
View previous topic :: View next topic |
Author |
Message |
hpesoj DeleD PRO user
Joined: 16 Oct 2004 Posts: 184
|
Posted: Fri Sep 30, 2005 4:58 pm Post subject: Suggestion: Lightmap Array |
|
|
In the project I am working on, some of the objects in the world are dynamic, and so cannot be lightmapped, as they are always moving around. I was thinking how to solve this, and came up with the idea of a lightmap array. The idea is that one would use a regular 3D array of points representing the net colour of the light in various areas of the world. You could then simply load this array into your engine/game/thing and use the array to dynamically colour your object to match the surrounding lighting.
I figured it would be fairly easy for you guys to add such a tool seeing as it essentially your lightmapper, just using a grid of points rather than a complex mesh . I know it is quite a personal request, but I'm sure other people would benefit from it too. Certain problems could arise when using such a mesh, but i think that could be something that is delt with in the engine.
This is just a suggestion, but if any of you think it is a worthwhile idea, I'd be interested in explaining it in more detail.
Cheers. |
|
Back to top |
|
|
Paul-Jan Site Admin
Joined: 08 Aug 2004 Posts: 3066 Location: Lage Zwaluwe
|
Posted: Fri Sep 30, 2005 6:45 pm Post subject: |
|
|
The problem with such a 3D array is that (like any 3D texture) it becomes huge _quick_ if you want a decent resolution. More about that later on...
The solution as choosen by most games is to project the current position of the character onto the lightmap (the floor), and pick the color from there. You get the full resolution of the lightmap without any extra costs.
For applications where the character is actually walking on a floor (most fps/rps/rpg style games), that solution works well. Things get a bit different when you are doing a fully 3D application (Descent look-a-likes in a maze).
Also, your idea has the additional benefit of allowing for easy and meaningful interpolation between the colors of the closest adjacent points on the grid. Implementation of the algorithm would would indeed be very very simple for us. The only thing we'd really have to look into is compression of the resultset. I am sure there are classic 3D texture compression techniques that apply, I just know next to nothing about them
All in all, definitely a nice idea, please elaborate and discuss |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|