Page 1 of 1
Human model dissapearing trough glass
Posted: Sat Feb 14, 2004 6:29 pm
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?
shader
Posted: Sat Feb 14, 2004 9:14 pm
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.
Posted: Sun Feb 15, 2004 7:58 am
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?
Posted: Sun Feb 15, 2004 9:36 am
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
cull
Posted: Sun Feb 15, 2004 11:21 am
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.
Posted: Sun Feb 15, 2004 11:48 am
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]
try this
Posted: Sun Feb 15, 2004 12:00 pm
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?
Posted: Sun Feb 15, 2004 12:33 pm
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
Nodraw
Posted: Sun Feb 15, 2004 12:37 pm
by tltrude
never mind trying "cull back" or "cull front" with nodraw--makes one side invisable.