Archived

This topic is now archived and is closed to further replies.

live3d_vision

How did they do it?

Recommended Posts

I''m a DirectX programmer but I thought I''d come and ask you OpenGL people some questions! I''ve been playing Return to Castle Wolfenstein and have been totally amazed by the lighting? How does everyone reckon it''s done? My personal opinion is that it''s done by lightmaps and alpha blended light coronas but some people disagree and say it''s done using whatever the OpenGL equivalent of the Direct3D light object is. What do you people think as people who understand OpenGL bettter than me!! ~~tim

Share this post


Link to post
Share on other sites
rtcw uses the quake3 engine (ive never played rtcw) but q3 does NOT use opengl lighting, it uses lightmaps

http://uk.geocities.com/sloppyturds/gotterdammerung.html

Share this post


Link to post
Share on other sites
There are multiple lighting techniques used by the Quake III engine.

The OpenGL/Direct3D light object does vertex-lighting and gaurad (I can''t spell it) shading. RTCW/QuakeIII uses vertex lighting for player and weapon models which it performs based on the player''s location. There is a precomputed light grid for each map. Quake III takes the nearest light in this grid and uses it to light the model. Whether it uses a single OpenGL/D3D light object to provide it or if it performs the calculation in software I can only guess.

The level lighting is entirely precomputed. When running Quake III in vertex lighting mode, it simply uses precomputed vertex colors. When it is using lightmap mode (chances are what you''re using) it, as the name implies, uses precomputed lightmaps.

For dynamic lighting of level geometry, like the pool of light around a rocket, Quake III uses multiplicatively-blended lightmaps as well. I''m not sure entirely how it does this, but I do know that such lighting is projected in a cylindrical rather than spherical fashion.

Share this post


Link to post
Share on other sites
Nice one! That answers a hell of a lot of questions. In fact - you answered a question I forgot to ask about lighting of the guns in different zones!

Now I can go off and reproduce that!

cheers

~~tim

Share this post


Link to post
Share on other sites
There are multiple lighting techniques used by the Quake III engine.

The OpenGL/Direct3D light object does vertex-lighting and gaurad (I can''t spell it) shading. RTCW/QuakeIII uses vertex lighting for player and weapon models which it performs based on the player''s location. There is a precomputed light grid for each map. Quake III takes the nearest light in this grid and uses it to light the model. Whether it uses a single OpenGL/D3D light object to provide it or if it performs the calculation in software I can only guess.

The level lighting is entirely precomputed. When running Quake III in vertex lighting mode, it simply uses precomputed vertex colors. When it is using lightmap mode (chances are what you''re using) it, as the name implies, uses precomputed lightmaps.

For dynamic lighting of level geometry, like the pool of light around a rocket, Quake III uses multiplicatively-blended lightmaps as well. I''m not sure entirely how it does this, but I do know that such lighting is projected in a cylindrical rather than spherical fashion.

A/ all lighting is done in software. ie NO opengl lighting
B/ vertex lighting actually uses the lightmaps sampled (brian hook mentioned this) it looks like crap though
C/true

http://uk.geocities.com/sloppyturds/gotterdammerung.html

Share this post


Link to post
Share on other sites