Hi..
I am trying to make model invisible using the following codes.
node->setMaterialFlag(video::EMF_LIGHTING, true);
node->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR);
node->getMaterial(0).AmbientColor.set(0,0,0,0);
but I could not get completely invisible model.
som part sill can be seen.
how to solve this problem?
thanks
use EMT_TRANSPARENT_ADD_COLOR to make model invisible
-
- Posts: 44
- Joined: Mon Dec 05, 2005 8:15 am
Think add color is suppposed when you dont need full transparency. It will add the color to the color behind (best for particle systems). You may want to give an alpha value to the texture and use ALPHA or ALPHA_REF types.
Warchief's Warboard 3D Now hotseat release
Right, why not ???esaptonor wrote:why not just use node->setVisible(false); ?
First you try to flip the surfaces and now with transparent color...
This also does not what you want to (like the surface flipping) !!!
It just makes the mesh/node transparent not invisible !!!
The only way would be to change the texture to full black (or was it full white) and then make it transparent, but I don't really know if then the node is really invisible...
while(!asleep) sheep++;
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
Lol, my mistake. Just misunderstood. Thought he wanted full transparency for some parts of the model.
Warchief's Warboard 3D Now hotseat release
-
- Posts: 44
- Joined: Mon Dec 05, 2005 8:15 am
Soz, have not tried that myself. But i have two ideas that could work:
1) Use a texture with alpha channel in gradient. Material type: EMT_TRANSPARENT_ALPHA_CHANNEL. Then, modify SMaterial::MaterialTypeParam so it goes hiding the model as it hides the values from the alpha gradient.
2) Use EMT_TRANSPARENT_VERTEX_ALPHA. Not sure about this one.
1) Use a texture with alpha channel in gradient. Material type: EMT_TRANSPARENT_ALPHA_CHANNEL. Then, modify SMaterial::MaterialTypeParam so it goes hiding the model as it hides the values from the alpha gradient.
2) Use EMT_TRANSPARENT_VERTEX_ALPHA. Not sure about this one.
Warchief's Warboard 3D Now hotseat release
Ahh, why you didn't tell this from the beginning ???sunnygraphy wrote:I want model to disappear slowly not suddenly
Maybe this thread can help you (I didn't test it yet)
http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=18160
while(!asleep) sheep++;
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java