Light blocking transparent shader?

Discussion for Level editing, modeling, programming, or any of the other technical aspects of Quake
Post Reply
Jusser
Posts: 40
Joined: Sun Sep 28, 2008 5:52 pm

Light blocking transparent shader?

Post by Jusser »

Just a little question. Is it possible to make a shader which is transparent and blocking light?
If so, how? :p

Thanks.
[color=#FF0000]don't you ever get stuck in the sky?
soad! well done![/color]
User avatar
Hipshot
Posts: 1547
Joined: Sun Jan 20, 2002 8:00 am

Re: Light blocking transparent shader?

Post by Hipshot »

Remove surfaceparm trans.
Q3Map2 2516 -> http://www.zfight.com/misc/files/q3/q3map_2.5.16_win32_x86.zip
Q3Map2 FS_20g -> http://www.zfight.com/misc/files/q3/q3map2_fs_20g.rar
GtkRadiant 140 -> http://www.zfight.com/misc/files/q3/GtkRadiantSetup-1.4.0-Q3RTCWET.exe
Jusser
Posts: 40
Joined: Sun Sep 28, 2008 5:52 pm

Re: Light blocking transparent shader?

Post by Jusser »

Then it'll be something like caulk is.
So I have the Surface parameters:
No Draw and Nonsolid which will cause a caulk like texture.

I want to have something in the brush (Like nodraw, which is trans), so I think it needs the surfaceparm trans, doesn't it?
But, then it doesn't block light. Does anybody knows how to do this?

Edit:
By 'Caulk' I mean this:
Image
[color=#FF0000]don't you ever get stuck in the sky?
soad! well done![/color]
obsidian
Posts: 10970
Joined: Mon Feb 04, 2002 8:00 am

Re: Light blocking transparent shader?

Post by obsidian »

"Hall of Mirrors" or HoM is the effect you get when there is nothing in the framebuffer to display, so it displays the last known pixels, hence the swirlyness.

Caulk actually is light-blocking, invisible and solid. You shouldn't get HoM as long as there is a surface behind the caulk and everything is in the same PVS (potential viewable set). So caulk is the right answer.

Realistically, why would you have something invisible that casts shadows? Transparent or alpha-tested images would use surfaceparm lightfilter and/or alphashadow.
[size=85][url=http://gtkradiant.com]GtkRadiant[/url] | [url=http://q3map2.robotrenegade.com]Q3Map2[/url] | [url=http://q3map2.robotrenegade.com/docs/shader_manual/]Shader Manual[/url][/size]
Jusser
Posts: 40
Joined: Sun Sep 28, 2008 5:52 pm

Re: Light blocking transparent shader?

Post by Jusser »

obsidian wrote:Realistically, why would you have something invisible that casts shadows?
Cause there's a door which doesn't block the light. By the way, is this fixable?

Anyways, if I make a surface behind the caulk, it should be normal? Will the door (which is in or between the brush(es) be visible? (I'll try.)

One last question. What does alphashadow do exactly?
[color=#FF0000]don't you ever get stuck in the sky?
soad! well done![/color]
obsidian
Posts: 10970
Joined: Mon Feb 04, 2002 8:00 am

Re: Light blocking transparent shader?

Post by obsidian »

Alphashadow:
http://robotrenegade.com/q3map2/docs/sh ... lphashadow

Lightmaps are static, so there won't be a direct way to fix your door lighting issue, it will either be rendered as if the door is open, or you might be able to hack it to render as if it were closed (though there would be an obvious shadow line when the door is in the open position). Generally, it's easiest to just make sure that lighting on both sides of the door are approximately the same in intensity so you don't have odd looking shadows in the first place.
[size=85][url=http://gtkradiant.com]GtkRadiant[/url] | [url=http://q3map2.robotrenegade.com]Q3Map2[/url] | [url=http://q3map2.robotrenegade.com/docs/shader_manual/]Shader Manual[/url][/size]
Post Reply