Jump to content
The Dark Mod Forums

Lightmaps In Doom 3 Engine: A Hybrid Approach To Real-time Lighting


AluminumHaste

Recommended Posts

I have some ideas for simulating a radiosity with dynamic lights.. probably hard to implement with scripting, also very restricted and difficult for the mapper, but in some key areas it might make a difference.

 

You mean like we already implemented it? :)

 

See the setting "ambient_light_dynamic" here:

 

http://wiki.thedarkmod.com/index.php?title=Ambient_Sounds%2C_a_zone_approach#Ambient_light_settings

 

Edit: Just wrote an overview article here: http://wiki.thedarkmod.com/index.php?title=Radiosity (so it can be found if someone searches for radiosity)

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

Uhm, well!! :) Your heat-related description of Radiosity is absolutely correct, so I don't understand how you think that the dynamic ambient light method is in any way similar to Radiosity... :P It works just the same way for computergraphics as for heat: You subdivide surfaces and solve the linear system of equations. So it would be a little too far fetched to say TDM has Radiosity and it's definitely a flame-war-target.

 

Radiosity also isn't calculated from point-lightsources, but just from luminous surfaces, so that's another point not matching up with dynamic ambient. Global Illumination methods on the contrary use actual lightsources for the calculations, so that would be at least one step closer.

 

Let's see, what term does describe this technique better? It's somewhat similar to the dynamic contrast setting of many monitors, with the enhancement of colorchange:

 

"Local Lightsources' Colorintensity-dependent Dynamic Ambient Lighting" or short: LICDAL!!! :D

Link to comment
Share on other sites

Uhm, well!! :) Your heat-related description of Radiosity is absolutely correct, so I don't understand how you think that the dynamic ambient light method is in any way similar to Radiosity... :P It works just the same way for computergraphics as for heat: You subdivide surfaces and solve the linear system of equations. So it would be a little too far fetched to say TDM has Radiosity and it's definitely a flame-war-target.

 

It is definitely not radiosity (or at least it is so simple that one wouldn't call it that). But it runs in real-time and automatic, and thats better than anything else (because they are not implemented at all :)

 

 

Radiosity also isn't calculated from point-lightsources, but just from luminous surfaces, so that's another point not matching up with dynamic ambient.

 

Erm guess where the light on the liminous surface comes from - you guess it, from a light source :) Of course simulating how the light gets reflected from a surface and injecting that back into the scene is way better, but we have to start somewhere.

 

Global Illumination methods on the contrary use actual lightsources for the calculations, so that would be at least one step closer.

 

Let's see, what term does describe this technique better? It's somewhat similar to the dynamic contrast setting of many monitors, with the enhancement of colorchange:

 

"Local Lightsources' Colorintensity-dependent Dynamic Ambient Lighting" or short: LICDAL!!! :D

 

Well, I won't stop you implementing radiosity, but even if you can manage this in real-time, a lot of people will complain because they don't have the latest, greatest hardware. And I fail to see how radiosity would improve the gameplay or the "beautyfullnes" of the game. Yes, it will be more realistic, but its very expensive.

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

Erm guess where the light on the liminous surface comes from - you guess it, from a light source :)

To be precise, in the basic radiosity calculations only the self-radiation of surfaces is taken into account, but not actual lightsource. However, you can derive the self-radiation of the surfaces from the present lightsources in a preprocessing pass, e.g. raytracing or a the normal render pipeline of real-time engines.

 

Well, I won't stop you implementing radiosity, but even if you can manage this in real-time, a lot of people will complain because they don't have the latest, greatest hardware. And I fail to see how radiosity would improve the gameplay or the "beautyfullnes" of the game. Yes, it will be more realistic, but its very expensive.

Radiosity would wildly improve the visual appearance of TDM!! Have a look at Mirror's Edge for example, which uses baked Global Illumination (even better than Radiosity). It simply looks awesome. The Doom engine has always been criticized because of its pure dynamic lighting approach and the resulting missing Radiosity or Global Illumination pass, which is why I dream about an implementation of Lightmap support once Doom 3 has gone open source. A realtime implementation of Radiosity or GIs is simply not possible with the modern hardware, besides maybe supercomputers... ;) The closest you can get to this effect in real-time is Screen Space Ambient Occlusion, but even that is highly hardware intensive!

 

Anyway, I wasn't suggesting you should throw the dynamic ambient light feature away. It already poses a great improvement over the default Doom lighting. I like it! But explaining it in a wiki-article together with Radiosity is simply misleading...

Link to comment
Share on other sites

To be precise, in the basic radiosity calculations only the self-radiation of surfaces is taken into account, but not actual lightsource. However, you can derive the self-radiation of the surfaces from the present lightsources in a preprocessing pass, e.g. raytracing or a the normal render pipeline of real-time engines.

 

Radiosity would wildly improve the visual appearance of TDM!! Have a look at Mirror's Edge for example, which uses baked Global Illumination (even better than Radiosity). It simply looks awesome. The Doom engine has always been criticized because of its pure dynamic lighting approach and the resulting missing Radiosity or Global Illumination pass, which is why I dream about an implementation of Lightmap support once Doom 3 has gone open source. A realtime implementation of Radiosity or GIs is simply not possible with the modern hardware, besides maybe supercomputers... ;) The closest you can get to this effect in real-time is Screen Space Ambient Occlusion, but even that is highly hardware intensive!

 

Well, I can see how it would improve things if we could get rid of the manually placed dirt decals and still get the same effect (e.g. darker corners, lighter wall across the windows etc).

 

Anyway, I wasn't suggesting you should throw the dynamic ambient light feature away. It already poses a great improvement over the default Doom lighting. I like it! But explaining it in a wiki-article together with Radiosity is simply misleading...

 

Ah ok, could you please fix the article then, as you know alot more about this then me? Maybe write an introduction to the different terms (AO, radiosity etc) and then just link to our poor-mans-thingywhatever?

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

You mean like we already implemented it? :)

 

Cool! :) Didn't know about that!

 

I was thinking something completely different, though (and with a different purpose). Basic idea: Consider some special lights placed in a strategical position, a dummy volume (close to this light) detects how much light is incident on it and controls this special light to increase it's intensity.

 

It's complicated and not incredibly useful, but I like the mental exercise :P I could see this used to lit up a room that has absolutely no light in it, but when the player opens a door to a lit room, the dark room will get some 'clarity' besides the direct light.

Link to comment
Share on other sites

Cool! :) Didn't know about that!

 

I was thinking something completely different, though (and with a different purpose). Basic idea: Consider some special lights placed in a strategical position, a dummy volume (close to this light) detects how much light is incident on it and controls this special light to increase it's intensity.

 

It's complicated and not incredibly useful, but I like the mental exercise :P I could see this used to lit up a room that has absolutely no light in it, but when the player opens a door to a lit room, the dark room will get some 'clarity' besides the direct light.

 

Yeah, that sounds like an improvement to the dynamic ambient light. But I am not sure if we can detect the incoming light on a volume. (And would the mapper need to place the volumen manually?)

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

  • 2 weeks later...

That video isn't real-time rendering. Here's some real-time radiosity for you...

 

 

And another better example...

 

 

Thanks for stopping in Rich! I was always thankful for your advice and guidance on the Doom3World forums, glad to see you here. Thanks for the vids, I have to change my pants now!

I always assumed I'd taste like boot leather.

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • The Black Arrow

      Hey @nbohr1morehow come the zombies in The Dark Mod don't have a "resurrection" mechanic to it, similar to how Thief has it?
      They're quite a weak creature as of right now, it's merely a walking corpse that slashes you, making attacking them to kill them an actual strategy.
      Would be better if they had some cool mechanism to it that truly makes them a danger, such as the resurrection idea itself.
      · 3 replies
    • Ansome

      Query: when was the last time a zombie in a video game was unnerving or scary to you? I'm chipping away at my anniversary submission and I've been trying to gather opinions on the subject. I'm perfectly capable of lighting them well, changing their sfx, and creating effective ambience, but I'm worried that zombies at their core are just too overdone to be an effective payoff to the tension I'm creating.
      · 4 replies
    • nbohr1more

      The Lieutenant 3 is out! Congrats Frost_Salamander! ( raising awareness )
      · 2 replies
    • OrbWeaver

      Has anyone had any luck with textures from Polyhaven? Their OpenEXR normal maps seem too washed out and give incorrect shading in the engine.
      · 5 replies
    • datiswous

      I tried to upscale the TDM logo video. First try:

      briefing_video.mp4 You can test it ingame by making a copy of the core tdm_gui.mtr and place it in your-tdm-root/materials/ , then edit line 249 of that file into the location where you placed the new briefing.mp4 file.
      What I did was I extracted all the image files, then used Upscayl to upscale the images using General photo (Real-Esrgan) upscale setting and then turn it back into a video.
      I might have to crop it a bit, the logo looks smaller on screen (or maybe it's actually better this way?). My video editor turned it into a 16:9 video, which I think overal looks better than 1:1 video of original.
      · 1 reply
×
×
  • Create New...