Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Subatomic

Creating shadows and atmospheric lighting

Recommended Posts

It seemed more appropriate to ask here rather than in the Wads & Mods thread for my map, "Depereo". Here was the comment I received that has lead to the question I'm going to ask:

myk said:

What I don't like about this level as it looks now is how you've neglected DOOM's lighting variety. There are lighting differences between each section, but each part has uniform lighting. The environment and combat could be enhanced by adding shadows here and there.

[/b]

How exactly are shadows and/or atmospheric lighting effects achieved? Nothing super fancy, just vanilla-compatible things. I'd rather learn the basics before tackling whatever might be possible with source ports like GZDoom, etc. My best guess was that you create a dummy sector, point it in the direction your light source will face, and change the sector's light level. Is that all there is to it, or am I way off?

Share this post


Link to post

You change light levels of sectors. Additionally, you may split sectors into multiple ones where the different sectors have different light levels.

Take this as an example:

 __________
|          |
|    ______|
|   |
|_L_|
You have a sector that looks like the above. Say you want to put a light source where the "L" is. Now in real life, the entire sector's light level is not going to be evenly distributed throughout it.

So, do something like this to cast a shadow where the light cannot reach the sector:
 __________
|     /Dark|
|    /_____|
|   |
|_L_|
Essentially, you just seperate sectors into multiple ones and differ the light levels of each. It gives the illusion of shadow. There are many different tricks you can do, but this is a basic example.

Be careful with using the shadow tricks on windows or doorways though. A common thing people do it put the lighted sector up against the window, and when you are on the inside, the wall above and below the window are lit as well. This can be remedied by putting some space between the window and lighted sector. Example:
       Window                Window
 ______|____|______    ______|____|_____
|     /      \     |  |      ______     |
|____/________\____|  |_____/______\____|

        Meh                  Better
Doorways are a bit trickier, but you can use special vanilla tricks to give more realistic effects.

Share this post


Link to post
Subatomic said:

When you say 'seperate the sectors,' do you just add a linedef between the sectors?


Right, you split the sector into multiple new sectors by adding linedefs along the lines where the light level should change.

Share this post


Link to post

So lets say I have a lamp in the middle of the room. Would I want to draw concentric squares around that lamp, with the squares closer to the center being brighter while the squares farther away are darker?
*edit*
Or maybe they should be more like concentric octagons to look more like circles?

Share this post


Link to post

Unless you're mapping for the original exe, linedefs are cheap. You can create concentric shapes with any number of vertices you want. Use the "insert sector" command to automatically draw shapes with many sides.

Share this post


Link to post
chronoplasm said:

So lets say I have a lamp in the middle of the room. Would I want to draw concentric squares around that lamp, with the squares closer to the center being brighter while the squares farther away are darker?
*edit*
Or maybe they should be more like concentric octagons to look more like circles?


This is exactly the right idea. Basically, the amount of sectors you use in any case depends on the "softness" of the light and shadow. If there is a lamp in the middle of a room, it's going to be brighter in the center than towards the edges (assuming the reflective properties of the room are minimal).

Just use real-world examples and observe how light casts shadows around your room/house. In my first illustration above with the corner in the room, it would probably look more realistic with a harder shadow (one with fewer "buffer" sectors). Sometimes you might have multiple light sources and you can really acheive some nifty effects. In such a case, you would draw out the lines and split the sectors accordingly, but any sectors where the light from each source "overlaps", would be a bit brighter since light has somewhat of an additive property (you can prove this by having a green and red light source on opposite ends of a room, and towards the middle where the light "overlaps", you get a yellowish color). Of course, you don't need to worry about colored lighting though.

Share this post


Link to post

For torches and burning barrels and other large flames, should the light around them flicker much?
I know that the lights around a skull key or something should kind of blink or pulse.

Share this post


Link to post
chronoplasm said:

For torches and burning barrels and other large flames, should the light around them flicker much?
I know that the lights around a skull key or something should kind of blink or pulse.

That all depends on what you think works best in that specific area. When it comes to lighting in Doom, since you have to create it all by hand, you get a lot of creative license. As long as there's not something that looks horribly incorrect and out-of-place, you're pretty much free to do what you want with it.

Share this post


Link to post

Not only is there no set of rules for "how to light," but the atmospheric effect of your lighting may actually be stronger if you're inconsistent in how you create light effects. Now, "inconsistent" is a loaded term, so let me clarify that with an example:

http://www.doomworld.com/idgames/index.php?id=15220

I hate to keep plugging my one decent level, but it's been complimented for its lighting so I'd say it's relevant here. If you pay close attention to the lighting in this level as you play it, you may notice that in the starting dungeon area and the final sewer area, light from torches only reaches a fairly short distance before dissipating to deep darkness. Some spots are very dark even though several torches are visible from those spots. However, in a later section of dungeon (south-middle of the level), light from torches reaches as far as it possibly can - it never dissipates to deep darkness. The only dark areas in that portion of the level are areas with no view of a light source at all. This difference is largely due to my evolving lighting method from practice as I made the level, but it also helps give the two areas unique atmospheres from each other, and shifting atmosphere and mood makes a level more interesting. This also creates a gameplay difference: in the first dungeon, the darkness influences the visibility of monsters, while in the second dungeon, you can see everything clearly - even though it still feels "dark."

I agree with EarthQuake that it's a good idea to look at real lighting in your house and see how lights interact with each other, and so that you can see how lines of shadow should be drawn, and this reminds me of something that happened a while ago. I was walking down a hallway in my house; the hallway light was off, but several rooms off the hall had their lights on, so there was a complex pattern on the floor of shadow and intersecting light. Here's the funny thing: I forgot for a moment that I was actually looking at a snippet of the real world, and I thought to myself, "Wow! That's some really good lightsourcing."

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×