grates

Having a problem with a shader or texture
User avatar
theRipper
Posts: 223
Joined: Tue Aug 30, 2011 1:57 pm
Contact:

grates

Post by theRipper »

so, i used null's grate shader from mandolin.
i textured all faces of the brush with metal clip and the top face with the grate shader

in-game the grate is see through where it needs to be(between the grate slats) but i cannot shoot through the gaps.
id also like to cast a decal on the grate and it appear only on the slats and not on the empty space between them.

how can i do this?
Image

User avatar
Rayne
Site Admin
Posts: 624
Joined: Wed Aug 17, 2011 5:22 pm

Re: grates

Post by Rayne »

Post the shader please.

User avatar
theRipper
Posts: 223
Joined: Tue Aug 30, 2011 1:57 pm
Contact:

Re: grates

Post by theRipper »

Code: Select all

textures/null_beach/proto_grate4
{
   surfaceparm   metalsteps   
        surfaceparm trans      
   //
   //cull none
        nopicmip

   // A GRATE OR GRILL THAT CAN BE SEEN FROM BOTH SIDES
   {
      map textures/null_beach/proto_grate4.tga
      //tcMod scale 2 2
      blendFunc GL_ONE GL_ZERO
      alphaFunc GE128
      depthWrite
      rgbGen identity
   }
   {
      map $lightmap
      rgbGen identity
      blendFunc GL_DST_COLOR GL_ZERO
      depthFunc equal
   }
}
Image

User avatar
Rayne
Site Admin
Posts: 624
Joined: Wed Aug 17, 2011 5:22 pm

Re: grates

Post by Rayne »

I think you can only have one at the time on a single surface. So it can either be blocking players with player clip or blocking bullets with weapon clip.
However i think you can easily use the backshader in the main shader, duplicate the original shader have backshader keyword in the main shader refer to it and then just set one shader to block players and the other to block bullets.

User avatar
theRipper
Posts: 223
Joined: Tue Aug 30, 2011 1:57 pm
Contact:

Re: grates

Post by theRipper »

um..


wut
Image

User avatar
v3nd3tta
Posts: 82
Joined: Thu Aug 18, 2011 12:49 pm
Location: Germany
Contact:

Re: grates

Post by v3nd3tta »

1. use shader only in visual way
2. playerclip manuall
3. weaponclip manually
4. profit!

User avatar
theRipper
Posts: 223
Joined: Tue Aug 30, 2011 1:57 pm
Contact:

Re: grates

Post by theRipper »

ty vendetta
Image

User avatar
theRipper
Posts: 223
Joined: Tue Aug 30, 2011 1:57 pm
Contact:

Re: grates

Post by theRipper »

vendetta i tried it that way but once a model is inactive it falls through the grate.
flags,dead bodies, etc.

but oddly weapons dont fall through.


:/
Image

User avatar
theRipper
Posts: 223
Joined: Tue Aug 30, 2011 1:57 pm
Contact:

Re: grates

Post by theRipper »

i fixed the flags falling through problem. but dead bodies still fall through. currently it is metal clipped and covered with a separate missile clip brush
Image

bludshot
Posts: 111
Joined: Fri Sep 23, 2011 12:12 am

Re: grates

Post by bludshot »

Why not just make it solid? In real life grenades wouldn't fit through that grate, and bullets would mostly hit it. So why have anything go through?

Or if you put brushes going across, like thicker supporting parts of the grate: | | | | | then dead players would snag on those instead of falling through.

Post Reply