Texture - Solved thanks captain oblivion ^^

Hey,

It’s a really newby question probably… But how can I make 2 textures overlay on the same object? I made a skin texture and a eye texture which need to go on the same object without having to be in the same image.

Thanks ^^

*edit

Btw, I get it that far so that the 2 textures are good on the preview. But it will only work when I render the image.

Enable Alpha on the eye material under the Texture settings, assuming that the eye material has nothing but the eyes on it, and assuming that the eye texture is transparent except for the eye itself. You may need to move the UV-map around to not be on the eye portion of the texture.

You can use two textures on the object. But in the long run it’s better to put both textures on the same sheet and unwrap the mesh as needed.

Enable Alpha on the eye material under the Texture settings, assuming that the eye material has nothing but the eyes on it, and assuming that the eye texture is transparent except for the eye itself. You may need to move the UV-map around to not be on the eye portion of the texture.

The problem is that it only shows the eye texture in game, not the skin texture

So I take it that the eyes appear correctly, but the rest of the mesh is invisible? If so, make sure that there’s an alpha channel on the eye texture, and make sure that Alpha is ticked under the texture options. If you could post a screenshot of the problem, that would help.

Well the eyes are indead just visible… and the rest of the face is invisible because i made it transparent. The rest of the face should be filled with the skin texture but it isn’t.

Uhm, whats an alpha channel?

Please help man :\

An alpha channel is a channel of an image that corresponds to the transparency of an image; like the Red, Green, and Blue channels, there’s the Alpha channel. Make sure that there’s an alpha channel enabled in the image - in Gimp (and Photoshop, I believe), an image is transparent where you can see a white and grey checkerboard pattern - that is the transparent portion of the image. If the image does have transparency but you can’t see through the transparent portions, make sure ZTransp is enabled for the eye portion of the mesh - that will enable alpha-enabled faces to show other faces of the mesh through the object.

Here’s an example.


Note the checkerboard pattern on the face. That indicates the transparency, active in the Alpha channel. In the second pic, the eyes are on a separate cube than the underlying cube. As you can see, the alpha is enabled on the face texture. Here’s the blend file (I had to make it a zip file so that I could include the face texture as an external texture that you can see). This works in both GLSL and Multitexture mode.

Attachments


Ok sorry I didn´t explain my problem good enough so i´ll add a few ps. :stuck_out_tongue:

Face in photoshop:

The skin is just a 1px 1px image of a skin color. I have my reasons for using an image in stead of color.

These are the logics


In game mode: it looks like this


(don’t mind the white body) :stuck_out_tongue:

But I want the eyes to appear over the skin texture. So that you can change the skin color, and change the face expression.

Hope this makes it clear, thanks for you time already! ^^

If you look at my example file, you’ll see what is shown in my example picture - that the face is transparent, but you can see the cube inside of it. You need to use ZTransp, most likely. Also, try setting the face’s Alpha setting to 1.00 in the Face texture for the face material.

I´m sorry but I really dont get it. In my file I can also see a square inside it:

But I ned the other texture to show aswell. like:


It should work fine if you just disable ztransp. If that still doesn’t work you might have to post a blend.

Basically, with ztransp enabled it makes the mesh invisible where the texture is clear- but with it disabled, where the texture is clear it just shows the texture below that one. If there’s no texture below that one (or the texture below is also clear) it’ll show the object color.

[edit] it’s pretty foolish to have ztransp on and alpha at 1, since then the engine has to do all the extra calculations it would if the mesh were clear (figure out what’s behind it, etc) but then draw the mesh opaque. Ztransp is specifically for if you want the entire mesh itself to have transparent parts, not the textures on the mesh.

Here’s the .blend :wink:

Sorry for my newbyness lol.

Attachments

Head.blend (171 KB)

Here you go- Head.blend (162 KB)

A few changes I made-
-you had both textures set to additive blending, which of course just made the whole thing turn white, so I set them back to normal
-I disabled ztransp on the material, and in the face settings set the faces back to opaque (never enable z transparency on a face you don’t want to see through- the game engine has to do a lot of extra calculations and there will be sorting errors where you see things through other things.)
-I enabled alpha on the face texture, so the skin texture would be shown underneath it

It won’t look right in the viewport, but when the game engine is running it should look fine.

Thank you so much ^^