Weird lighting results...

Skaruts

2010-01-01 14:01:46

So I made this dynamic light, that will slightly bouce when the window is opened. It works, I've tested that, and it all seems to be going well.
Image

But then, when I close this door, the light will still reach the corridor as if there's no walls or door.
(The map was compiled with the door closed, and the door frames are func_details, if this matters)

Image


Any ideas why this happens or any clues to a possible solution?
EDIT: This was made in OB Ep2 engine btw.

Sadist

2010-01-01 20:31:19

Double check all walls are aligned with no gaps. Then reduce inner and outer brightness angles in the light_dynamic entity to angles less than the direction of the wall. If this doesnt work then you will need to turn the func_detail to regular brushes as they tend to let light through (effectively func_details work differently to brushes when compiling vrad).

boshed

2010-01-01 23:04:40

Sadist wrote: If this doesnt work then you will need to turn the func_detail to regular brushes as they tend to let light through (effectively func_details work differently to brushes when compiling vrad).
True this, it's why you get light bleeding across world brushes behind them an stuff like that.

Ridiculously obvious suggestion: you've checked for leaks or other compile errors?

Skaruts

2010-01-01 23:50:03

I never test with leaks ;)

But the problem is, if I take out the func_details, I think the door will not block light either...
I remember testing that, but can't remember what I concluded from it. I'll try it.

EDIT: yes, the door still lets light go through...

Pig Popper

2010-01-07 00:33:00

I'm sure there is a use for the toolsblack texture here, i have across it in maps I have decompiled before where it as been positioned in a doorway or hallway.
Not sure what to tie it to to make it not appear in game, maybe func_wall /brush with a remove parameter of some sort. let us know if you go this route I've been to lazy to test it myself.

Skaruts

2010-01-07 10:08:19

hmm, I had never thought of that... will look into it. Thx.

I have actually found a way to work around this problem, Boshed help me out on the logics of it, by turning off the light whenever teh player is on the other side of the door and the door is fully closed. And then turn it back on whenever the door opens or the player is in the room again.

But this is hard to make it work for more than one light and door at the same time, and even despite that, it's too much time consuming and painful...
I realy would like to find a way to just block the light...

The Dog

2010-01-07 16:35:23

Skaruts wrote:I realy would like to find a way to just block the light...
tools/toolsblocklight? :)

Skaruts

2010-01-08 19:21:17

well, I've tried that, but not for long...

I don't know how it can work. The way I tried was making it a func_brush inside the door, parented (much like if it were an areaportal), but it doesn't block the light.
From what I read about it, it just isn't affected by light, but doesn't really block it.

If there's any other way of using it that works, I really don't know...

boshed

2010-01-08 21:51:20

afaik blocklight wont work when on entities, and also it's shadows are only calculated at compile time and baked into the lightmaps.

Skaruts

2010-03-28 14:09:46

Well, the blocklight works in a satisfatory way. But for that situation I'll probably go with boshed's on/off system, which allows the light to illuminate the corridor while the door is open.
As long as it's one light + 1 or 2 doors it's ok. More than that it gets a bit confusing and I have a hard time making it work.
:D

Thanks guys.
Cheers

PS: Just to point one thing out: Don't put blocklights adjacent to func_details. It erases the func_detail's face on the entire area where the blocklight's face is touching, making it look like a nodraw in game. Turning the func_detail into func_brush is one solution.