EMT_TRANSPARENT_VERTEX_ALPHA in OpenGL?

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
agrif
Posts: 12
Joined: Mon Feb 21, 2005 7:25 am

EMT_TRANSPARENT_VERTEX_ALPHA in OpenGL?

Post by agrif »

Looking at the documentation, it seems most materials like EMT_TRANSPARENT_VERTEX_ALPHA don't work in OpenGL, although it doesn't say whether EMT_TRANSPARENT_VERTEX_ALPHA works. I tried using this material with the following code, but nothing at all happens...

Code: Select all

mesh = smgr->getMesh("../media/intro/displaygreendots.x");
node = smgr->addAnimatedMeshSceneNode(mesh);
if (node)
{
	node->setMaterialFlag(irr::video::EMF_LIGHTING, false);
   node->setMaterialType(irr::video::EMT_TRANSPARENT_VERTEX_ALPHA);
	mm->setVertexColorAlpha(mesh->getMesh(0), 50);
}
I have no way of testing if this works with direct3d (pure linux ftw! :roll: )
Cows don't move, they tunnel.
Irrlicht .PLY Loader
agrif
Posts: 12
Joined: Mon Feb 21, 2005 7:25 am

Post by agrif »

I'm normally not one to bump topics, so forgive me... but with 3 days but only about 18 views (at least 4 mine :shock:), maybe this is worth another try.

I'm beginning to think this is an Advanced Help topic...
Cows don't move, they tunnel.
Irrlicht .PLY Loader
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Yes, seems to be a problem with vertex alpha, at least the world in example 11 is not transparent (anymore?)
sh1ny
Posts: 21
Joined: Mon Jul 17, 2006 6:21 pm

Post by sh1ny »

Works kinda strange here :P

using irrlicht 1.0 with irrlicht.NET CP from deusXL :

opengl :

Image

D3D9 :

Image

D3D8 :

Image

Maybe is something im doing wrong, or it's how is supposed to be ?
Spintz
Posts: 1688
Joined: Thu Nov 04, 2004 3:25 pm

Post by Spintz »

It's a bug with the render states in OpenGL. The OpenGL Driver does not properly manage rendering states.
Image
agrif
Posts: 12
Joined: Mon Feb 21, 2005 7:25 am

Post by agrif »

I looked through all the examples for some sample code that would work, but apparently I forgot about the planet in the PerPixelLighting demo... It works on my computer, so I worked off that.

I found out that EMT_TRANSPARENT_VERTEX_ALPHA does not work no matter how you jigger it in OpenGL. However, EMT_NORMAL_MAP_TRANSPARENT_VERTEX_ALPHA will work for ~1 mesh for the entire scene. I couldn't figure out exactly what set this mesh apart, every time I changed the code a bit it changed randomly.
It's a bug with the render states in OpenGL. The OpenGL Driver does not properly manage rendering states.
I don't know much about OpenGL, but that sounds like that could cause these weird magic errors...

Anybody know if there's a chance for these to be fixed soon? (or maybe if the svn has this fixed?)
Cows don't move, they tunnel.
Irrlicht .PLY Loader
Post Reply