You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please
read the bug posting guidelines first.
bitplane
Admin
Posts: 3204 Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:
Post
by bitplane » Thu Aug 20, 2009 5:25 pm
A couple of minor changes and it's now in the 1.6 branch-
1) I made it check whether to normalize based on the NormalizeNormals parameter of the material, which will also help for debugging purposes.
2) I had to change all your tabs to spaces, which was mildly annoying!
Thanks for the patch
pc0de
Posts: 300 Joined: Wed Dec 05, 2007 4:41 pm
Post
by pc0de » Thu Aug 20, 2009 7:33 pm
Thank you.
bitplane wrote: 2) I had to change all your tabs to spaces, which was mildly annoying
Sorry about that, I neglected to run the files through unexpand. It won't happen again.
bitplane
Admin
Posts: 3204 Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:
Post
by bitplane » Sat Aug 22, 2009 2:51 pm
Your patches and bug reports are a pleasure to deal with, I think I speak for everyone when I say we appreciate your contributions
randomMesh
Posts: 1187 Joined: Fri Dec 29, 2006 12:04 am
Post
by randomMesh » Mon Sep 21, 2009 6:42 am
The normals of the cylinder mesh look totally wrong to me (trunk, rev. 2696):
Small test code
Code: Select all
#include <irrlicht.h>
int main()
{
irr::IrrlichtDevice* device = irr::createDevice(irr::video::EDT_OPENGL);
irr::scene::ISceneManager* smgr = device->getSceneManager();
irr::video::IVideoDriver* driver = device->getVideoDriver();
smgr->getParameters()->setAttribute(irr::scene::DEBUG_NORMAL_LENGTH, 0.5f);
smgr->getParameters()->setAttribute(irr::scene::DEBUG_NORMAL_COLOR, irr::video::SColor(255, 255, 0, 0));
irr::scene::IMesh* const cyl = smgr->getGeometryCreator()->createCylinderMesh(0.5f, 2.0f, 8);
irr::scene::IMeshSceneNode* node = smgr->addMeshSceneNode(cyl);
node->setDebugDataVisible(irr::scene::EDS_NORMALS);
cyl->drop();
irr::scene::ICameraSceneNode* camera = smgr->addCameraSceneNode();
camera->setPosition(irr::core::vector3df(0.0f, 0.5f, -4.0f));
while (device->run())
{
driver->beginScene(true, true, irr::video::SColor(255, 255, 255, 255));
smgr->drawAll();
driver->endScene();
}
device->drop();
return 0;
}
"Whoops..."
pc0de
Posts: 300 Joined: Wed Dec 05, 2007 4:41 pm
Post
by pc0de » Mon Sep 21, 2009 4:29 pm
This looks like a bug in how createCylinderMesh() is generating the normals, not with how they are being displayed.
hybrid
Admin
Posts: 14144 Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:
Post
by hybrid » Mon Sep 21, 2009 7:29 pm
Yes, but that's also what the post wanted to tell us AFAIK. I guess it's a best shot for the number of vertices available, though. So we can either increase the number of vertices, or take slightly wrong lighting. I'm for both solutions, btw., because both could be useful. We need a proper geometry creator with properties for this first. So don' hold your breath for this bug being fixed...
randomMesh
Posts: 1187 Joined: Fri Dec 29, 2006 12:04 am
Post
by randomMesh » Tue Sep 22, 2009 7:16 am
hybrid wrote: Yes, but that's also what the post wanted to tell us AFAIK.
Yes. I realize that this has nothing to do with the original topic.
hybrid wrote: So don' hold your breath for this bug being fixed...
I won't. He will do.
"Whoops..."