How to make light blocking door?


(mika_x) #1

Hello.
This is the screenshot of the problem.

I tried to put a small brush with the following shader inside the door/wall but does not work.

textures/lightblock/lightblock
{
	qer_editorimage textures/lightblock/lightblock.tga
	qer_trans 0.5
	surfaceparm nonsolid
	surfaceparm nomarks
	{
		map $whiteimage
		alphaFunc GT0
		alphaGen const 0
	}
}

The shader is from paZur’s website.


(Loffy) #2

I would try two things and maybe one of them would work (or both together):

  • Make the wall and the door thicker
  • Turn the floor into a func_group and give it “_lightmapscale” and a low value for example “0.125”
    There are probably other ways to fix this aswell. I would experiment and try differet things until it worked. Ultimately, if everything fails, I would put a lamp there, and a light entity, to show the player that there is a light on this side of the wall and that this is the reason why the floor is bright.

(FAQIS) #3

I agree with loffy here, a lamp at the other side or a tree that give a shadow at the brigher side of the door

Alpha shadows can be used also, that means that a nonsolid texture (and nonvisible) makes a shadow with an alpha layer created in the tga via photoshop

Another idea is to make an open door from the beginning?

Edit: hehe oops didnt look at screenshot…

Try to make lower phong at the floor, its not the door that leaks its the wall.

Another thing, dont make multiple rooms with the same floor, put caulk under the walls :slight_smile:


(mika_x) #4

[QUOTE=Loffy;505222]I would try two things and maybe one of them would work (or both together):

  • Make the wall and the door thicker
  • Turn the floor into a func_group and give it “_lightmapscale” and a low value for example “0.125”
    There are probably other ways to fix this aswell. I would experiment and try differet things until it worked. Ultimately, if everything fails, I would put a lamp there, and a light entity, to show the player that there is a light on this side of the wall and that this is the reason why the floor is bright.[/QUOTE]

Thanks :slight_smile:
the “_lightmapscale” method worked.
But I have another concern is that if it makes the compile time longer?
Because I use “_lightmapscale 3” in worldspawn entity.

[QUOTE=FAQIS;505223]I agree with loffy here, a lamp at the other side or a tree that give a shadow at the brigher side of the door

Alpha shadows can be used also, that means that a nonsolid texture (and nonvisible) makes a shadow with an alpha layer created in the tga via photoshop

Another idea is to make an open door from the beginning?

Edit: hehe oops didnt look at screenshot…

Try to make lower phong at the floor, its not the door that leaks its the wall.

Another thing, dont make multiple rooms with the same floor, put caulk under the walls :)[/QUOTE]

Thanks.
putting caulk under the wall worked too.
Also not sure what your mean by making lower phone at the floor?


(Loffy) #5

You can have worldspawn _lightmapscale 3 and only a small part (or parts) of you map _lightmapscale 0.125. The tric is to turn that small part into a so called func_group. It will not make your compile significantly longer.


(Mateos) #6

Better use a power-of-2 value, the code doesn’t like the rest usually on this engine :confused:


(twt_thunder) #7

or just do grid 1,select wall and drag it one down…