Adding decals to a specific face

I’m trying to figure out how decals work in bge and ran into this:


The texture on the right is not tiled but it shows up on every face using this material, even though I only unwrapped one of the faces. The plan was to use this texture once, on a single face.
I could work around this by moving all unwanted textures to the sides but I reckon there has to be a better way.

Hope this makes sense.

Hello
you’re using GLSL I guess…so, you must make/assign two materials with and without “decals”!
Bye

Have you tried UV maps? You could assign one UV map to the repeated texture, and another to the decal texture. The UV assigned to the decal texture would have one poly mapped to the decal and move the rest of the polies to an area of the image that is transparent.

Ah, I forgot to mention some things. Sorry.
I’m using GLSL and multiple UV maps. One for background texture (brick wall) and another for the grubby decal.

…so, you must make/assign two materials with and without “decals”!

So this means that I need to add an extra decal-material for every material I want to slap decals on?

The UV assigned to the decal texture would have one poly mapped to the decal and move the rest of the polies to an area of the image that is transparent.

I tried this and it kind of works but it feels like a really slow technique when dealing with a larger number of faces (like walls in a game level map).
Any more ideas?

Thanks for replying, guys.

Yes, its quite slow and tedious!
You can add a little plane ( no collision) with the “decal”, in the needed places, but its even harder I guess!
Bye

Yes, its quite slow and tedious!
You can add a little plane ( no collision) with the “decal”, in the needed places, but its even harder I guess!
Bye

This is the best solution because it only incurs a performance hit for the faces that actually need decals. Hellooo’s solution would work too, but it would require the gpu to perform two texture fetches per pixel for all faces, not just those that need decals. So it would likely run slower.

@laser blaster: I suspected that messy method would have performance issues.

@OTO: You mean like the bullet hole technique but static? Yes, I guess that would be a lot of work, plus I would still have to create new materials for every decal.