Overlay Texture

Is it possible to have a texture overlayed on top of another while in-game? Or ever for that matter? I’m hoping to have a semi-transparent texture applied over a solid texture when the player stands beside it so that the corners of the square object change color to indicate it is the selected object. Could not find out how to do this in the Blender API. I also searched around to no avail.

[I’m running 2.56]

If not possible, any ideas on how to achieve this sort of effect?

Im adding to this post in hopes this gets solved, I wanted to UV map a blood texture on top of a wall texture, and it destroyed me trying to figure it out, High hopes to finding the solution!
(basically a bump)

I was thinking about this for decals, instead of having them as objects, have them as actual edits on the texture; I’ll have a go at using a python image editing library, and get back to you with the results :smiley:

Thanks for reminding me; if you don’t trust I’d be of any help, the library is here:

Scratch that; don’t know why I mentioned python instead of openGL… :o


To have multiple uv textures in the game engine is reasonably easy with one thing that can really catch you out.

  1. Do normal UV mapping of your textures, such that if you have 2 textures each with different uvs, and you then press f12 to render you see both textures on a single plane.

  2. If you got the above to work and you then go into the game engine you may not see any textures and instead see just the base object color (assuming you haven’t changed Blenders default values). A thing to try is check that your 3D Viewport is in Textured Mode if it’s in solid mode no matter how your objects are textured in the game engine you will only get solid colors no textures in the game engine. All of this applies only with default settings.

I have attached a blend file that has 2 uv textures. One UV Textures has the graphic on it that says “Hello I Like”, and there is second UV Texture which overlays on the first with a graphic that says “BLOOD”. Both uv textures are trasparent where there is not text allowing the base color of the plane (green) to also show through.

This plane will both render correctly with f12 and game engine.

Also the reason the HelloILike graphic appears black in the 3D Viewport is because the text is black and transparent parts of a mesh when not in opengl shading mode also appear black so the entire plane appears black for that uv texture. Switching to glsl should show better what is really going on.


FaceTest.blend (70.1 KB)

To achieve the effect, you could use a simple replace mesh, have your original object, and a copy with the highlights, then replace when it is selected, etc.

My stupid reply was early (for me :D) and I thought you meant like this:

Here’s what I came up with. I need to have the texture show up only on collision like in my blend file. While I got that to work however, I was hoping there would be a way to not need a replacement mesh whenever I want to overlay a texture over an object because for me I would have to create a lot of replacement meshes, which I would Like to avoid. So maybe there is a way to get an objects current texture, modify it, then use it all while in-game?

On another note, how do you change an objects transparency via Python?


OverlayTest.blend (616 KB)

I use overlay texture with good result for height map or displacment bump texture created in insane bump(gimp) or crazy bump