broken windows make things invisible?!

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

Moderator: Moderators

Post Reply
User avatar
wacko
Field Marshal
Posts: 2085
Joined: Fri Jul 05, 2002 8:42 pm
Location: Germany

broken windows make things invisible?!

Post 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:
rOger
Major
Posts: 290
Joined: Wed Feb 05, 2003 8:56 pm
Location: Sweden

Post 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.
Looking for a good game? Play GO the ancient asian game of strategy.
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

broken

Post 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.
Tom Trude,

Image
crunch
Major
Posts: 348
Joined: Sat Jun 14, 2003 2:34 pm
Location: USA
Contact:

Post 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!
Image
User avatar
wacko
Field Marshal
Posts: 2085
Joined: Fri Jul 05, 2002 8:42 pm
Location: Germany

Post 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)?
crunch
Major
Posts: 348
Joined: Sat Jun 14, 2003 2:34 pm
Location: USA
Contact:

Post 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!
Image
User avatar
wacko
Field Marshal
Posts: 2085
Joined: Fri Jul 05, 2002 8:42 pm
Location: Germany

Post by wacko »

thanks, crunch...
now, i'm a little wiser ( :? )
Post Reply