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.
nathanf534
Posts: 199 Joined: Tue Dec 09, 2008 2:55 am
Post
by nathanf534 » Fri Jun 25, 2010 5:07 am
It looks fine in irrEdit, then on irrlicht some triangles are missing (or are just black)
Code: Select all
int main() {
IrrlichtDevice *device = createDevice(EDT_OPENGL, dimension2d<u32>(1280,800),32,false, false, false, 0);
IVideoDriver* driver = device->getVideoDriver();
ISceneManager* smgr = device->getSceneManager();
IGUIEnvironment* guienv = device->getGUIEnvironment();
smgr->addCameraSceneNodeFPS();
smgr->loadScene("images\\destroyers.irr");
while(device->run()){
driver->beginScene(true, true, SColor(255,100,101,140));
smgr->drawAll();
guienv->drawAll();
driver->endScene();
}
device->drop();
return 0;
}
I am guessing it has something to do with irrEdit uses irrlicht 1.5 to render (I think) and im using 1.7.1, but I still don't think that should happen... maybe a bug?
Last edited by
nathanf534 on Sun Jun 27, 2010 10:00 pm, edited 3 times in total.
while(signatureEmpty){cout<<wittyComment();}
agamemnus
Posts: 283 Joined: Sun Jan 31, 2010 6:06 pm
Post
by agamemnus » Fri Jun 25, 2010 10:49 am
I have the same exact problem of some triangles being black, but in DirectX, and only when mipmaps are set to on.
nathanf534
Posts: 199 Joined: Tue Dec 09, 2008 2:55 am
Post
by nathanf534 » Fri Jun 25, 2010 2:25 pm
hmm, if I set irrEdit to use the software renderer instead of directX, it has the missing triangles too
while(signatureEmpty){cout<<wittyComment();}
Mel
Competition winner
Posts: 2292 Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain
Post
by Mel » Fri Jun 25, 2010 2:32 pm
Maybe you could try normalizing the normals during the rendering.
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
nathanf534
Posts: 199 Joined: Tue Dec 09, 2008 2:55 am
Post
by nathanf534 » Fri Jun 25, 2010 3:28 pm
Normalizing normals didn't change anything, and I'm not sure how to enable/disable mipmaps
while(signatureEmpty){cout<<wittyComment();}
Virion
Competition winner
Posts: 2148 Joined: Mon Dec 18, 2006 5:04 am
Post
by Virion » Fri Jun 25, 2010 4:24 pm
i can't see the image
nathanf534
Posts: 199 Joined: Tue Dec 09, 2008 2:55 am
Post
by nathanf534 » Fri Jun 25, 2010 4:32 pm
I uploaded the image somewhere else, hopefully you can see it now.
while(signatureEmpty){cout<<wittyComment();}
nathanf534
Posts: 199 Joined: Tue Dec 09, 2008 2:55 am
Post
by nathanf534 » Fri Jun 25, 2010 7:06 pm
Everything seems to be working now... I just pressed a bunch of buttons in blender, converted to quads, and back to triangles, and poof, it worked
while(signatureEmpty){cout<<wittyComment();}
joshcryer
Posts: 46 Joined: Thu Sep 13, 2007 8:57 am
Contact:
Post
by joshcryer » Sun Jun 27, 2010 6:17 am
I assume you recalculated normals outside?
nathanf534
Posts: 199 Joined: Tue Dec 09, 2008 2:55 am
Post
by nathanf534 » Sun Jun 27, 2010 10:00 pm
yep, I checked that, you can't see the triangle on either side, so normals wasn't the problem. Also, I began seeing the problem again, so I downgraded to Irrlicht 1.6.1 and its working fine.
while(signatureEmpty){cout<<wittyComment();}
hybrid
Admin
Posts: 14143 Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:
Post
by hybrid » Sun Jun 27, 2010 10:10 pm
What's the original file format of this mesh?