Human model dissapearing trough glass

If you're looking for mapping help or you reckon you're a mapping guru, post your questions / solutions here

Moderator: Moderators

Post Reply
ABit
Lance Corporal
Posts: 18
Joined: Sat Jul 05, 2003 10:35 pm

Human model dissapearing trough glass

Post by ABit »

Hi guys, another glass problem.

I tested almost every shader alternative i could find, but always get the same results, i hope some of the .Map guru's can help me....

when ingame one player stands on one side of a glass window in my selfmade map and another player stands on the opposite side of the window, if one of them walks away from the window, he dissapears at a distance of about 500 radiant units. Everything else walls, street, bushes remain visible, only the human model dissapears. You can even shoot the invisable player.

What could be the reason of only the model dissapearing? I thought it could be something like sortingrules in the shader, but dont understand all of that stuff. Please help?
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

shader

Post by tltrude »

Post the text of the shader that is doing it.

Here is one that Wacko made. It gives an error in the console, as do all MOHAA window shaders, but it works. You would need his two images to use it, but you can substitute them with your own images.

Code: Select all

textures/custom/glas
{
	qer_editorimage textures/glas/glas_rad.tga
	qer_keyword window
	qer_keyword glass
	qer_trans .4
	surfaceparm glass
	cull none
	{
		map textures/mohcommon/envnormndy_day.tga
		tcgen environment
		alphagen const .2
		blendFunc blend
	}
	{
		map textures/glas/glas.tga
		depthWrite
		alphaFunc GE128
	nextbundle
		map $lightmap
	}
}
"envnormndy_day.tga" is the reflection and it too can be changed.
Tom Trude,

Image
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Do you have any vis_leafgroups in your map?

Did you use the common/nodraw texture on redundant surfaces of the glass brush?
Image
ABit
Lance Corporal
Posts: 18
Joined: Sat Jul 05, 2003 10:35 pm

Post by ABit »

Tltrude

I use almost the same shader, there are three differences;

i have surfaceparm trans added,
i dont use culled none
the depthWrite is after the alphaFunc GE128

i skipped the evironment part as i thought that could be the problem

for most windows i use this shader:
textures/Loopbrug/raamnopanel_frame
{
qer_keyword myown
qer_keyword broken
qer_keyword window
qer_keyword glass
surfaceparm glass
surfaceparm trans
// cull none
nopicmip
qer_editorimage textures/Loopbrug/raamnopanel_frame.tga
{
map textures/Loopbrug/raamnopanel_frame.tga
alphaFunc GE128
depthWrite
nextbundle
map $lightmap
}
}
JV_Map
I didnt use vis_leafgroups yet, i am not sure where to use them because most of the outer walls is glass. (look at the projects screenshots at http://www.destructor-clan.tk)
I tried caulk and glass textures as base for the brushes, i am not aware of using nodraw for my windows
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

cull

Post by tltrude »

I found this:
-----------------------------------------------------------------------------------
3.2.1 cull front
The front or "outside" of the polygon is not drawn in the world. This is the default value. It is used if the keyword "cull" appears in the content instructions without a <side> value or if the keyword cull does not appear at all in the shader.
-----------------------------------------------------------------------------------

So, only the two inside surfaces of your glass brushes are being drawn--inside the brush, not inside the room. If you put cull none, all four surfaces are drawn--probably makes the glass darker. Cull back will look the same as cull front, but the image will be flipped left and right.

Adding common/nodraw to all but one face may fix your problem, but also try it with "cull none" and nodraw.
Tom Trude,

Image
ABit
Lance Corporal
Posts: 18
Joined: Sat Jul 05, 2003 10:35 pm

Post by ABit »

tltrude

In the link above, on the fourth screenshot, you look through a glassfence. Its a masked texture (with greyscale alpha) on a nodraw brush. It has the same problem the windows have, dissapearing human models. It uses this shader
textures/Loopbrug/glashekje
{
qer_editorimage textures/Loopbrug/glashekje.tga
qer_keyword myown
qer_keyword fence
surfaceparm glass
surfaceparm trans
cull none
{
map textures/Loopbrug/glashekje.tga
blendFunc blend
}
{
map $lightmap
rgbGen identity
blendFunc GL_DST_COLOR GL_ZERO
}
}
it looks like this 'window' texture has all the mentioned futures, but also has the same problem. The fact that the dissapearing always is at about 500 units, worries me. Has it something to do with Vis? I compiled my map with full vis/final lighting (21 hrs). All static (precompiled) brushes stay visable, only dynamic rendering (player model) is dissapearing.[/quote]
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

try this

Post by tltrude »

Just as a test, try using "cull back" on that window with the nodraw. Also, try using Wacko's shader, with your textures. I think it is just a standard window shader.

I have seen problem with looking through two window brushes at the same time. Could it be a game setting you changed?
Tom Trude,

Image
ABit
Lance Corporal
Posts: 18
Joined: Sat Jul 05, 2003 10:35 pm

Post by ABit »

I will setup a testmap, with all my windowtextures and different shader options. do a test with one of my buddies. Will take a day or two so i'll be back on you. thanx so far
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

Nodraw

Post by tltrude »

never mind trying "cull back" or "cull front" with nodraw--makes one side invisable.
Tom Trude,

Image
Post Reply