Page 1 of 1

broken windows make things invisible?!

Posted: Wed Sep 17, 2003 10:21 pm
by wacko
I've made a shader for a broken version of window32_frame. I know, there is one, but I wanted to have the wooden parts broken aswell, because jumping through a unbroken window frame is crap...

Here's the shader:
textures/window/window33_broken
{
qer_editorimage textures/general_structure/window32_frame.tga
qer_keyword broken
qer_keyword window
qer_keyword glass
surfaceparm fence
surfaceparm wood
// cull none
{
map textures/mohcommon/envnormndy_day.tga
tcgen environment
alphagen const .2
blendFunc blend
alphaFunc GT0
nextbundle
map textures/window/window33_broken.tga
}
{
map textures/window/window33_frame.tga
blendFunc blend
depthWrite
// alphaFunc GE128
nextbundle
map $lightmap
}
}
Now, when I look through the unshot window (with texture window32_frame) it looks like this:
Image
U hopefully see the window of the next building?! Okay, now when I shoot at this window, it breaks and the script object of the broken version appears (with texture window33_broken). And now it looks like this:
Image
That window of the next building has turned invisible (No, I didn't even shoot at it)
Here is the pk3 of my shader, maybe it's of help for solving the problem.
Does anyone know, why this happens?

Thanks for wasting your time!

P.S. If u don't mind this prob, you can ofcourse use that shader in your map. In fact normal brushes are still visible, it's just other windows :roll:

Posted: Wed Sep 17, 2003 10:36 pm
by rOger
Could it be that you are using the same target name or something. just my first guess, I have not looked at the shader or anything.

broken

Posted: Wed Sep 17, 2003 11:59 pm
by tltrude
There is nothing that says your broken window can't be made of more than one brush. Just make a hole where you don't want the wood parts to show up. Then, make all the brushes one script object with a targetname. The tricky part is getting the textures lined up the same for both windows.

Posted: Thu Sep 18, 2003 1:41 am
by crunch
Leave everything else as it is, but use this shader:

textures/window/window33_broken
{
qer_editorimage textures/general_structure/window32_frame.tga
qer_keyword broken
qer_keyword window
qer_keyword glass
surfaceparm trans
surfaceparm nonsolid
cull none
{
map textures/window/window33_broken.tga
blendFunc blend
depthWrite
alphaFunc GE128
nextbundle
map $lightmap
}
{
map textures/window/window33_frame.tga
blendFunc blend
depthWrite
alphaFunc GE128
nextbundle
map $lightmap
}
}


You'll be good to go.
Kill Ya Later!

Posted: Thu Sep 18, 2003 6:14 am
by wacko
rOger, thanks. My explanation probably wasn't that clear, that next window was still there when I looked at it from outside or through an unbroken window...

tltrude, ty. Yes, that could be done, but it'll raise the number of brushes which is already bad enough...

Crunch, thank u again for helping: It's working perfectly now! :D
Only bad thing is that I haven't learned much. I can see the changes u made, but why is it working now?
P.S. I haven't had much success in trying to visit ur website: Is there anything on the tutorial page (besides the music)?

Posted: Thu Sep 18, 2003 11:50 pm
by crunch
Well, Wacko. Basically what you did was to create your replacement window as a skybrush with this:

map textures/mohcommon/envnormndy_day.tga
tcgen environment
alphagen const .2
blendFunc blend
alphaFunc GT0
nextbundle


When a skybrush is enclosed on all sides with structural brushes, it blocks the view of any brushes behind it. Because your window had skyshader characteristics, you added another "sky" brush in the window opening once it was broken. :wink:


The website is still in its infancy, and since I am no webmaster or html guru, it is a simple setup. There is however content on the tutorial page. I don't know why you wouldn't be able to view it.

Kill Ya Later!

Posted: Fri Sep 19, 2003 5:44 am
by wacko
thanks, crunch...
now, i'm a little wiser ( :? )