Urban Terror Forums: Scene lighting experiments - Urban Terror Forums

Jump to content

 Login | Register 
Advertisement
  • (3 Pages)
  • +
  • 1
  • 2
  • 3
  • You cannot start a new topic
  • You cannot reply to this topic

Scene lighting experiments Rate Topic: ***** 1 Votes

The first of a series of tutorial essays on mapping exploits

#1 User is offline   Shminkyboy Icon

  •   former FS member   
    Mapper
  • Account: shminkyboy
  • Country:
  • Joined: 31-July 09
  • Posts: 744

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:

Posted Image


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:

Posted Image


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


Posted Image

Here's what it looks like in Radiant. The camera is at the same height as the targetted lights:

Posted Image

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:

Posted Image


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:

Posted Image


Hope the little show and tell was interesting to you guys in Radiant land =)



#3 User is offline   Drezil Icon

  • Account: drezil
  • Country:
  • Joined: 28-February 10
  • Posts: 330

Posted 05 August 2010 - 07:38 AM

now we just need dynamic lightmaps on player models :D otherwise we'd just have a fullbright player-model in a dark dark world.


#5 User is offline   Shminkyboy Icon

  •   former FS member   
    Mapper
  • Account: shminkyboy
  • Country:
  • Joined: 31-July 09
  • Posts: 744

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

bullet_loaderAdvertisement

#7 User is offline   Shminkyboy Icon

  •   former FS member   
    Mapper
  • Account: shminkyboy
  • Country:
  • Joined: 31-July 09
  • Posts: 744

Posted 06 August 2010 - 10:25 AM

View PostJohnnyenglish, 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 =)



View PostJohnnyenglish, 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?


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 User is offline   ValkoVer Icon

  •   mapper   
  • Account: valkover
  • Country:
  • Joined: 28-February 10
  • Posts: 645

Posted 06 August 2010 - 10:50 AM

Heh, for what is -exposure switch? :blink: I never saw this in any q3map manual

#9 User is offline   Shminkyboy Icon

  •   former FS member   
    Mapper
  • Account: shminkyboy
  • Country:
  • Joined: 31-July 09
  • Posts: 744

Posted 06 August 2010 - 11:25 AM

-exposure n is comparable to an exposure setting on a camera; 250 = neutral, adjust up or down to brighten or darken the scene to taste

i think one of the upcoming installments of the exploits will touch on some of the new goodies


  • (3 Pages)
  • +
  • 1
  • 2
  • 3
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users

Sponsored link
https://www.frozensand.com/


Copyright © 1999-2024 Frozensand Games Limited  |  All rights reserved  |  Urban Terror™ and FrozenSand™ are trademarks of Frozensand Games Limited

Frozensand Games is a Limited company registered in England and Wales. Company Reg No: 10343942