Light looks terrible

  • If you're asking a question make sure to set the thread type to be a question!

Aes`inv

L1: Registered
Oct 28, 2008
12
0
So I'm working on a spawn room for my first TF2 map, and I'm trying to add a really, i dunno how to describe it but hopefully you can tell when you see the screenies. But anyway, when I compile it and go in-game, my light_spot's look TERRIBLE. I have no idea why they are coming out this bad, they have the default settings except for inner and outer angle and the color. I've been mapping ever since 1.5 and the only time this has happened was back then xD. I haven't seen anything like this happen on any of my maps for CS:S.

my.php

lights2fz4.jpg


Now this is what it looks like in Hammer in the Lighting Preview mode, which I'm sure isn't super reliable but since I just want simple lights and they look so bad in-game, i would be thrilled if they looked like this haha.

hammerqa1.jpg


Is it the absence of cubemaps in there? Or does Hammer just hate me like it usually does? :[
 

l3eeron

L8: Fancy Shmancy Member
Jan 4, 2008
593
88
I believe It's your scaling of the lightmaps for the walls. I think the default is 16... try 8. Lower numbers will cast finer shadows and lighting.


refer to this

http://developer.valvesoftware.com/wiki/Lightmap


...I could be way off though.


PS welcome!


edit: if you are going to use a spot light, use a different prop for the light itself. Those props dont look good with spot light. Just my opinion.
 
Last edited:

Aes`inv

L1: Registered
Oct 28, 2008
12
0
I tried changing the lightmap scale and it didn't do anything, but thanks! I'm going to try putting a cubemap in and see what it does.. hopefully that will fix it.

and do you have any suggestions for some good models then? I wanna go for a control room type feel where it isn't like one big light giving the room its light it's a bunch of little ones. i would use the floor lights from 2fort but i'm using those on the floor and don't know if i should use them on both the floor and the wall.

EDIT: I added a cubemap, didn't do anything. Anyone else have any idea what might be causing this?
 
Last edited:

grazr

Old Man Mutant Ninja Turtle
aa
Mar 4, 2008
5,441
3,814
Funnily enough it's those stairs, make them func_detail. When they remain as standard geometry they break up visleafs and cut into brush faces. That wall, is cut horizontally at every top and bottom plane of each step.

What happens is a lightmap is created over your texture face, and gradiants of shadow are created to smooth lighting across the whole face. When the face is cut like that, it creates multiple faces to one brush face around the conjoined brushes. The light is then unable to predict and "gradiant" across the whole face as one, and works out each smaller face seperately. So you have those sudden changes in shadow density that you have on the right there.

This often causes a lot of lighting bugs for overlapping displacements. Not pretty..

Increasing your lightmap scale as leeron said should also increase the quality of your lights.

But sort that out first ;)

edit* Also, compiling on "full/standard" will give you better lighting results. If you havn't already.

edit2* P.S. that lighting prediction is more than likely a prediction of a lightmap scaled to "1". Try 8 or 4 if you must. But 16 should be fine.
 
Last edited:

Aes`inv

L1: Registered
Oct 28, 2008
12
0
Thanks! Now should I make the entire staircase a func_detail? Or should i do the stairs and then the stair support? I made the entire staircase one and it didn't do anything :[
 

Aes`inv

L1: Registered
Oct 28, 2008
12
0
so I did another test and deleted the stairs entirely, as grazr noted it was screwing with it, and the lights still look like complete crap. Could it possibly just be a problem with my compiler or something? This is really stumping me. The corners are also rounded, so should i make those func_detail and just see what happens?
 

l3eeron

L8: Fancy Shmancy Member
Jan 4, 2008
593
88
You might be trying to achieve an effect that the light_spot can't do. In all of valve's fancy spot lights there's an other entity, an env_glow or something (I forget). That might give you the result you're looking for.

Pick a light that you like in one of valve's maps. Open up the decompiled version (DL them Here) and check it out for yourself, then recreate (or cheat and copy/paste) the lighting system that works for you.
 

grazr

Old Man Mutant Ninja Turtle
aa
Mar 4, 2008
5,441
3,814
You are compiling with normal settings right? and not fast? Fast compiles look like what you have shown us in your screenshot.

Try skewing the lights so they face a little bit away from the wall. Downwards like they are but a little into/towards the inside of the room.

Turn your prop shadows off if they are on, and turn off their collision under "vphysics". Sometimes collision meshes give funny lighting results if the light resides inside the props frame.

These lights seem a bit odd to me because there should be a small amount of excess light, similar to a standard light with low settings. So that the area around the light origin is lit more and is "more realistic". I can't see this in your screenshots.

Your light props are also not illuminated which draws me to that same conclusion that it may be the lights residing within the props frame causing you some hassle.

Try that and let us know what happens.

You shouldn't need to turn the corners into func_details.

Edit* P.S. env_glow is a screen based effect. It doesn't effect lighting on a textured face. It's like a fancy sprite and shines bloom in your face when you stair directly at it. Similar to HDR effects, but manually controlled per light source.
 
Last edited:

Brandished

L5: Dapper Member
Jan 19, 2008
234
311
Now this is what it looks like in Hammer in the Lighting Preview mode, which I'm sure isn't super reliable but since I just want simple lights and they look so bad in-game, i would be thrilled if they looked like this haha.

hammerqa1.jpg
[

Wow, it's been a while since I tried out the preview mode, but that almost looks usable now. Last time I tried it the preview wouldn't even work most of the time and when it did it was usually way off. The super outdated graphics drivers I was using the last time might have had something to do with it as well.
 

Spike

L10: Glamorous Member
Feb 13, 2008
716
82
Does lighting preview render light_enviroment?
 

Brandished

L5: Dapper Member
Jan 19, 2008
234
311
Does lighting preview render light_enviroment?

I'm not sure, if it does, not very well:

3dpreviewhf6.jpg



3d Ray-traced on the other hand....

3draytracedko5.jpg



If you don't mind waiting the 1 or 2 minutes it takes to create the preview window (this was just for basic lighting). The long wait kinda making using it pointless, since it's faster to just compile the map and open it in-game. The raytraced mode doesn't update well to reflect lighting changes either. :/
 
Last edited:

FaTony

Banned
Mar 25, 2008
901
160
So I'm working on a spawn room for my first TF2 map, and I'm trying to add a really, i dunno how to describe it but hopefully you can tell when you see the screenies. But anyway, when I compile it and go in-game, my light_spot's look TERRIBLE. I have no idea why they are coming out this bad, they have the default settings except for inner and outer angle and the color. I've been mapping ever since 1.5 and the only time this has happened was back then xD. I haven't seen anything like this happen on any of my maps for CS:S.


Now this is what it looks like in Hammer in the Lighting Preview mode, which I'm sure isn't super reliable but since I just want simple lights and they look so bad in-game, i would be thrilled if they looked like this haha.

Is it the absence of cubemaps in there? Or does Hammer just hate me like it usually does? :[

Ok, let's fix this bad lighting.

1st - color. Make initial RGB far more brighter. So it should be very light blue.
2nd - brightness. Make it at least 500.
3rd - angles. 60/80 should work great.
4th - CLQ. I suggest to start with 0 linear 1 constant 1 quadratic.
5th - Pitch>>Pitch Yaw Roll. Leave Pitch to -90 while making PYR pitch a 0.
6th - leaks. Ensure that your map DOES NOT have any leaks. That's very important.
7th - compiling. BSP - normal. VIS - normal. RAD - normal. Don't run game after compiling.

Post a screenshot after all those tweaks plz.
 

Aes`inv

L1: Registered
Oct 28, 2008
12
0
I'll make those tweaks as soon as i get home. I'm waiting for my c programming class to start atm xD

@Brandished, yeah the lighting preview isn't really the best in my opinion, it only works if I angle the camera a certain way, etc... It's pretty annoying haha.

@grazr, I was compiling with normal settings to get a basic feel for what it would look like. And like I said I will definitely try those right when I get home.

And thank you to all of you for helping :D
I'll post a new screenie with those tweaks completed in about and hour or two.

*EDIT* I did all of the tweaks Fatony said to try and it's still doing it :|
here are some screenies.

bridgelights1rx8.jpg

bridgelights2pu2.jpg


and here is something I just noticed, if I go on the stairs in the corners of the room the wall goes dark. You can see in this screenie:
bridgelights3aq8.jpg


And here is what it looks like in the Ray-traced preview.. looks fine :|
lightrayrenderxm5.jpg
 
Last edited:

YM

LVL100 YM
aa
Dec 5, 2007
7,135
6,056
The two shadows in either corner look like dynamic shadows cast by a prop_dynamic in the room above, if you've got a dynamic prop up there it would be best to set "disable shadows" to "yes"
 

Aes`inv

L1: Registered
Oct 28, 2008
12
0
@FaTony I'll post a .vmf as soon as I can, atm Source SDK continues to say Game not available at this time so once it's available again I'll cut the room out and put it up here.

@Youme That's what I thought at first too, but i dont have any props in the room above it :|

Hammer seriously hates me ahaha