Please or Register to create posts and topics.

Hammer Lighting Questions

Page 1 of 2Next

Hey! I'm new to these forums, and had a question about lighting in Hammer. Hammer is something I'll still fairly unskilled at, but despite reading through the official wiki pages on valve's site, I haven't been able to figure out how to light testchambers successfully.

What I would like is to be able to have a destroyed-aperture themed room with holes in the ceiling, some debris over the holes, perhaps casting bright light and crisp shadows from the props of the debris into the room. With a light_environment set with an angle down toward the ground, a light_spot up above the hole in the roof of the room, a shadow_control set to try and make shadows as dark as possible, and an env_sun, I still can't get the lighting to work properly with all the things I've tried.

I'm curious to hear the "correct" way to light testchambers to have bright light and distinct shadows cast down into a room from things on the ceiling. What works, what do you do when mapping to get the lighting to work correctly to cast distinct beams and shadows?

Thanks in advance!

I'd love to know that as well :P

Never use Logic to solve a puzzle, he's an idiot...

For your case u need to use a env_projectedtexture
Be careful though it is expensive to render and only one can be active at a time(the limit can be changed in a mod).Be sure to switch it on when the player enters the room and turn it back off when the player leaves the room.

Hope is a good thing
Maps made : [SP] PORTAL 2 : After Math
Steam ID : chimera201

Hm.. I should probably make a tutorial video on the proper use of lighting in Hammer. I see too many people just content to use instanced lighting or uniform lighting...

There's 2 ways you can accomplish what you're trying. Both are expensive, but result in 2 different outcomes.

Way #1:
First, remember that if you want to use the light_environment technique, the origin point of your lighting will be the skybox texture. Also, this lighting generates linearly, which is to say there will be no 'origin' point of the lighting, it just draws straight lines from everywhere the skybox is projecting at the angle that has been determined.
Once you've messed with this and are happy with the 'angle' that the lighting is coming from, start messing with the light colors and shadow colors, until it approximates what you want it to look like. At this point, the lighting will still look like complete shit (which I assume is your problem, and not the lighting not functioning at all), but it's fine, it's just how it works.
The next important step is the lightmap. Select the faces of ONLY the brushes that the light will be projected onto, and change the lightmap down to something like 4 or even 2. The option is in the texture properties (Shift + A). Default is 16, which means the editor compiles one unit of lighting for every 16 units of brush (which causes that globby horrible lighting you're probably seeing). Taking it down to 2 means that you will have 1 unit of lighting every 2 units, which will show much more 'fine' shadows and details per unit.
WARNING: This can dramatically increase your compile times, depending on how good your CPU is, how much detail is being projected, and how many brushes are set to lower lightmaps. The upshot is, this will not affect in-game performance, so that's what you have to weigh vs. the next technique I will discuss:

Way #2:
The env_projectedtexture technique. This light DOES have a point of origin, where all the projections of shadows originate, and will radiate out in a 'cone' shape. This makes it a lot harder to use as a believable "sky" light, but the shadows will be MUCH nicer, and will be 100% dynamic (any and all models and moving objects will cast shadows when in this light)
Things to note:
-Lightmap does NOT affect the detail level of these shadows (they are calculated while in game)
-The downside to this is, it WILL affect in-game performance (this is why there is a limitation on only having 1 per scene)
- shadow_control does nothing to the color and starkness of these shadows, they are controlled by the entity itself (this only matters if you wanted to achieve a very specific look, like a blue-ish shadow falloff, but that's really advanced, and most people won't notice anyway)
- You will probably have to supplement this with static lighting, as the brightness of the env_projectedtexture is pretty low even if you crank it up. This usually means, a very bright light_spot behind it, and a some static lights on the surfaces that the texture is projected to..

When compiling:
Even with your lightmaps set really low, and all your lighting perfectly set-up, it will still look like shit if you're doing 'fast' compiles (the default one). You want to set it up so your models are casting shadows, and you're doing 'long' calculations so they look smoother. This is particularly important for Way #1.
Go to the expert compile options and add these parameters: -final -textureshadows -ldr -StaticPropLighting -StaticPropPolys
Again, obvious warning, but this will take a LOOOONG time if your computer sucks.

Hopefully that helps, if not, post some screenshots of the problem and we can work down from there.

Hey, thanks so much. I'll tr those techniques and check back if I have an issue. :)

Hi there,

I'm trying to figure out the env_projectedtexture to make a dynamic shadow on some moving panels (just your average func_brushes parented to prop_dynamics).
But. Whatever settings I use on the env_projectedtexture my panels won't cast dynamic shadows...

This guy says you need a some parameter but he won't tell becouse he's mean... :(
http://www.youtube.com/watch?v=tTq-hRyx ... re=related
His shadows look awesome though.

Hope somebody here can help me!
Thanks in advance,
MWP

MWP wrote:
This guy says you need a some parameter but he won't tell becouse he's mean... :(

By default, the env_projected_texture has the parameter "Enable shadows" set to "NO", check out that and set it to "yes" :D

ImageImageImageImageImageuseful tools and stuff here on TWP :thumbup:
[spoiler]ImageImageImageImageImage[/spoiler]

Did that (luckily) but no shadows casted...

Oh, and thanks for the reply! <3

Well then, maybe you set to YES the Disable shadows or Disable Flashlight parameters into those props or func_brushes...

Would you mind to let us know what Brightness scale and what Light colour values did you put to the env_proj_tex?

ImageImageImageImageImageuseful tools and stuff here on TWP :thumbup:
[spoiler]ImageImageImageImageImage[/spoiler]

Don't forget to turn on "Always Update (moving light)" on the "flags" tab. If I remember correctly, it doesn't draw shadows at all if this is off. (Might be a bug.)

Sendificate series: Sendificate | A Beam Too Far | Airtime | 302
Other Portal 2 maps: Medusa Glare
Portal 1 maps: Try Anything Twice | Manic Mechanic
Page 1 of 2Next