alpha not working in realtime

Hey guys ! i’m trying to follow along Blendenzo’s cursor tutorial, but i can’t get the alpha to render in the game engine, i have a plane with a color texture maped to color and an alpha texture maped to alpha, the alpha works correct in the render but in the game engine the area that should be invisible shows up black
i’ve atached a pic to ilustrate

Attachments


make sure that you select the polygons that aren’t right then try going to the edit buttons—>Texture face

set the active face alpha blending… You probably want “Clip alpha” rather than “alpha” (alpha is for varying levels of transparency, but can introduce sorting probs) Clip alpha should be used as much as you possibly can…

Now, if it’s for more than one face you’ve only changed the setting for the “active” one…

so use “ctrl c” and “active transp” to set all of your faces the same.

Michael i’m not sure i’ve explained right, i have only one face there, a plane with 2 textures on it, one for color one for alpha, in the render it shows up fine but the GE just makes black whatevere was suppsoed to be transparent

Are you using GLSL or multitexture to render it?

i’ve tried both, if i switch to glsl i get no effect at all

…did you check the “textured face” settings like I said?

Have you hit the Z-transp button in the materials?

Michael, I’ve also encountered rareseu’s problem a long time before this post, and I’ve tried ALL the texture face settings and it’s pointless(I’ve also tried ALL the other transparency options):(. I guess it’s a GL bug or limitation that needs to be fixed… so, No transparent cursors with glsl materials, only with multitextured…(The cursor could be replaced with a REAL 3d mesh, it would be much cooler :D:cool::RocknRoll:;)). Good luck rareseu!!!

Thanks for all the input guys, i have spent the whole day switching buttons on and off sistematically, nothing works, i’ll have to use a mesh in the end …however that will bring up shading a shadow problems, but that’s something to worry about at a later date

Well if you really want to do it textured, you could just combine the two in GIMP or Photoshop. The BGE will handle alpha in a single image, but not using an alpha map like you’re attempting.

Hopefully you’re loading the images in the Shading->Texture tab. At least that’s the only way I can think of to get multiple textures on one object. Anyways, going back to the material settings and look all the way to the right there should be texture settings. Select your alpha map and click on “Map to”. Now, unselect Col and select Alpha. Look at the color settings in the Material panel, you should see R, G, B, and A sliders. But the A slider down to 0. Hopefully now you’ll have transparency. Oh, and do this with GLSL. I’m not sure if this method works in the other modes.

@ Jimux : tried that, same result :frowning:
@ Moguri : yep that’s waht i’m doing, not working tho :expressionless:

Don’t worry, I assure you that alpha does function the Blender Game Engine.
I agree, it can get tedious and frustrating to get materials to do what you want, but I’m sure you will get your alpha working.

I suggest you start fresh. I’m going to try to walk your through it, and if it helps then great, and if it doesn’t, then I’m sure someone else will help or correct my mistake. I’m sure it doesn’t help that I’m in a rush to write this…

Create your cursor image in Photoshop, or the GIMP, but make sure it’s sitting on an alpha channel (represented by grey and white checkered pattern typically). You need to save this image as a format that supports an alpha channel. I suggest PNG, but you can also use TIFF and even PSD (not recommended).

The next step is to create a fresh new material and UV map your cursor plane correctly. You then need to add a texture in the texture panel, set as an image, then select your image. Now, this is where it gets a little confusing, because the material settings and stuff has been changed recently, so it’s easy for everyone to get mixed up. Try flicking on things that look like they will enable alpha (like in the texture panel there is a little use alpha button (I don’t really know if it does anything) ).

This next step is crucial: With your cursor mesh selected, go to the Texture Face panel (in the edit buttons window), and enable alpha, and maybe even turn on the sort button. While your at it, because it’s a cursor, you’ll probably want to set the collision off. Press the copy button(s).

If it doesn’t work when you hit P, then try going to the material settings and slide the Alpha slider under the color selection down to zero.

If nothing works still, then, well, I really don’t know, and don’t give up.

If nothing works, upload the image so can I or anyone else here try to make a .blend with object that you can append.

I made you a working .blend file , where can i upload it?
Oh i found Media Fire then i found FileFactory or something now i tryed, Savefile none of them worked.I will try a few more services …
And finaly here is a link from 2shared

Finally got a chance to look at your exmaple Josic,i can’t figure out how you did the first two since i don’t see any materials linked to them, but the third one is perfect, i’ll try to pick it apart and understand where i went wrong, thanks again :slight_smile:

I don’t think you are doing anything wrong. I have the same problem too… I do a lot of work with animating textured planes and all of my planes have some kind of graphic on with alpha.

See this blend file:
http://www.elyeball.pwp.blueyonder.co.uk/alpha_problem.blend

The plane on the left was added in 2.48. The plane on the right in 2.47 which I then appended.

All I do is add a plane, hit tab, select all verts, press u and choose unwrap. In the UV window I choose image open. In 2.47 I get the alpha background… in 2.48 it is black.

I’ve looked through Face Mode Set but can’t find anything. I found the “draws image with alpha” button in the UV window but that only changes the UV window.

Since I mostly work with planes I can get around it by copying the plane that works… but it’s not ideal.

Edit: Having said that… both work in the game engine… but not if I remove the material from the plane… then it’s black. So you can solve your problem by not having a material, only add your texture through the UV window. I think!?!

I only use one texture map for alpha. Use an image editing program to remove the background colour. - then in the Texface panel select alpha or clip alpha.

In the materials tab set map to alpha and colour.

For GLSL you also need to lower the Alpha slider to 0 and click Ztransp

Or you could not use a material and just UV map and use Texface options… but that won’t work in GLSL.