custom-placed decals
Moderator: Moderators
custom-placed decals
I know somebody figured out how to do this, but i cant find the post on it.
So how can i make some blood or bullet decals somewhere on my map?
So how can i make some blood or bullet decals somewhere on my map?
Moderator
۞
Abyssus pro sapientia
Olympus pro Ignarus
۞
AND STUFF™ © 2006
۞
Abyssus pro sapientia
Olympus pro Ignarus
۞
AND STUFF™ © 2006
shader
The only thing that makes a decal a decal is this line in the shader.
polygonOffset
It makes the see-through texture sit one pixcel above the normal surface of a brush or patch. The face of a decal textured brush, or patch, overlaps the face of the brush, or patch, you apply it to.
Here is an example of a decal shader.
polygonOffset
It makes the see-through texture sit one pixcel above the normal surface of a brush or patch. The face of a decal textured brush, or patch, overlaps the face of the brush, or patch, you apply it to.
Here is an example of a decal shader.
Code: Select all
textures/decals/cracked2
{
qer_editorimage textures/decals/cracked2.tga
polygonOffset
cull none
{
clampmap textures/decals/cracked2.tga
blendfunc blend
alphagen vertex
rgbgen identify
}
}
I was just trying to get these to work this weekend myself. A lot of the decal shaders that I saw were using the GE 128 alphagen parameter which is really only good for solid black & white alpha channels in your image.
I was also having a hard time getting my lighting to work with the various decal shaders I tried. After a lot of experimenting, I stumbled upon this combination for my shaders:
It's been a while since I've been through the shader manual. I'm not entirely sure if I have redundant code in here or if the behavior of this shader would be the same as the one Tom posted. But I know it works with alpha channels in shades of gray and my lighting.
I was also having a hard time getting my lighting to work with the various decal shaders I tried. After a lot of experimenting, I stumbled upon this combination for my shaders:
Code: Select all
textures/praetoria/alpha/decal_sign_03
{ qer_keyword praetoria
qer_keyword decal
qer_editorimage textures/praetoria/alpha/decal_sign_03.tga
surfaceparm rock
polygonOffset
{
map textures/praetoria/alpha/decal_sign_03.tga
rgbGen identity
alphagen vertex
blendFunc blend
nextbundle
map $lightmap
blendFunc blend
}
}
Diego
I've heard about this technique before. It totally turned me off the idea of using decals and I don't understand why anyone in their right mind would want to add decals to the map in this way knowing that they may have to completely redo it from scratch. Just doesn't seem like useful tool to me. But I guess I shouldn't knock it until I try it, eh?bdbodger wrote:run the map and use the decal menu but if you change your bsp you will have to do it again . Bring down the console by hitting the tilde key ( ` ). Then type in ?pushmenu decals?. This will bring down the decal console.
The handful of decals I've put in my map so far I stick on a brush that is embedded in my walls. I only have to do it once.
Diego
-
Rookie One.pl
- Site Admin
- Posts: 2752
- Joined: Fri Jan 31, 2003 7:49 pm
- Location: Nowa Wies Tworoska, Poland
- Contact:




