Lightmap previewer (i.e. real-time lightmaps)?

Started by
4 comments, last by VladR 18 years, 6 months ago
I'm wondering if anyone can recommend any good real-time lightmapping techniques. I've already found an implementation with some interesting insights at section5 (so don't waste your/my time and tell me to google it) but am looking for more options. I don't need anything full quality, but at least of decent quality and as quick as possible (preferably hardware accelerated, like the ambient occlusion stuff from nvidia or even ambient occlusion fields). The point is not to generate production quality lightmaps but to offer the artist a quick path to see how a level will look when moving any static lights around. I'm also curious what other people may think about using PRT as a substitution for lightmapping - feasable, or am I missing something (I'm really not read up on PRTs as much as I should be)? Thanks very much for any insights! p.s. elaboration - what do I mean by fast for a process than can sometimes take 6-10 hours? 1 to 2 minutes is fast to me in a level that would normally take 15-30 minutes to compile a lightmap for. [Edited by - Dirge on September 23, 2005 2:39:13 PM]
"Artificial Intelligence: the art of making computers that behave like the ones in movies."www.CodeFortress.com
Advertisement
If 1 to 2 minutes is acceptable, couldn't you just provide different quality settings for the process? I seem to recall that, when building maps for quake 3, putting the resolution of the lightmap down (and possibly setting certain quality flags, I forget) could bring the compile time down from hours to minutes, or even less.

(EDIT: I should add that this was years ago, so my memory is a little hazy.)

[Edited by - MumbleFuzz on September 23, 2005 6:27:39 PM]
MumbleFuzz
Hi, what i do is give the user an option of lightmap sizes to start with.
Then for speed of generating the lightmap i skip every other texel.

eg 8x8 lightmap

calculate the first texel
copy that texel to the next texel. ie. texel 2
jump to the 3rd texel and calculate that.
copy that texel to the next texel. ie. texel 4
jump to the 5th texel and calculate that.
...

This will give reasonable results if all youre looking for is someway to check the position of the light or the colour.

mark
Quality settings, and hardware acceleration might help you here.
The nature of the algorithm you are using for lightmapping might also provide some shortcuts.

There was an article from the Garage Games guys on how to use hardware acceleration for lightmapping. They got pretty good results for their radiosity solver.

You can also tweak the quality settings to give you a "preview" mode, in which the lighting might not be incredibly accurate, but it would give you a good idea on how the final results might look like.

Another possibility would be parallelizing the lightmapper and run it on a render farm.
Come to think of it, probably the most useful feature of the Quake tools in this respect was the ability to create 'regions': arbitrary sections of the map that could be compiled separately. The rest of the geometry was ignored. The artist could then compile - usually in seconds - only the section of the map that he was working on.
MumbleFuzz
Definitely use Radiosity. Although tesselating the scene and calculating the correct lightmap coordinates can be a pain (after a painful calculation of form-factors), the end result is very fast.

Of course, only if you don`t want the shadows, because these take up the most of the time. Talking from my own experience with my radiosity calculator for our in-house editor, almost 100% results can be calculated almost instantly. The point is that you make only as much passes as there are lights. Our scenes with 500k-1000k patches and about 20-30 lights are almost real-time (1-2 seconds) to preview.
Of course, you don`t get any color bleeding or shadows this way, but the end result is almost ideal and definitely good enough to be used in game (RPG-like dungeons).
The only thing you have to set up is the exposure, since relatively low amount of energy has been distributed. But you set this up manually anyway to see the meaningful results of your radiosity solver anyway, so that`s OK.

VladR My 3rd person action RPG on GreenLight: http://steamcommunity.com/sharedfiles/filedetails/?id=92951596

This topic is closed to new replies.

Advertisement