Jump to content
The Dark Mod Forums

Ambient Light Texture Tweaks For Daylight?


sullium

Recommended Posts

Hi all, so I've been playing around with doing daytime lighting in a global fashion (ie. not carefully placing/sizing new lights for each outdoor space). The ambient light will be unusually bright, so I figure I should be picky about it to make shadows look as nice as possible. However, the existing light textures look a bit off here and I have no idea if/how it can be improved.

When I use the "ambientlightnfo" texture for my ambient_world light, my sunlight test map looks like this:

Spoiler

image.thumb.jpeg.8b055d8cd0647efd55651020586b22d1.jpeg

image.thumb.jpeg.7c5658e288a0819a89b10e97d41016a1.jpeg

The walls in the dark indoor room look perfect, they seem to be lit from above which gives the bricks depth. But the floor is way brighter than the other surfaces, and both the floor and ceiling have quite flat lighting. The long shadow in the center of the outdoor image looks oddly darker on the wall than on the floor, due to the brightness difference. Even in directly lit areas the floor is noticeably more blue than the wall (since the ambient light is bluish).

The main other texture I found that worked independent of the light's position was "zol_nofalloff". This one doesn't have the floor/wall difference but it's totally flat and "fullbright" so it looks quite bad at this brightness:

Spoiler

image.thumb.jpeg.5522e07ed61f287d137582efbb7473a1.jpeg

 

Would it be possible to tweak the ambient light to make most/all surfaces look nicely lit like the walls do when using the "ambientlightnfo" texture, with fewer inconsistencies between surface angles? Or perhaps this breaks the laws of physics and I should pursue other options?

 

(Side note: I did find this great Doom 3 outdoor lighting article through a link on the TDM wiki. However, I want to see if I can get by with just the sun and an ambient_world light, for simpler setup and hopefully better framerate than that solution.)

Link to comment
Share on other sites

I think that the zol_nofalloff texture doesn't use the new cubemap method like the default ambientlightnfo does.

You can try experimenting with an alternate cubemap image to see if you can achieve the desired results.

The cubemap is meant to be an irradiance map image.

See:

 

Most mappers who aren't satisfied with the available ambient lighting options will use "bounce lights" ( AKA regular lights with ai_see set to 0 and set to noshadows ) to enhance the look of ambient areas.

I liked the ambient shader in TDM 1.03 because it had a fresnel effect and better specular response, thus I created a shader mod that players can use to have something similar in TDM 2.12 :

 

  • Like 1

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

OK here is the material:
 

lights/ambientlightnfo
{
    ambientLight

    lightAmbientDiffuse _ambientWorldDiffuseCubeMap
    lightAmbientSpecular _ambientWorldSpecularCubeMap

    lightFalloffImage makeintensity( textures/lights/ambientlightnfo)

    {
        forceHighQuality
        map textures/lights/ambientlightnfo_amb
        colored
        zeroClamp
    }
}

The _imageName in materials refer to "engine textures" that are generated when the engine launches.

In this case it's a cubemap ( _ambientWorldDiffuseCubeMap ) with lighting on the top that has a gradient to the sides.

Again, we assume that you are blurring the input cubemap according to irradiance specifications.

We have material keywords ( bake**** ) that can blur the cubemap but it's not as good as using a 3rd party tool:
 

lights/ambientCube/cubeSky

{

        ambientLight lightAmbientDiffuse bakeAmbientDiffuse(cameraLayout(env/lights/cubesky))

        lightAmbientSpecular bakeAmbientSpecular(cameraLayout(env/lights/cubesky))

       {    

         map lights/squarelight_amb.tga colored zeroClamp

       }

}

https://wiki.thedarkmod.com/index.php?title=Light_Properties

  • Like 1

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

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.

×
×
  • Create New...