rosch@Posted: Tue May 22, 2007 5:34 pm :
Hello,
the problem I have is that I wanted to create my own decals for baking occlusion shadows under or above imported models. At first I tried to put it into a simple plane mesh with a diffuse + aplha chanal. But the alpha gradient looked horrible, as if it would just have 4 different tones of grey.

Then I tried to create decals, because I've seen some in doom3 with nice aplha gradients. Everything works fine in the editor. I can place the decals, i see them in realtime, but after compliling the map I can't see a single decal ...


any suggestions out there?



Kristus@Posted: Tue May 22, 2007 7:32 pm :
When you place the decal, are you placing it a bit above the surface you're placing it on?



rosch@Posted: Tue May 22, 2007 7:39 pm :
Of course.
I've even tried to place it a lot more units above the floor, but nothing happened.

As I said, everything works fine in the editor realtime window, but it does not work in the game ... have no idea



LDAsh@Posted: Wed May 23, 2007 1:41 am :
This may be the material you're looking for, taken from the bloodsplats. It's uses inverted colours (for whatever reason) so white is actually black and black is transparent (so before inverting make white transparent), and colours inverted too (so dark red blood is bright cyan) and most importantly it's light and fog friendly (so you won't have stuff rendering through fog or glowing in the dark).

Code:
//-------------------------------------------------------------
//05> coloured darks on transparent white (bloodsplats/graffiti)(layers to black)
textures...
{
   decal_macro
//   translucent //off?
   nonsolid
   noimpact
   noshadows
   qer_editorimage   textures...tga
   {
      blend    gl_zero,gl_one_minus_src_color
      map       textures...tga
//white as transparent true-colour, but then inverted (dark red is bright cyan)
      colored
   }   
}



rosch@Posted: Wed May 23, 2007 12:59 pm :
Thanks man, I will give this one a try. I've allways wondered, why the ID booldspats are inverted ... nice to know.

By the way: The problem that I can't see the decals may have to do something with a map leak in my map. Later I placed some standard brushes and even they were not visible ...



BloodRayne@Posted: Wed May 23, 2007 2:07 pm :
LDAsh wrote:
This may be the material you're looking for, taken from the bloodsplats. It's uses inverted colours (for whatever reason)...

The reason is because of the blend mode specified. In this case it's a blend 'filter' mode which filters the source channels. The darker an image is, the less of the sourceimage will be visible.

So it's pretty logical that decals are white, not black. ;)



Tron@Posted: Wed May 23, 2007 3:18 pm :
rosch wrote:
Thanks man, I will give this one a try. I've allways wondered, why the ID booldspats are inverted ... nice to know.

By the way: The problem that I can't see the decals may have to do something with a map leak in my map. Later I placed some standard brushes and even they were not visible ...


This could be a silly question, but you are doing a full recompile right?



rosch@Posted: Wed May 23, 2007 3:32 pm :
yes, of course, or is something wrong about it?



LDAsh@Posted: Thu May 24, 2007 2:06 am :
BloodRayne wrote:
...So it's pretty logical that decals are white, not black. ;)

Thanks for stating the obvious at me, but I was talking about the actual hues, not the black and white. There are other decal methods that use white as transparent that don't use inverted _colours_, this is why I state my wonder at what the added benefits of this technique may be as opposed to other techniques. If you can tell me that, then you can ;) at me. ;)