Lighting through a doorway Created 17 years ago2006-12-24 22:13:52 UTC by Azoth72 Azoth72

Created 17 years ago2006-12-24 22:13:52 UTC by Azoth72 Azoth72

Posted 17 years ago2006-12-24 22:13:52 UTC Post #207447
I don't know if this is possible, but I have two rooms connected with a door (obviously). There is a flickering light in the first room and a sun beam coming through the window in the second room. The sun beam is supposed to light up the second room, but the flickering light is coming through the doorway from the first room and lighting up the second room. Is there anyway I can keep the light from coming into the second room? I've tried parenting a block light brush to the doorway and it helps a little, but still doesn't work completely.
(I would post an image, but I have no idea how to and the help doesn't help much.)

(Seriously, I don't get it.)
Posted 17 years ago2006-12-24 22:18:07 UTC Post #207449
Try the BlockLight texture.
Posted 17 years ago2006-12-24 22:43:33 UTC Post #207452
I did. "I've tried parenting a block light brush to the doorway and it helps a little, but still doesn't work completely."
Posted 17 years ago2006-12-25 00:27:13 UTC Post #207454
Sorry. : Missed that. Why do you parent the block light to the doorway?

Also, is the "sun beam" really a volumetric light, or are you shadowing light from an light_environment cast from the skybox?
Posted 17 years ago2006-12-25 15:17:05 UTC Post #207492
I'll try to be more specific. One room has a window with a light_spot behind the window that is aimed through the window into the room. I want this light to light up the room as much as possible. However, on the other side of a prop_door_rotating I have a flickering light and the light is going straight through the door, even though the door is closed. The flickering light then lights up the room it isn't supposed to.
When I said I parented a block light texture to the doorway, I meant that I made the block light texture follow the prop_door_rotating, so when it was closed it would block the light.
Posted 17 years ago2006-12-25 15:57:00 UTC Post #207495
Posted 17 years ago2006-12-25 15:57:13 UTC Post #207496
You can't make a Block_light-brush and use it as an entity.
The RAD process is the one that makes the light calculations. If it finds a brush with that texture, it will act as if a wall was in the doorway.
You can't alter the lighting in-game. That is called dynamic lighting, and is not a commonly used feauture of the Source engine. We will have to wait for updates if we want to see the kind of effect you are talking about.
Posted 17 years ago2006-12-25 16:12:27 UTC Post #207502
^ What he said.

The game renders light as if all brush-based entities and prop_physics/dynamic were never there. This way, when the door opens, it will continue to look natural, rather than having a solid line of shadow appearing out of nowhere and remaining there even after the door has opened. However, as you are experiencing, this lighting system is not flawless.
Posted 17 years ago2006-12-25 16:15:19 UTC Post #207503
Alright, thanks for helping.
Posted 17 years ago2006-12-25 17:53:49 UTC Post #207512
Simply put a BlockLight brush in the doorway. Don't parent it or tie it to any entity. That will prevent the flickering light from appearing in the second room.

As Kasp said, during the game, the light from one room won't affect the light in the other.
Posted 17 years ago2006-12-25 19:37:42 UTC Post #207521
@RotatorSplint: the HL compile tools ignored entities during lighting, but the HL2 tools do take entities into account.

What happens is that a so-called lightmap is created at compile-time. This lightmap is a sort of colored overlay, so the game world appears to be lit. This lightmap does not change after the map is compiled. Prop models do cast a shadow, but that's all they do: the lightmaps don't change anymore after the map is compiled.
There's a way to fake your desired effect, and that's by triggering a light entity when the door opens. What happens in that case, is that there are multiple lightmap versions generated beforehand: one set for that light entity being on, and one set for it being off. You'll understand that having many such lights results in a lot of lightmap versions, so this behaviour is limited in the compile tools.
Posted 17 years ago2006-12-25 21:47:13 UTC Post #207529
The game renders light as if all brush-based entities and prop_physics/dynamic were never there
the HL compile tools ignored entities during lighting, but the HL2 tools do take entities into account
Yeah, that's what I meant (sorry if I wasn't clear). I know that prop_statics are taken into account when rendering light, but not dynamic and physics props (in the Source engine, of course). I don't know if HL1 takes static_props into account. Basicly, what I was saying is that lighting is determined by world geometry (and static props if HL1 takes em into account ;) )

However, regardless of this, the light will render through the door unless he uses the blocklight texture :D

EDIT: wait a tick: isn't this Source?
You must be logged in to post a response.