https://www.youtube.com/watch?v=cGGUBtD9n7k
Printable View
Zappa
But the doubt is how do it on editor ?
Attachment 2288
For example,
- first brush has nodraw texture and alpha texture
- second brush was placed into the wall, but not render correctly (as you did via script on video)
Is not possible to add decals from the editor. Only from in-game after the map is already finished.
From the editor you can only place a plane in front of a wall but it would look bad
What a shame...
In cod I confess, is the biggest feature that I liked (decals , terrain editor and prefab as object)
Nice job zappa!
Yeah, z-fighting is what you will get if both surfaces are on the same plane. Even though you shouldn't get it with decals as their polygons are offset, you can actually sometimes still get z-fighting, which I have experienced in the past, so I tend to use r_offsetunits of -45 to alleviate that issue.
It's also worth mentioning that you can add custom decals to the in-game menu shown in the video by modifying the ui/decals.URC file and adding your own shaders to the "decals list". Just add: additem "shader_name_here" to the list.
An example of a decal shader definition would be:
shader_name_here
{
polygonOffset
surfaceparm paper
cull none
{
clampmap textures/decals/some_texture.tga
blendfunc blend
alphagen vertex
rgbgen vertex
}
}
Edit: Oh, and another thing to be wary, is that because decals duplicate the geometry they are placed over (they assume its shape), placing them over complex geometry like bezier patches and terrain can sometimes create an overabundance of debug lines (the lines you see in-game when you have a decal selected). This can sometimes cause MAX_DEBUG_LINES to be hit, spamming the console and causing your game to chug. This is only an issue when you are in edit mode and have that specific decal selected, but if you still want to keep it and can't manipulate it easily, you can temporarily turn off dcl_showcurrent.
You can check this out. A year later.