Advertisement
Scene lighting experiments
The first of a series of tutorial essays on mapping exploits
#1
Posted 05 August 2010 - 12:25 AM
Scene lighting experiments - part 1 of a series on mapping exploits
These can also be read at http://shminkyboy.blogspot.com
There's been quite a few attempts at making dark, playable scenes in game levels in the history of FPS games. Some come closer to others in creating 'dark' or 'night time' scenes that are believable to the player, while still offering a light level that allows the player to see other players and interact with the environment. Rendering engine constraints and the reality that "real" darkness makes things look drab and boring make creating a fun-to-play dark scene problematic.
During the course of updating Suburbs, I spoke with Bladekiller and TwentySeven a bit about lighting for maps in a darker setting, and we discussed how Bladekiller did some of the lighting in Tombs. I did some experimentation on my own with lighting to see if it would be possible to take those ideas and make Suburbs feel "darker" without sacrificing player visibility, and ended up with some pretty pleasing results. To demonstrate what I'm talking about we'll break down what we see in the updated levelshot:
As a little test bottle, I took a section of Suburbs and stripped all of the light entities out of it, and removed everything except for brushwork and the skybox itself.
Skybox shader:
textures/shmink/nightsky1
{
qer_editorimage textures/shmink/env/moonlight_sky_ft.tga
q3map_lightrgb 0.6823529411764705882352941176 0.8196078431372549019607843137 1
q3map_sunext 0.6823529411764705882352941176 0.8196078431372549019607843137 1 40 270 50 2 16
q3map_skylight 60 6
surfaceparm sky
surfaceparm noimpact
surfaceparm nolightmap
surfaceparm nodlight
skyparms textures/shmink/env/moonlight_sky - -
}
Remember that this is the actual light level of the skybox itself only, so it is going to be slightly darker than the levelshot above. This was the baseline I used to measure the effect of the targetted lights:
As you can see in the above screenshot, the lighting from the skybox by itself creates some dark and muddy areas where poor player visibility could occur in a real life setting, where the ambient light is coming from only one source (the moon). Since this isn't conductive to a good player experience, we're going to add some targetted ambient lighting to the scene to accent those shadowed areas, and make the scene more pleasant to look at. The other goal is to preserve player visibility, while maintaining a beleivable "night" atmosphere.
To do this, I added some targetted lights to the scene to create a sort of a penumbra effect. The lights were given a coloring that is a close variation of the skybox light's color with the slightly different color of the lights acting as the accent for the effect.
Below is a screenshot of the same area, with only the accent lighting and no skybox light. As you can see, the light is just bright enough to bring the darker features into relief, so the scene is more interesting to look at, but the overall lighting is still about as dark as in the previous shot:
Targetted light entity values:
spawnflags 2
_color 0.7411764705882352941176470588 0.831372549019607843137254902 1
light 400
Here's what it looks like in Radiant. The camera is at the same height as the targetted lights:
As you've probably noticed, the effect is a very subtle one. The idea is to make the targetted lights bright enough to to provide extra added depth to the scene, without destroying the primary lighting effects already present in the level.
The next screenshot will show the effect of combining the two lighting sources involved in the second and third screenshots above. As you can see, the scene now has some extra added depth, which makes the level appear dark to a proper extent (ie- the shadows on the ground still match whats going on in the sky) without creating dark muddy areas of poor player and scene visibility:
And now to add back the lighting we stripped out to do this exercise. As you may be noticing, adding any lights to a level does raise the overall lighting of the level up beyond what just the the skybox/targetted accent lighting provides by itself, but the two elements provide some depth and interest to the scene despite being subtle effects:
Hope the little show and tell was interesting to you guys in Radiant land =)
These can also be read at http://shminkyboy.blogspot.com
There's been quite a few attempts at making dark, playable scenes in game levels in the history of FPS games. Some come closer to others in creating 'dark' or 'night time' scenes that are believable to the player, while still offering a light level that allows the player to see other players and interact with the environment. Rendering engine constraints and the reality that "real" darkness makes things look drab and boring make creating a fun-to-play dark scene problematic.
During the course of updating Suburbs, I spoke with Bladekiller and TwentySeven a bit about lighting for maps in a darker setting, and we discussed how Bladekiller did some of the lighting in Tombs. I did some experimentation on my own with lighting to see if it would be possible to take those ideas and make Suburbs feel "darker" without sacrificing player visibility, and ended up with some pretty pleasing results. To demonstrate what I'm talking about we'll break down what we see in the updated levelshot:
As a little test bottle, I took a section of Suburbs and stripped all of the light entities out of it, and removed everything except for brushwork and the skybox itself.
Skybox shader:
textures/shmink/nightsky1
{
qer_editorimage textures/shmink/env/moonlight_sky_ft.tga
q3map_lightrgb 0.6823529411764705882352941176 0.8196078431372549019607843137 1
q3map_sunext 0.6823529411764705882352941176 0.8196078431372549019607843137 1 40 270 50 2 16
q3map_skylight 60 6
surfaceparm sky
surfaceparm noimpact
surfaceparm nolightmap
surfaceparm nodlight
skyparms textures/shmink/env/moonlight_sky - -
}
Remember that this is the actual light level of the skybox itself only, so it is going to be slightly darker than the levelshot above. This was the baseline I used to measure the effect of the targetted lights:
As you can see in the above screenshot, the lighting from the skybox by itself creates some dark and muddy areas where poor player visibility could occur in a real life setting, where the ambient light is coming from only one source (the moon). Since this isn't conductive to a good player experience, we're going to add some targetted ambient lighting to the scene to accent those shadowed areas, and make the scene more pleasant to look at. The other goal is to preserve player visibility, while maintaining a beleivable "night" atmosphere.
To do this, I added some targetted lights to the scene to create a sort of a penumbra effect. The lights were given a coloring that is a close variation of the skybox light's color with the slightly different color of the lights acting as the accent for the effect.
Below is a screenshot of the same area, with only the accent lighting and no skybox light. As you can see, the light is just bright enough to bring the darker features into relief, so the scene is more interesting to look at, but the overall lighting is still about as dark as in the previous shot:
Targetted light entity values:
spawnflags 2
_color 0.7411764705882352941176470588 0.831372549019607843137254902 1
light 400
Here's what it looks like in Radiant. The camera is at the same height as the targetted lights:
As you've probably noticed, the effect is a very subtle one. The idea is to make the targetted lights bright enough to to provide extra added depth to the scene, without destroying the primary lighting effects already present in the level.
The next screenshot will show the effect of combining the two lighting sources involved in the second and third screenshots above. As you can see, the scene now has some extra added depth, which makes the level appear dark to a proper extent (ie- the shadows on the ground still match whats going on in the sky) without creating dark muddy areas of poor player and scene visibility:
And now to add back the lighting we stripped out to do this exercise. As you may be noticing, adding any lights to a level does raise the overall lighting of the level up beyond what just the the skybox/targetted accent lighting provides by itself, but the two elements provide some depth and interest to the scene despite being subtle effects:
Hope the little show and tell was interesting to you guys in Radiant land =)
#2
Posted 05 August 2010 - 05:31 AM
That looks very realistic, I like the way the lights are placed quite low and give the impression of light being reflected off the road upwards.
Personally I'd love to read more of these, any tips/hints about using the new engine would help a lot.
Would you be able to include a screenshot from radiant showing where the light entities are.
Also - what q3map2 compile settings did you use for the "final"?
Personally I'd love to read more of these, any tips/hints about using the new engine would help a lot.
Would you be able to include a screenshot from radiant showing where the light entities are.
Also - what q3map2 compile settings did you use for the "final"?
This post has been edited by Johnnyenglish: 05 August 2010 - 07:44 AM
CUSTOM MAP MAKERS
www.custommapmakers.org
Discord (CMM) Custom Map Makers
www.custommapmakers.org
Discord (CMM) Custom Map Makers
#4
Posted 05 August 2010 - 06:35 PM
it would be cool if the Dev Team would code Direct Lightning... So that i could put a light emitting Shader on a func_bobbing and see the Light going up and down :>
Call me V | YouTube |Did you know FS is RECRUITING?
CUSTOM MAP MAKERS - www.custommapmakers.org - Discord (CMM) Custom Map Makers
CUSTOM MAP MAKERS - www.custommapmakers.org - Discord (CMM) Custom Map Makers
#5
Posted 06 August 2010 - 04:59 AM
Yeah full dynamic lighting would be nice wouldn't it heheh =)
I've updated the first post with a screenshot of what the light entitys look like in radiant.
My batch file:
"C:\Program Files (x86)\Quake III Arena\Q3Map2Build\q3map2_fs_20g.exe" -fs_basepath "C:\Program Files (x86)\Quake III Arena" -fs_game "q3ut4" -game "q3ut4" -meta "C:\Program Files (x86)\Quake III Arena\q3ut4\maps\ut4_suburbs.map"
"C:\Program Files (x86)\Quake III Arena\Q3Map2Build\FS_q3map_Radbump_4a.exe" -fs_basepath "C:\Program Files (x86)\Quake III Arena" -fs_game "q3ut4" -game "q3ut4" -vis "C:\Program Files (x86)\Quake III Arena\q3ut4\maps\ut4_suburbs.map"
"C:\Program Files (x86)\Quake III Arena\Q3Map2Build\FS_q3map_Radbump_4a.exe" -fs_basepath "C:\Program Files (x86)\Quake III Arena" -fs_game "q3ut4" -game "q3ut4" -light -exposure 250 -gamma 1.0 -compensate 0 -filter -patchshadows -samples 4 -fast -fastgrid -radbump "C:\Program Files (x86)\Quake III Arena\q3ut4\maps\ut4_suburbs.map"
Pause
"C:\Program Files (x86)\Quake III Arena\Radiant-1.4\bspc.exe" -bsp2aas "C:\Program Files (x86)\Quake III Arena\q3ut4\maps\ut4_suburbs.bsp" -forcesidesvisible -optimize -freetree -grapplereach
I've updated the first post with a screenshot of what the light entitys look like in radiant.
My batch file:
"C:\Program Files (x86)\Quake III Arena\Q3Map2Build\q3map2_fs_20g.exe" -fs_basepath "C:\Program Files (x86)\Quake III Arena" -fs_game "q3ut4" -game "q3ut4" -meta "C:\Program Files (x86)\Quake III Arena\q3ut4\maps\ut4_suburbs.map"
"C:\Program Files (x86)\Quake III Arena\Q3Map2Build\FS_q3map_Radbump_4a.exe" -fs_basepath "C:\Program Files (x86)\Quake III Arena" -fs_game "q3ut4" -game "q3ut4" -vis "C:\Program Files (x86)\Quake III Arena\q3ut4\maps\ut4_suburbs.map"
"C:\Program Files (x86)\Quake III Arena\Q3Map2Build\FS_q3map_Radbump_4a.exe" -fs_basepath "C:\Program Files (x86)\Quake III Arena" -fs_game "q3ut4" -game "q3ut4" -light -exposure 250 -gamma 1.0 -compensate 0 -filter -patchshadows -samples 4 -fast -fastgrid -radbump "C:\Program Files (x86)\Quake III Arena\q3ut4\maps\ut4_suburbs.map"
Pause
"C:\Program Files (x86)\Quake III Arena\Radiant-1.4\bspc.exe" -bsp2aas "C:\Program Files (x86)\Quake III Arena\q3ut4\maps\ut4_suburbs.bsp" -forcesidesvisible -optimize -freetree -grapplereach
Advertisement
#6
Posted 06 August 2010 - 06:47 AM
The lights are not how I expected at all, very interesting.
You use -fast in the final step, that's also interesting.
Really need to know why you added -grapplereach to the bot compile? Are there plans to implement batman hooks after all?
You use -fast in the final step, that's also interesting.
Really need to know why you added -grapplereach to the bot compile? Are there plans to implement batman hooks after all?
CUSTOM MAP MAKERS
www.custommapmakers.org
Discord (CMM) Custom Map Makers
www.custommapmakers.org
Discord (CMM) Custom Map Makers
#7
Posted 06 August 2010 - 10:25 AM
Johnnyenglish, on 06 August 2010 - 06:47 AM, said:
I like the way the lights are placed quite low and give the impression of light being reflected off the road upwards
Didn't see this comment before- That effect is actually the bumpmapping work that 27 has done with the engine interacting with my lighting. I'm suprised you noticed it in a still shot =)
Johnnyenglish, on 06 August 2010 - 06:47 AM, said:
The lights are not how I expected at all, very interesting.
You use -fast in the final step, that's also interesting.
Really need to know why you added -grapplereach to the bot compile? Are there plans to implement batman hooks after all?
You use -fast in the final step, that's also interesting.
Really need to know why you added -grapplereach to the bot compile? Are there plans to implement batman hooks after all?
yeah, I put the lights that high to help make the accents more effective for relatively large vertical areas more so than the horizonal ground surface ones, as I wanted to try not to disturb the existing shading of the ground itself.
-fast is being used because I like the effect it gives as opposed to using just -light without the -fast.
-grapplereach makes it so the bots have an easier time deciding what they can reach, Helpful for maps with a lot of verticality.
#8
Posted 06 August 2010 - 10:50 AM
Heh, for what is -exposure switch? I never saw this in any q3map manual
#10
Posted 06 August 2010 - 12:39 PM
Sorry for all the questions, just curious.
Is FS_q3map_Radbump_4a.exe much different to the bumpy_2 compiler from 27s "Enthusiastic mappers" thread?
Also, why use q3map2_fs_20g.exe for the meta stage? Are there any reasons for this?
I'm quite interested in that grapplesearch switch, noticed it but never thought to look what it did or how it might affect bots - I shall go quiet now while I look at code.
Is FS_q3map_Radbump_4a.exe much different to the bumpy_2 compiler from 27s "Enthusiastic mappers" thread?
Also, why use q3map2_fs_20g.exe for the meta stage? Are there any reasons for this?
I'm quite interested in that grapplesearch switch, noticed it but never thought to look what it did or how it might affect bots - I shall go quiet now while I look at code.
CUSTOM MAP MAKERS
www.custommapmakers.org
Discord (CMM) Custom Map Makers
www.custommapmakers.org
Discord (CMM) Custom Map Makers