Partially transparent mesh problem [SOLVED]

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
Jgwman
Posts: 12
Joined: Sat Dec 29, 2012 6:26 pm

Partially transparent mesh problem [SOLVED]

Post by Jgwman »

Hello, I was attempting to load one of my own animated meshes- a dagger- and parent it to the camera, such as you might see in a first person RPG. I succeeded, except part of the hilt is completely invisible, which I did not intend. I am fairly sure it is a problem with code and not the model or its texture, because both the model and texture render fine (in Blender, where I created the mesh). I am not sure where the problem is, so if you need me to post something let me know what. I will put the code where I call the mesh here:

Code: Select all

scene::IAnimatedMesh* dagger_1 = smgr->getMesh("anim/dagger_1.x");
 scene::IAnimatedMeshSceneNode* dagger_1N = smgr->addAnimatedMeshSceneNode(dagger_1);
 dagger_1N->setPosition(core::vector3df(5,-5,20));
 dagger_1N->setParent(camera);
 dagger_1N->setMaterialFlag(video::EMF_LIGHTING, false);
Last edited by Jgwman on Sun Dec 30, 2012 3:15 am, edited 1 time in total.
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Re: Partially transparent mesh problem

Post by Mel »

What is the output of the console window?
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
Jgwman
Posts: 12
Joined: Sat Dec 29, 2012 6:26 pm

Re: Partially transparent mesh problem

Post by Jgwman »

First, the normal driver selection appears as it should. I select OpenGL. It outputs the Irrlicht version, Windows version, "Using Renderer: OpenGL 3.3.0", my graphics card, "OpenGL driver version is 1.2 or better", resizes the window, then loads a bunch of textures and meshes (some of mine, some are to do with the Irrlicht tutorials on collision). Nothing seems unusual.
Lonesome Ducky
Competition winner
Posts: 1123
Joined: Sun Jun 10, 2007 11:14 pm

Re: Partially transparent mesh problem

Post by Lonesome Ducky »

Sounds like the faces are facing the wrong way. Try turning off backface culling and see if it reappears
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Re: Partially transparent mesh problem

Post by Mel »

part of the hilt? like it is cut suddenly? If so, maybe it has to see with the size of the dagger and the near plane of the camera, can you post a screens of blender and the program?
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
Jgwman
Posts: 12
Joined: Sat Dec 29, 2012 6:26 pm

Re: Partially transparent mesh problem

Post by Jgwman »

Mel - at first I thought it had to do with the closeness to the camera, but it did the same thing when farther away. To both of you, thank you for your help - it appears that Lonesome Ducky's solution of disabling backface culling works. Thanks again for the help.
Post Reply