Uses of Dynamic Lighting and Shadows in FPS MP.


(K^2) #1

He is right, this does deserve its own thread.

More and more FPS are starting to utilize dynamic lighting and shadowing. This means that both mappers and gamers need to learn to use these in a way that improves the gameplay. Since at the moment such uses are obvious only for the stealth focused FPS, this deserves a very high priority among these who focus primaraly on Quake and Doom style deathmatch games.

Since this is a map making forum, and since game tactics have a tendency to quickly develop on their own, the focus of this thread will be the use of the dynamic lighting in mapping.

I belive, that what we need is to find ways to make shadows usefull for early detection of your opponents, rather than to provide cover. Turning of lights, in this case, should not make areas completly dark, but rather create an even ammount of lighting from different directions with soft, barely visible shadows. We need to make sure that a person wouldn’t be able to simply find a shady spot and camp from there. I hope I do not have to explain why. At the same time, the dynamic lighting can probably be better used than to simply light the entire arena evenly.

The only idea that comes to my mind at the moment is using spotlights to “guard” important items. The light source is placed near the item, causing anyone who picks up the item to cast a shadow on a well visible part of the map.


(swelt) #2

I would like to include within this discussion the use of absolute black shadow areas. Something I posted in a previous discussion that got aborted: I think there is a middleground here between Q3 fullbright and the kind of over shadowed, over camp/ambush friendly things I see in the stock D3 MP maps. The shadowing in the RL room on Delta Labs is the best example I can think of. It might be ok for FFA or TDM (I personally feel ‘dirty’ hiding in shadows, regardless of how effective it might be) but I don’t think it’s appropriate for tourney. If that were one of a very few such shadowed areas on the map, again it might work but on Delta labs it’s not.

But to your point about how to make shadows into a beneficial gameplay element, I agree with pretty much everything you’ve said :slight_smile: If I understand correctly, the method for lighting a scene like this would be roughly:

[ul][li] Create a low level, broad, diffuse only room or corridor light.
[/li][li] Create a set of more focussed lights, highlighting significant items + architecture.
[/li][li] With these second layer lights, give significant thought to what shadows they cast and how those shadows might be used by an intelligent player as a cue
[/li][li] Decide which lights should be made breakable.[/ul]
[/li]
I kinda like the idea that a particular light might be a real giveaway and that a smart player might shoot it out. It’s much preferable to ‘player shoots light to create pitch black camp spot’.


(K^2) #3

Pretty much yes, but I think that the even if the light is breakable, it should “regenerate” after a while. Or, perhaps, it should be possible to restore it with a switch located elsewhere. But they shouldn’t just sease to be, because, as I said, at some point you are not going to have any lights left, and that just wouldn’t be any fun.

Also, this covers just a part of the uses. I’m sure there are others. I’m thinking of putting together a small demo map which will sort of outline some of the possible uses of dynamic lighting.


(tequila) #4

I’m hoping there will be at least a subset of mappers who take sort of a “wary and conservative, but not dismissive” view towards some of the new possibilities with D3 type technology.

For example, maybe have a well lit path to something important, but be able to start a mechanical process with a moving object that obscures the light source for a brief, fixed time while it moves.

The darkness could be used for cover briefly, but starting the process would also alert an opponent that you’re probably heading that route. You could also start it up, and head a different route as a fake out.

Another thing I’d like to see attempted, now that there is real scripting / dynamic stuff possible, are timed events that change a layout in the middle of a game or whatnot. Imagine a powerup that is very difficult to get when the map starts, but 5 minutes into the match a couple bridges extend to it that make it easier.

Or maybe there’s no rocket launcher or chain gun available at first, the map is shotgun and grenades only - and 3 minutes into a match rooms open up with the more powerful weapons.

Or how bout a BFG with two or three shots worth of ammo, spawning one time only 12 minutes into a one on one. Shake things up towards the end.

Mixing up fast and direct ‘regular DM’ with some of the new things possible could be greatly rewarding I think, but there will certainly be some experimenting involved.


(UniKorn) #5

I suggest Id changes mp so that when you camp for more than 4 seconds you emit a bright pink light for 10 seconds. :banana:


(K^2) #6

That is a really good idea. It doesn’t even matter what causes the light to go out. It can be just a switch somwhere. The important part is that the protective shadow is short lived, which makes it useless for camping, but very usefull as far as tactics go.

That was possible even in Q2 days. You could set up a timer entity (can’t remember what it was called now) and tell it to start on the map load. When a certain ammount of seconds passes, it could triger another entity. In this case, the timer could simply triger the bridge (door_rotating, perhaps?) after 300 seconds (5 min.) I allways thought that the maps should be more dynamic. I’ve experimented with a few things back in the Q2, but the most complex thing I’ve built was a 5x5 aarray of “rooms” with no doors, but the sections of the wals would go up and down in different places every few seconds. As the result, the layout of the map was constantly changing. If you have seen movie Cube, maybe something like that would work well. There there was a “labirinth” consisting of cubic rooms which moved arround every now and then. Except for a deathmatch map, these shouldn’t be just empety cubes, but rather blocks filled with coridors, rooms, bridges, and things like that. A script would cause these blocks to disconnect from each other once in about a minute and move to the new places. To make things more confusing, some of the blocks should look similar, but be connected to other blocks differently.

By the way, does Doom 3 allow connecting one moving entity to another? Like, can I, for example, set up a sliding door on a rotating disc?

Edit: This is starting to go a little beyond the topic, though.


(tequila) #7

Sorry to get off topic a bit, with changes in general as opposed to lighting specifically.

To keep it short, doom has pretty elaborate scripting - connecting objects togther, disconnecting them, conditional statements, changing shader parameters, looping functions, etc.


(K^2) #8

That is, of course, true. I was just saying that you could do quite a bit with systems of triggers as well. Even conditionals and some boolean logic. A lot simplier with scripts in Doom3, though, and you don’t have to be trying to remember exactly what that array fo 20 triggers outside of your map does.

I wonder how much freedom one would have with shaders without having to resort to mods. Could I, for example, tell the engine to use my own shader for a specific light on the map? Some really cool effects can be done that way, like, for example, a black & white lamp, which will cause objects to loose color. This could even be done so that the effect depends on the intensity of “light” received, causing color on objects to fade away as the object aproaches the source. It is a fairly simple fragment program (aka pixel shader). Yes, absolutly pointless as far as gameplay goes, but it would look really cool.

And tequila, I hope you don’t mind if I’ll use the container and the light source idea for the small dynaimc lighting for MP games demo map.


(tequila) #9

the light idea is fine to use of course. :slight_smile:

no experience here with pixel shaders or trying to make anything like a black / white light. all lights in D3 use shaders but i don’t know how far the system goes.

i suppose i shouldn’t say the scripting type possibilities are entirely new, as you point out, but it is a good bit less hack-ish, and real time lighting for all the moving things is a big plus.


(swelt) #10

Good ideas, good illustrations of methods of making value of dynamic lights and shadows. I think the “wary and conservative, but not dismissive” stance is a good mantra.

We’ve been in general agreement so far that static pitch shadow spots are a ‘bad thing’ ™. Is there anyone who would like to argue otherwise?


(def46) #11

OOT

"Another thing I’d like to see attempted, now that there is real scripting / dynamic stuff possible, are timed events that change a layout in the middle of a game or whatnot. Imagine a powerup that is very difficult to get when the map starts, but 5 minutes into the match a couple bridges extend to it that make it easier.

Or maybe there’s no rocket launcher or chain gun available at first, the map is shotgun and grenades only - and 3 minutes into a match rooms open up with the more powerful weapons.

That is awesome! I can’t believe it s possible since Q2 and no one used it. It should work better now, because we can make a nice gui that makes a nice ‘countdown’ panel somewhere, so it is clear to players how much time there is till something happens , even if thye dont know what it is. As long as the countdown thing is highly visible and maybe has asome sounds. If it is right in front of a obviously de-actiovated bridge with the bonus visible on the other side, or some kind of spawn platform with no bonus visible but that looks like there should be one…

Hmm now that reminds me of Bomberman where after x amount of time, the outer walls start to close in and make the playable area smaller to speed up the ending of the game. In Doom 3 you could have explosion and parts of the map crumble down, players could be killed or have to tp out of sealed areas into the center area from there on with several pathways blocked. This would require toggling off deathmatch start points which were in the ‘outside’ area though… dont know if that’s possible.


(tequila) #12

just trying to think of a situation where a pure, fixed shadow might work for Q3ish fast 1 vs 1.

if a hiding spot is pretty small, and there’s only one of them (or two near each other?), it might be almost as dangerous to use as it is valuable, so it becomes a judgement call whether to use it.

i don’t think the Id maps are really meant as 1 vs 1, they’re on the big side for it, and with lots of potential darkness there’s probably little one can do about someone running down the clock. you can only fire so many “what the hell he might be there” rockets looking for him.

narrow things down to one spot on a smaller map, and maybe that would change.

to answer def46’s question, entities can be removed from the game with scripting, so in theory you could toggle off spawn points mid - match. will have to try that out.

EDIT:

something i keep forgetting to address:

" that what we need is to find ways to make shadows usefull for early detection of your opponents, rather than to provide cover"

one example:

it’s possible to build and light a space such that moving through it will cast a shadow in the direction you’re heading, making it a dangerous route as someone could see your shadow before you get there, warning him of your approach. eye level light sources can be good for this, and you can exxagerate shadows by making a player walk very close to the source, which will cast a huge shadow.


(wviperw) #13

We’ve been in general agreement so far that static pitch shadow spots are a ‘bad thing’ ™. Is there anyone who would like to argue otherwise?

I’d say they are a Bad Thing for the “up” player to utilize, but I’m not so sure regarding the “down” player. I think a hiding spot might be legitimate for a freshly spawned player for a brief amount of time. Say, for example, the down player just spawns, has a pistol only, and hears knows the up player close by. That down player could hide in the corner for a few seconds as the up player passes by. If there are only a few static black corners in the map, a skilled up player will fire prediction shots into these corners if he thinks is opponent might be temporarily hiding.

I think you just get into trouble when the up player starts hiding in the dark corners. Then you get up players who try to milk the clock, as well as “campers” who go for the cheap kills. Possible solutions to this problem include changing from a timelimit to fraglimit based system, as well as making certain powerful weapons “glow,” so that they give you away in dark corners. So, for example, the up player who has RL can’t hide in that dark corner, but the down player w/ shotgun can.


(tequila) #14

hehe this would be very illogical and ‘gamey’ - but it’s probably possible to make a light switch that only the down player can use.

if : player who uses switch has less points than other guy

turn off one / some / all lights for a little

else : give player nasty electrical shock, damage based on how big his lead is


(wviperw) #15

Regarding shadows proving early detection of your opponent, I think it really depends on what you’re going for. When I think of using shadows as strategy like that, I think of the Q2 days of Thresh and Immy and others where it was almost like a chess match. Like on q2dm3, their movemnts were incredibly fine tuned and methodical, sneaking around the map, taking prediction rails through doorways. While this was in and of itself interesting to watch, the thing that made it work was the incredible bursts of action that would happen every so often. I think that is one possible direction for D3 MP to go if it were to utilize shadows like that.

Then there is the other direction that is more in line with CPMA. Here, everything is pure speed and energy, so I think shadows would likely not even be utilized and might detract from the gameplay here.


(K^2) #16

This cannot be done based just on the points, and I don’t think you’ll be able to get to player’s inventory via the script. The only way to prevent camping here is to put up a big spot light over such shady corners which will activate if somone is staying there for more than 10-15 seconds. Setting up a filter which doesn’t allow you to fire anything other than a hand gun from the shadow would be a nice addition, but that could only be done in the mod, I think.

I think the plasma gun glows like that. But it wouldn’t take long to switch from a hand gun to the plasma gun while someone is running by.


(Shallow) #17

Timed lighting changes for shadowy areas might be an idea - say, some sort of machinery that normally illuminates an area with a red glow but powers down and lets the areas shadow-projecting lights have full reign for 5 seconds out of every 15. Then you’d get the opportunity to lurk if you knew someone was coming and the time was right, but it wouldn’t be tempting to sit there all day. If the dark timespan was quite short it could easily go wrong for someone trying to hide there too.

Or how about a room with three dark alcoves, one of which is randomly selected to be lit for a few seconds whenever one of the room’s doors opens? I think there’s quite a bit of fun to be had playing with lights and scripting.


(K^2) #18

Sounds almost like a cheap TV show. “Guess the Safe Shadow!” But the idea is pretty good. Does the script have a random number generator? You could have loads of fun with one of these. If it doesn’t, a pretty good “random” number generator can be built out of several timers with different dellays. That is what I allways used in the Q2 for “random” events.


(rgoer) #19

sys.random


(swelt) #20

Is this the time to raise the issue of gimmickery vs simplicity? There is a line to be drawn between playing the game and playing the map. A simple and easily understood gameplay element (e.g. a trap) will probably add to the overall map and game experience. Too complex, too random, too spurious and I think it will switch players off. I’m a big fan of tricks and traps, but remember that a good map includes a number of elements, of which one may or may not be traps/gizmos/gimmicks.