3DS semi-transparency isn't working
Posted: Wed Apr 26, 2017 12:18 pm
I've made a simple mesh in Blender with a semi-transparent green plane, and exported it as 3DS to use with Irrlicht. The Blender file and the 3DS file can be downloaded here: http://www.files.com/shared/59008a3f8f7 ... 20mapp.zip.
The problem is that when I try to use the 3DS in Irrlicht, the transparency isn't rendered correctly. I tried the following code:
The problem is that the transparency is ignored. Here is a screenshot (I've added the earth.x mesh from the Media folder from the Irrlicht library to see if the transparency is rendered correctly):
I also tried irr::video::EMT_TRANSPARENT_ALPHA_CHANNEL, irr::video::EMT_TRANSPARENT_REFLECTION_2_LAYER and irr::video::EMT_TRANSPARENT_VERTEX_ALPHA with the same result.
I also tried irr::video::EMT_TRANSPARENT_ADD_COLOR, which is a bit better but still not what I want:
Here is approximately the result that I want (made with Blender):
How can I get the semi-transparency to work correctly in Irrlicht?
The problem is that when I try to use the 3DS in Irrlicht, the transparency isn't rendered correctly. I tried the following code:
Code: Select all
irr::scene::IMeshSceneNode *mesh = sceneManager->addMeshSceneNode(sceneManager->getMesh("untitled.3ds"), 0, -1, irr::core::vector3df(0, 0, 0), irr::core::vector3df(0, 0, 0), irr::core::vector3df(1, 1, 1));
mesh->setMaterialType(irr::video::EMT_TRANSPARENT_EMT_TRANSPARENT_ALPHA_CHANNEL_REF);
I also tried irr::video::EMT_TRANSPARENT_ALPHA_CHANNEL, irr::video::EMT_TRANSPARENT_REFLECTION_2_LAYER and irr::video::EMT_TRANSPARENT_VERTEX_ALPHA with the same result.
I also tried irr::video::EMT_TRANSPARENT_ADD_COLOR, which is a bit better but still not what I want:
Here is approximately the result that I want (made with Blender):
How can I get the semi-transparency to work correctly in Irrlicht?