View previous topic :: View next topic |
Author |
Message |
jwatte DeleD PRO user
Joined: 26 Apr 2006 Posts: 513
|
Posted: Tue May 20, 2008 12:08 am Post subject: Light maping feature request |
|
|
If you're actually going to keep supporting light mapping, I'm hoping that you will fix the light leak along corners/edges. However, more importantly, it would be cool if you could generate a light map per light. Each map might not need to be as big (and, in fact, the resolution could be worse further away from the light). However, this would be very useful, because you could turn lights on and off -- or, even better, use a real-time lighting calculation, but modulate it by the light map to get range and shadowing information. |
|
Back to top |
|
|
elementrix DeleD PRO user
Joined: 11 May 2006 Posts: 1300 Location: The Netherlands
|
Posted: Tue May 20, 2008 7:37 am Post subject: |
|
|
yes, I've also asked this before somewhere in a thread, I now need to make huge lightmaps to get a good result, if the lightmapping calculation would be better we could get the same result with much smaller lightmaps.
I know that this is already on your list, just make it a higher priority
ohh and realtime lighting would be awesome
EDIT: where is your post daaark ? _________________ Chickens RULE | www.elementrix.nl |
|
Back to top |
|
|
jwatte DeleD PRO user
Joined: 26 Apr 2006 Posts: 513
|
Posted: Tue May 20, 2008 5:47 pm Post subject: |
|
|
Quote: |
if the lightmapping calculation would be better we could get the same result with much smaller lightmaps. |
No, I don't think so. If you want reasonably defined shadows, then you need fairly high resolution. I hate it when shadows are so blurry that you can't tell where a corner abuts the ground, for example. |
|
Back to top |
|
|
Paul-Jan Site Admin
Joined: 08 Aug 2004 Posts: 3066 Location: Lage Zwaluwe
|
Posted: Wed May 21, 2008 7:48 am Post subject: |
|
|
The lightmapper rewrite is planned for this summer, so suggestions are welcome! The things currently planned are:
Quote: |
1. Rewrite the mapping to constant density. Currently, relation between per-poly lightmap size and poly size is linear (with the user-provided upper and lower boundary), allowing for more detailed lightmaps on small surfaces. This seemed a good idea at the time, but in practical applications a lot of lumels are wasted on small polygons. This rewrite will the concept simpler for the user and improve the overall quality of the lightmap (I guess this is wat Elementrix is referring to).
2. Investigate leaks (including the specific edge/border case you pointed out). There are multiple problem cases, some of which have already been covered by little 'hacks' in the current lightmapper (that might cause new issues to arise). Some of these relate to (3).
3. Smarter mapping algorithm. The current algorithm is a naieve per-poly planar mapping, which causes problem situations, most apparent in low-density lightmaps on a subdivided surface. The mapping scheme is a very important part of any lightmapper, and ours still has a lot of room for improvement.
4. Fix the behaviour of the 'ambient' factor in the lighting equation.
5. More advanced lighting techniques. Think multisampling, ambient occlusion, area lights, better transparency, and a touch of GI through path tracing.
6. Optimization, to some degree. Multithreading support is not the first step, there are algorithmic optimizations that are likely to yield more peformance benefits first (most specifically the spatial subdivision algorithm).
|
I like your suggestion for generating separate lightmaps for each color, but they don't really fit well into the current material concept of DeleD itself. Rewriting the material concept is also on the planning, but not earlier than the lightmapper rewrite. Knowing your personal interests, can you envision this functionality as a separate export of the lightmap? (as in: you get the ordinary lightmap in DeleD, but the separate lightmaps get exported too, to a userdefined location).
Last edited by Paul-Jan on Wed May 21, 2008 10:46 am; edited 1 time in total |
|
Back to top |
|
|
Daaark DeleD PRO user
Joined: 01 Sep 2004 Posts: 2696 Location: Ottawa, Canada
|
Posted: Wed May 21, 2008 10:07 am Post subject: |
|
|
Quote: |
Will the ambient intensity (and proper blending) along with shadow density be in too? |
Good point, added. And no, I don't think we are not going to implement automatic cutting up of the original geometry. I'll just some sort of warnings or whatnot if surfaces end up being too big to be lightmapped at the given density.
The reason why our lightmapper seems quick-ish in comparison is probably that those other lightmappers did radiosity or some other GI solution . The extensions mentioned above will be optimal, so you can still turn them off at any time to get on-par performance with the current lightmapper (for scenes where all those extra lighting information doesn't really improve the visuals that much anyway).
Sector boundaries are somewhat nicer than our current 'max. light range' approach, because they make for a natural boundary that can likely be nicely integrated whatever spatial subdivision (grid, tree, etc.) scheme we end up with. Perhaps it could be interesting to introduce the concept into DeleD one day (the export to .MAP files etc. would also benefit from it). I personally just don't like the manual labor that goes into defining sectors (especially in non-indoor scenes), but I guess anything is easier than the current approach of typing in random ranges without any visual feedback. |
|
Back to top |
|
|
Paul-Jan Site Admin
Joined: 08 Aug 2004 Posts: 3066 Location: Lage Zwaluwe
|
Posted: Wed May 21, 2008 10:58 am Post subject: |
|
|
Owwww... darn, I edited your post in stead of posting a reply. Sorry, my bad. |
|
Back to top |
|
|
Daaark DeleD PRO user
Joined: 01 Sep 2004 Posts: 2696 Location: Ottawa, Canada
|
Posted: Wed May 21, 2008 12:02 pm Post subject: |
|
|
Paul-Jan wrote: |
Owwww... darn, I edited your post in stead of posting a reply. Sorry, my bad. |
Now you know how I feel when I do it every once in awhile. It happens because all the different boards have the buttons in different spots, and you just click out of force of habit.
Using the sector limits was nice for reducing the time limits, but it didn't always create the best results, nor was it useful as a way to define light fall off. It was good in scenes where you had a few lights every few feet, and the breakup of the lights wasn't that noticeable. _________________
|
|
Back to top |
|
|
Jeroen Site Admin
Joined: 07 Aug 2004 Posts: 5332 Location: The Netherlands
|
Posted: Wed May 21, 2008 1:56 pm Post subject: |
|
|
Daaark wrote: |
It happens because all the different boards have the buttons in different spots, and you just click out of force of habit. |
How can you grow a habit when all the buttons are in different spots all the time?
Sorry about that... back on topic, nothing to see here! |
|
Back to top |
|
|
Daaark DeleD PRO user
Joined: 01 Sep 2004 Posts: 2696 Location: Ottawa, Canada
|
Posted: Wed May 21, 2008 2:55 pm Post subject: |
|
|
Jeroen wrote: |
Daaark wrote: |
It happens because all the different boards have the buttons in different spots, and you just click out of force of habit. |
How can you grow a habit when all the buttons are in different spots all the time? |
Because I post on PHPBBs, VBs, and other boards, (often at the same time) and the order of the buttons is in different places.
I click quote a few times on one board, then I come here and click EDIT when I mean to click quote or reply. _________________
|
|
Back to top |
|
|
jwatte DeleD PRO user
Joined: 26 Apr 2006 Posts: 513
|
Posted: Thu May 22, 2008 5:37 pm Post subject: |
|
|
We had that problem on gamedev.net a while back, too. The solution was to add a big JavaScript dialog box that asked "are you sure you want to EDIT this other user's post?" on the Edit button for posts other than your own. |
|
Back to top |
|
|
Grandmaster B DeleD PRO user
Joined: 03 Jul 2007 Posts: 218
|
Posted: Sun Jul 06, 2008 8:01 pm Post subject: |
|
|
If you rewrite the lightmapper please fix the light attenuation.
For example, heres the correct equation:
msdn.microsoft.com/en-us/library/bb172279(VS.85).aspx |
|
Back to top |
|
|
Paul-Jan Site Admin
Joined: 08 Aug 2004 Posts: 3066 Location: Lage Zwaluwe
|
Posted: Mon Jul 07, 2008 5:52 pm Post subject: |
|
|
Maybe I'm missing something, but what makes you think this is not the equation that is currently used? Is this an earlier reported error I forgot about? |
|
Back to top |
|
|
Grandmaster B DeleD PRO user
Joined: 03 Jul 2007 Posts: 218
|
Posted: Tue Jul 08, 2008 12:10 pm Post subject: |
|
|
Its was told in an earlier bug report. If the equation is correct just forget it. |
|
Back to top |
|
|
Grandmaster B DeleD PRO user
Joined: 03 Jul 2007 Posts: 218
|
Posted: Tue Jul 15, 2008 11:24 am Post subject: |
|
|
In the "Lighting Properties" for each object it would be useful to be able to overwrite "Enable Lightmap" to disable lightmapping for single objects. E.g. for dynamic lighting.
It may also be useful to create vertex colors from scene lights. |
|
Back to top |
|
|
|