Lightmaps, radiosity and game using

Lightmaps, radiosity and game using

Post by Gilles GALLE » Sat, 12 Jun 1999 04:00:00



I'm looking for game using lightmap techniques. It seems :
- quake2 and quake3 uses radiosity to produce lightmap texture
- unreal uses blured shadows to produce lightmap texture

What is the techniques really used . Is it :
- first precalculate global illumination (with radiosity or blurring
shadows). In this case, does BSP is interessant to accelerate computing
? This pass allows to produce lightmap textures for all faces of the
scenes. It seems to me that takes a lot of memory space, no ?
- second, during real-time visualisation, the scenes is projecting twice
: one for material texture and one fore lightmap textures ?

Does exist FAQs or Articles on subject ?

Thank you for yours answers.

Gilles

 
 
 

Lightmaps, radiosity and game using

Post by Doug Chis » Sat, 12 Jun 1999 04:00:00



>I'm looking for game using lightmap techniques. It seems :
>- quake2 and quake3 uses radiosity to produce lightmap texture
>- unreal uses blured shadows to produce lightmap texture

Where did you find out about the Unreal renderer?

Quote:

>What is the techniques really used . Is it :
>- first precalculate global illumination (with radiosity or blurring
>shadows). In this case, does BSP is interessant to accelerate computing
>?

I suppose the BSP makes this faster, but having a BSP dosent matter that
much since this is the renderer, not the real-time display code. It is very
slow anyhow ( days to render a complex map on a PC).

Quote:> This pass allows to produce lightmap textures for all faces of the
>scenes. It seems to me that takes a lot of memory space, no ?

I think the lightmap/shadow textures are very low resolution. This ends up
looking ok since it adds a blurring effect to the lighting/shadows making it
look softer.

Quote:>- second, during real-time visualisation, the scenes is projecting twice
>: one for material texture and one fore lightmap textures ?

Not the entire scene, just the texture coordinates for the lightmaps I would
think. OpenGL does this anyhow, its just like you are rendering the same
polygon, with two textures applied.

Quote:

>Does exist FAQs or Articles on subject ?

If you find one please post. I would be very interested as well.

 
 
 

Lightmaps, radiosity and game using

Post by Angus Dorbi » Sat, 12 Jun 1999 04:00:00



> I'm looking for game using lightmap techniques. It seems :
> - quake2 and quake3 uses radiosity to produce lightmap texture
> - unreal uses blured shadows to produce lightmap texture

> What is the techniques really used . Is it :
> - first precalculate global illumination (with radiosity or blurring
> shadows). In this case, does BSP is interessant to accelerate computing
> ? This pass allows to produce lightmap textures for all faces of the
> scenes. It seems to me that takes a lot of memory space, no ?

Yes this is the method. It is computationally expensive, so is other
stuff like the visibility lists created for the convex leaves in the BSP
tree. I think id Software used a rather large multiprocessor SGI system
for the calculations. The kind of visibility structure Carmack created
for Quake would definitely help in radiosity calculations by limiting
the scope of surfaces you'd have to consider for transmitting light to
any surfaces within a particular leaf if you made use of that. It's
still a lot of computation.

Once computed the only thing you need to remember is the light map
information. This is a lot of texture but it is relatively low
resolution (or blurry), the downside is it can't be tiled like the other
textures, one image is unique to a particular location.

Quote:> - second, during real-time visualisation, the scenes is projecting twice
> : one for material texture and one fore lightmap textures ?

Basically yes, this is called multipass. The idea is you multiply the
surface color stored in the framebuffer by the lightmap value. There is
another way however, you could use two textures simultaneously and have
one modulate the other, this means you only have to draw the geometry
once and might get double the performance depending on the hardware.
Using common OpenGL extensions lot's of hardware supports multitexture
in OpenGL. Voodoo2 cards were the first but it's now a very common
feature on the latest PC Cards, from nVidia, ATI, 3Dfx, S3, Matrox &
3DLabs. Most of these have full speed multitexture in their cards,
certainly the most popular cards do, that's why they get such good
Quake2 performance numbers, the game uses multitexture instead of
multipass when it finds the extension.

Cheers,Angus.

 
 
 

Lightmaps, radiosity and game using

Post by James E. Nelso » Sat, 12 Jun 1999 04:00:00


Gilles,
The lightmaps in Quake are precomputed at level buildtime. Each polygon
"face" has an associated lightmap computed in low resolution (1x1 lightmap
unit = 16x16 world unit.) At runtime, when a polygon is drawn, its lightmap
and texture are combined in a "surface cache" (offscreen memory buffer.) The
textures are first tiled across a memory array, then the corresponding
lightmap is bilinearly interpolated and its values used as lookup entries
into a color map table. (Actually these 2 steps are interleaved.) The color
map is also pre-computed and contains a mapping of each color in the 256
color palette to different intensities of the that color in the same
palette.

Then when a polygon is rasterized, the pre-lit, pre-textured surface is used
for the texturemapping. Since surfaces are cached, they can be reused from
frame to frame, improving the overall frame rate.

If you are interested in more detail, get a copy of the book "Michael
Abrash's Graphics Programming Black Book" which details many of the
techniques used in Quake. If you want to study the actual ID source code for
the buildtime lightmap computations, it has been made public domain by ID
and can be FTPed from their website (idsoftware.com).

Regards,
James Nelson


> I'm looking for game using lightmap techniques. It seems :
> - quake2 and quake3 uses radiosity to produce lightmap texture
> - unreal uses blured shadows to produce lightmap texture

> What is the techniques really used . Is it :
> - first precalculate global illumination (with radiosity or blurring
> shadows). In this case, does BSP is interessant to accelerate computing
> ? This pass allows to produce lightmap textures for all faces of the
> scenes. It seems to me that takes a lot of memory space, no ?
> - second, during real-time visualisation, the scenes is projecting twice
> : one for material texture and one fore lightmap textures ?

> Does exist FAQs or Articles on subject ?

> Thank you for yours answers.

> Gilles

 
 
 

Lightmaps, radiosity and game using

Post by Doug Chis » Sat, 12 Jun 1999 04:00:00



>Then when a polygon is rasterized, the pre-lit, pre-textured surface is
used
>for the texturemapping. Since surfaces are cached, they can be reused from
>frame to frame, improving the overall frame rate.

Is this how it works in hardware as well? Although the Black Book dosent go
into it much, I thought it said that Carmack abandoned surface caching in
hardware, going to a multiple pass rendering approach.
 
 
 

Lightmaps, radiosity and game using

Post by Frans Boum » Sun, 13 Jun 1999 04:00:00




> >Then when a polygon is rasterized, the pre-lit, pre-textured surface is
> used
> >for the texturemapping. Since surfaces are cached, they can be reused from
> >frame to frame, improving the overall frame rate.

> Is this how it works in hardware as well? Although the Black Book dosent go
> into it much, I thought it said that Carmack abandoned surface caching in
> hardware, going to a multiple pass rendering approach.

    In hardware it's ofcourse not done this way :)
    Carmack uses a multitexture approach in QUake/Quake2. However, on some
    cards it uses the wrong extension (TNT/TNT2) and some say it won't
    do multitexturing in 1 pass, just 2 passes of texturing.

    However the software approach is very interesting :)

    FB

 
 
 

Lightmaps, radiosity and game using

Post by James E. Nelso » Tue, 15 Jun 1999 04:00:00


Greetings Doug and Frans,
Of course you are right that hardware rendering is done differently. However, the basic concepts
of precalculating lighting and decoupling lighting from texturing remains the same, and this
approach is (IMHO) Quake's/Carmack's greatest contribution to the current state-of-the-art in 3D
computer games.

Quake II of course allows you to switch between hardware and software rendering, and most users
find the hardware version runs faster and looks better. Quake III is purely hardware with no
options for software rendering. The test release of Quake III also provides a toggle between
using lightmaps and (I'm presuming hardware realized) runtime vertex interpolation. My opinion is
that the lightmaps look vastly superior, although the vertex interpolation runs faster, at least
on my card.

Anyway, we've probably ventured far from Gilles' original set of questions, which were:
1.) Is lighting precomputed? (yes)
2.) Do the lightmaps consume inordinate memory? (not really since lightmaps are lo-res)
3.) Are 2 passes used for texturing/lighting? (yes for hardware, and sort of for software since
the surfaces have to be assembled in memory before rasterization)
4.) Does documentation exist? ( yes, Abrash's excellent books and articles, ID's lighting source
code, and a myriad of articles all over the Web--check out John DiCamillo's informative tutorials
at irth.net/milo/3dgames. However, none of this documentation directly addresses hardware
implementations.)

Best regards,
James Nelson

 
 
 

Lightmaps, radiosity and game using

Post by Gilles GALLE » Wed, 16 Jun 1999 04:00:00


Thank's to James to have made a synthesis answer.
But, hardware or software lighting seems to be not clear.
If i understood as well, there are 2 technics to render prebuilt
ligthing :
1- build lightmaps textures for each faces. Render with 2 texture
mapping (texture+lightmap) for each face. like in Quake2 ?
2- add triangles in face and precompute lighting value on each vertices.
Render with 1 texture mapping for each face but render more triangles.
Like in Quake3 ?

First one needs a powerful pixel/render hardware (and great texture
memory) and, second a powerful triangle/render hardware. In future, what
is the better solution ?

In quality terms, lightmap seems to be the best.


> Greetings Doug and Frans,
> Of course you are right that hardware rendering is done differently. However, the basic concepts
> of precalculating lighting and decoupling lighting from texturing remains the same, and this
> approach is (IMHO) Quake's/Carmack's greatest contribution to the current state-of-the-art in 3D
> computer games.

> Quake II of course allows you to switch between hardware and software rendering, and most users
> find the hardware version runs faster and looks better. Quake III is purely hardware with no
> options for software rendering. The test release of Quake III also provides a toggle between
> using lightmaps and (I'm presuming hardware realized) runtime vertex interpolation. My opinion is
> that the lightmaps look vastly superior, although the vertex interpolation runs faster, at least
> on my card.

> Anyway, we've probably ventured far from Gilles' original set of questions, which were:
> 1.) Is lighting precomputed? (yes)
> 2.) Do the lightmaps consume inordinate memory? (not really since lightmaps are lo-res)
> 3.) Are 2 passes used for texturing/lighting? (yes for hardware, and sort of for software since
> the surfaces have to be assembled in memory before rasterization)
> 4.) Does documentation exist? ( yes, Abrash's excellent books and articles, ID's lighting source
> code, and a myriad of articles all over the Web--check out John DiCamillo's informative tutorials
> at irth.net/milo/3dgames. However, none of this documentation directly addresses hardware
> implementations.)

> Best regards,
> James Nelson

--
Gilles GALLEE (OKTAL)
                       tel: (33)1.46.94.97.83

 
 
 

1. Lightmaps, radiosity and game using

I'm looking for game using lightmap techniques. It seems :
- quake2 and quake3 uses radiosity to produce lightmap texture
- unreal uses blured shadows to produce lightmap texture

What is the techniques really used . Is it :
- first precalculate global illumination (with radiosity or blurring
shadows). In this case, does BSP is interessant to accelerate computing
? This pass allows to produce lightmap textures for all faces of the
scenes. It seems to me that takes a lot of memory space, no ?
- second, during real-time visualisation, the scenes is projecting twice
: one for material texture and one fore lightmap textures ?

Does exist FAQs or Articles on subject ?

Thank you for yours answers.

Gilles

2. Urgent!!Conversion Progra

3. Using BMRT for the lightmaps in games

4. Video Post

5. Lightmaps -2 -radiosity

6. Please help - Compositing live action with 3D elements

7. Lightmaps - radiosity.

8. Looking for .bin files

9. GAMES GAMES GAMES GAMES GAMES GAMES GAMES GAMES GAMES

10. storing multiple lightmaps in larger lightmaps / textures

11. interesting radiosity stuff, GTA:VC game preview

12. GAMES GAMES GAMES GAMES