Alpha not transparent in GLSL on 2.48a (solved - Again!)

Hey I thought I knew how to get alpha to display transparent in the game engine but the way I’m doing it doesn’t work for GLSL but it does for the other two texture modes

So rather than the usual, “have you turned your alpha down? have you used an image format that can store alpha values”

can someone out there please just start a new blend file. Make a plane, and from an untested image get their alpha to work with GLSL active I know it’s a lot to ask but I’d appreciate it thanks!

Yeah, you use ZTransp, in the material, and I think you enable alpha on your texture and set alpha to 0…

thank you very much!

Nope spoke too soon, it’s not working anymore. I didn’t think i was quite that stoopid there must be some bug or something it’s randomly working and not working, apparently. But maybe I am stuppid who knows.

It should work, but sometimes you need to select the object for it to refresh, or change in and out of textured mode.

I know it’s weird, but sometimes it works.

finally figured it out - it’s not a bug - but somebody needs a write a tutorial… maybe I’ll do it - it’s just that you have to check 3 different toggles and one slider to get alpha to work in GLSL + 2 additional toggles to see alpha preview in materials and alpha in UV image editor that’s 5 toggles and one slider all in different parts of the interface having to do with accessing alpha

not that hard since I took notice of it but weird before I did

2.5 world peace

Does this work for two-sided objects?

can you let us know what the toggles were?

Hey Folks,

I’ve spent the better part of the last two days looking into this problem.
Here is an explanation of alpha and the 2.48 game engine:

http://www.blender.org/development/release-logs/blender-247/game-engine-alpha-blending

The big thing I picked up in here is the Sort button on the Texture Face tab of the Editing Panel.
You can get two sided images with the proper alpha sorting if you chose Sort, Two-Sided, and
Alpha.

Unfortunately, there still seem to be some problems.

I sometimes get sort of “tearing” or “flickering” when two objects are moving together and
are butted up against each other.

Please see this blend file for an illustration of the problem:

http://www.blendernyc.org/twoside+alpha-problems.blend

Any help would be greatly appreciated.

Seems like a bug…

Can anyone make a short explanation please? I need to know also.

I also would like to know. I’ve been quite frustrated trying to get alpha to work properly in the game engine.

I just want objects to fade in and out. Nothing terribly fancy. It usually works fine if I set the alpha manually and then start the game engine: with alpha at 1, the object is fully opaque, with alpha at 0.5 half transparent, with alpha at 0, completely transparent.

But as soon as I try to set an IPO to control the alpha channel, I get some weird behavior. It is like if the value 1.0 in the IPO is not really 1.0. I’ve tried successfully the method using ColR/G/B/A with GLSL textures instead of the multitextures but it seems to me there ought to be some simpler way.

I’m attaching an example of the kind of problem I’m running into. Running the game engine in that file should get the cube to fade out from fully opaque and than fade in again to fully opaque but it never gets to the state of being fully opaque.

And I’ll point out that Blender’s rendering engine has absolutely no problem with what I’m asking it to do. It is only in the game engine that there’s a problem.

Attachments

alpha_problem.blend (142 KB)

Can someone please explain how to use alpha images like png. in glsl.

Same trouble for me - have animated alpha working fine in ‘normal’ blender materials game engine, but am finding it absolutely impossible in the GLSL game engine. I’ve been struggling with it for weeks now, it’ll be a real shame if I have to give up GLSL :L
Does anyone have any suggestions? Should this be a bug? Is it already a bug?
Thanks for listening!

Hi Slowboy,

A tutorial about using alpha with GLSL with a finished blend that you can download.

http://www.tutorialsforblender3d.com/GameDoc/Alpha/Alpha_Quick_GLSL.html

Clark

Thanks Thames! I’ve manged to work it out now and am more than happy with the GLSL once again!

Ok, I thought I should update this for more clarity, after living with the solution for a week or two!
The most important thing to remember is this…
BEFORE you press P - go to your animated alpha slider and make sure it is set back to ZERO!!!
If your alpha is animated, it may look fine in the viewport, but you’ll find that it is often NOT at zero, because you’ve been scrubbing your anims and checking things out. Chances are that when you come to pressing P to run the game, your alpha slider has found it’s way to somewhere that isn’t zero, and if this is the case, your alphas will not work, let alone animate, in the game!
It took me a while to get my head around, because I had objects that, for example, animated from visible to invisible, over ten frames - but in order to get this to happen in the game engine I had to go to frame 1 (where my object is 100% visible (alpha slider at 100)) and slide the alpha slider to zero?!
I hope this rather long winded explanation helps with a rather confusing issue!

I have been trying to get my object to fade out in GLSL, I have read through this forum and I still am not able to get my alpha to actually fade out in the game engine. I know how to do most everything else with alpha in GLSL, but I can’t seem to animate it. Here is an example .blend file with an object I am trying to fade out, it works in multitexture mode, but not in GLSL. Any suggestions?

RingTest.blend (790 KB)

OK, more info for ya, after wasting too much time trying to get this working again!
ObColor must be on, and animated for the animated alpha to work in GE!!!

Hi all,

I have been using Blender for quite a while now (actually ~3 years) and in that time I have not managed to make GLSL alpha ipos works in the GE. I would like some help with this if you could, please. The ipos just simply don’t play! I simply use the logic bricks to make it play the ipo on startup but when I start the game it just won’t play! I am getting a bit frustrated with the GLSL material system. All I want is a simple screen fader!

One more thing…I don’t seem to be able to make realtime text work reliably. Sometimes it works and other times it doesn’t. When it doesn’t work it doesn’t work on the multitexture system either. When I start the GE although the plane (I normally use them for text) is repeated to the length that it would be if it were working, all I can see is the @'s repeated constantly! I only managed to make it work today and I don’t know what I did differently.

Help with these problems please???

Clonkex

@Clonkex

  1. Texture mapping ipos do not work in the GE. But I think u can use python scripting. I don’t know much about python scripting but I think you can get all the information you need from here.
    http://blenderartists.org/forum/showthread.php?t=128526

  2. Can’t help. Could you upload a file that doesn’t work?