Lighting in levels

A forum about everything related to the Cafu World Editor CaWE: mapping, editing, scripting, making GUIs and fonts, using the BSP, PVS and Light compilers.
Post Reply
Paul
Posts: 6
Joined: 2004-09-04, 16:38
Location: South Africa

Lighting in levels

Post by Paul » 2004-12-06, 22:04

I would just like to know how the lighting will work in levels for the engine...Will you still be using pre-calculated lights for indoor areas or will that be entirely dynamic lights or a mix between the 2?And what about outdoor areas?Pre calculated lights dont really have the effect you need when...lets say opening a door of a house...the light doesnt rush in like when the lights are dynamic...the house just stays dark as it was...Will I have to use lots of dynamic lights in a level to lit it up like Doom3 were I found its not weird for a room to have 8 lights where in real life 1 would have been needed...or will i have to use dynamic lights in outdoor areas to fake some effects...like putting a dynamic light infront of the door so when you open it,it gives a effects of light streaming into the house...Just wondering :D
User avatar
Thrawn
Posts: 302
Joined: 2004-08-30, 10:38
Location: NRW, Germany
Contact:

Post by Thrawn » 2004-12-06, 22:24

Hell Paul,
welcome to the forums! At the moment Ca3DE uses pre-calculated lightning for maps because of performance reasons. I think it would be possible to do it with dynamic lights too, but no one could then run the game (FPS = 0 ;) ). Doom 3 is not similar at all with Ca3DE at this point. Doom 3 only has small indoor areals but Ca3DE can handle massive maps.

So dynamic lightning should only be used in mapping design very rarely because of performance reasons.

I hope that answers your question :D
Paul
Posts: 6
Joined: 2004-09-04, 16:38
Location: South Africa

Post by Paul » 2004-12-08, 22:10

:D Hey Stormtrooper,
Thanx for the reply...but that still doesnt really answer my question...
CA3DE supports both lighting methods and there will of course be big open areas which uses pre-calculated lights...

What I want to know is how will the shadows for those areas be drawn?Basically I want to know how is the pre-calculated lights going to draw the realistic shadows you get when you use dynamic lights?CA3DE is not similar to DOOM3 now but in the near future it will be more advanced...
I have created maps with DOOM3 that are huge...the only reason it runs slow is because they only use DYNAMIC lights...

CA3DE will not have the problem of FPS because it is designed as a next generation engine like DOOM3...So the performance is not an issue...I just want to know how the engine is going to handel the shadows and stuff for pre-calculated lights... :D
User avatar
Kai
Posts: 177
Joined: 2004-08-19, 15:56
Location: Germany
Contact:

Post by Kai » 2004-12-08, 23:32

Hi Paul :)

First of all, as you already noticed Ca3D is going to support both methods of light, static and dynamic (hardware based lights)

Many current AAA titels like Doom3, HL2 or Farcry are using different techniqes to provide nice gfx on your screen.

Doom 3 only knows dynamic lights, so all(!) lights can be manipulated in runtime, in addition it also supports the famous "stencil shadowing".
Those things are providing a realistic behavior on surfaces that support different materials (normal map, diffuse map, specular etc.)
The artist can control the look of a surface in a very flexible way.

The negative side is, that all those lights and shadows are pretty heavy calculations even on very modern hardware.
Doom3 aimed on a dense atmosphere, small rooms, very dark, quite claustrophobic, and a "technical" world.
Basically I want to know how is the pre-calculated lights going to draw the realistic shadows you get when you use dynamic lights
Precalculated lights are drawing a precalculated shadow :) for geometry, not for models or static meshes.
Thats one of the big problems if you want the world to be uniform. Stencilshadows will give you the option to create a uniform light and shadow system for the cost of performance and the typical sharp shadow.

A third option would be to also support softshadows or shadowmapping, like it is used in HL2.
However those shadows can only be used for models and static meshes but not for geometry.
They are also very tricky in some situations but very fast..

The main rule for dynamic lights is to have only small lights (better lights with a small radius) and as less as possible on one surface ! Each light that reaches a surface will force one added pass to render all.
were I found its not weird for a room to have 8 lights where in real life 1 would have been needed
Sure but you forget something ;)
In reality, lightrays are bounced from each surface as long as they emit photons.
This is the concept of the precalculated light in Ca3D (and other software) called "radiosity". Its static but very realistic.

In doom3 there is only dynamic light, however those light are not bouncing anything. So in this point of view those lights are unrealistic..
So ID Softwares leveldesigner had to cheat and thats why you have more than one light in one room:
-one primary basic light, that drops the shadow
-few secondary lights to fake bounced light
Paul
Posts: 6
Joined: 2004-09-04, 16:38
Location: South Africa

Post by Paul » 2004-12-09, 22:25

HellOOOOO Kai :D

Thanx for the reply...That answers my question...No I know what radiosity is and I know how to fake it in DOOM3 I was just wondering where CA3DE was standing...Ive started working on a map to contribute and would just like to be up to date with the MAGIC...

Now there is something else I would like to know...Could you explain SHL(spherical harmonic lighting) to me :oops: ...Ive tried to understand it and it looks to me like a method to use radiosity lights in real time...Is this correct?
User avatar
Kai
Posts: 177
Joined: 2004-08-19, 15:56
Location: Germany
Contact:

Post by Kai » 2004-12-09, 23:28

Ive started working on a map to contribute and would just like to be up to date with the MAGIC
Sure, feel free to ask whatever you want :)

SHL:
Well i can only try cause its quite complicate to explain ^^

Lets see
Its basicly using a similiar method to radiosity, but somehow more dynamic, thats what you already pointed out .

After having a look in to some examples from other authors and into the implemented version of the Ca3D, its like that:
The complete enviroment is surrounded by a sphere.
Every spot on the surface of sphere can emit light into the center of the sphere, where the enviroment (the level) is located.
Now its possible to rotate the sphere around its center (the level) . All possible "situations" of where the light could be and how this would look like, is memorized in a map (SHL Map).

In Ca3D this feature is not yet released but finished.
It looks so far like this:

Every part of the level is mapped with nonfiltered texels, they are not that big but you notice them :) Those are the lighttexel of the SHL Map. When the lightdome moves, you notice how the texels are getting darker or brighter depending on the "sun" position.

So far the implementation in Ca3D looks very cool but cost a lot of performance and there are some minor "bugs", but it works.
User avatar
Carsten
Site Admin
Posts: 2160
Joined: 2004-08-19, 13:46
Location: Germany
Contact:

Post by Carsten » 2004-12-10, 19:24

Hello Paul, hello all,

sorry for joining this thread so late, but I'm somehow missing the notification emails that the php board is supposed to send out. (Btw, is somebody else also missing notification emails??)

As Kai has already provided very thorough answers to your questions, I'll not duplicate. ;)
All lighting methods that Ca3DE can handle (lightmaps, dynamic, SHL) are independent of each other and just "add" when combined. You can use just one or all of them together.

SHL will be treated in my diploma thesis, which is finished really soon now. However the backgrounds are probably best described by Robin Green, whose paper is at http://www.research.scea.com/gdc2003/sp ... hting.html
The paper of the original researchers, one of whom is my thesis supervisor, is available at http://graphics.csail.mit.edu/%7Ekautz/ ... index.html (" Precomputed Radiance Transfer for Real-Time Rendering in Dynamic, Low-Frequency Lighting Environments"). This one is really tough though.

For mappers, SHL will fully be handled by the engine (internally). There is nothing to tweak about it. ;)

Best,
Carsten
Best regards,
Carsten
Paul
Posts: 6
Joined: 2004-09-04, 16:38
Location: South Africa

Post by Paul » 2004-12-12, 21:50

Hello All!!!!!!!!! :D

Thank you for all the replies and answers to my questions...Im currently working on a map based on the tech demo requirements...

Ive only really started on teusday so I might be finished by next week but only with the structure...Im trying to make some textures and static details which will take longer...Ill try to mabe post a screenshot by next week but that will just be the undetailed version...Hopefully it willl meet the requirements you need for a tech demo...If not then Ill make another one...

If there is anything specific that I have to do in my map thats not mentioned in the techdemo text file please tell me...:lol:
User avatar
Kai
Posts: 177
Joined: 2004-08-19, 15:56
Location: Germany
Contact:

Post by Kai » 2004-12-12, 22:27

So you are contribute some work , thats very nice ^^

Did you make some levels before, so you can show us some examples of your work ?
Im very interesting of you upcoming level, because you used the techdemo text .. :D
Paul
Posts: 6
Joined: 2004-09-04, 16:38
Location: South Africa

Post by Paul » 2004-12-19, 22:00

Hello

Sorry for the long wait for my reply...Currently I dont have any work I can really show you that will impress(Usually I make something but delete it cause I see something better)...But I am working on 2 maps for Ca3de and 1 for Doom3...

I might have something up that will show you my style of mapping by new year but not really anything sooner...Im strugling with creating new textures and static models to use in the level...
Right now Im about 60% finished with the structure...the indoor area is almost finished but I havent started with the terrain...
Once again I will try to get some pics up but I cant really show you without the proper textures I plan to use...
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests