[fixed]Animated bounding boxes for instancied meshes bug

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.
Post Reply
Darktib
Posts: 167
Joined: Sun Mar 23, 2008 8:25 pm
Location: France

[fixed]Animated bounding boxes for instancied meshes bug

Post by Darktib »

Hello,

I have a scene with 3 entities. Each entity use the same animated mesh (extracted from ninja.b3d, irrlicht media folder). There is a big bug with the bounding boxes. Buffer bounding boxes are wrong, and so the object bounding box is wrong too.

I think this bug comes from the way animated meshes are handled : first they are animated correctly, and then the second pass render() the bounding boxes. But bboxes are updated in the wrong order.

I use only smgr->drawAll() for rendering, and setPosition/Rotation/Animation start, end and speed.

Here is a short (but heavy, 28 Mb compressed) video describing the bug: http://www.mediafire.com/download.php?qjz1zzej2mn

For me there is a workaround : I use the buffer bbox for unit selection, and I can recalculate every bbox before handling selection.

Code: Select all

irr::scene::IMesh* m = node->getMesh()->getMesh(node->getFrameNr());
	for(unsigned int i = 0; i < m->getMeshBufferCount(); i++)
		m->getMeshBuffer(i)->recalculateBoundingBox();
But this slow down fps...
Last edited by Darktib on Fri May 29, 2009 5:45 pm, edited 1 time in total.
Darktib
Posts: 167
Joined: Sun Mar 23, 2008 8:25 pm
Location: France

Post by Darktib »

No idea(s) ?
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

Well, it looks like it could be a bug and maybe even for the reason you said. Still it would be nicer to have a compiling code example than a video. Could you put your example online?

Also - don't be afraid of using the bugtracker :-)
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Darktib
Posts: 167
Joined: Sun Mar 23, 2008 8:25 pm
Location: France

Post by Darktib »

OK, I will put it on the bugtracker with a testapp
Steel Style
Posts: 168
Joined: Sun Feb 04, 2007 3:30 pm
Location: France

Post by Steel Style »

Darktib
Posts: 167
Joined: Sun Mar 23, 2008 8:25 pm
Location: France

Post by Darktib »

Thank you, I will test it asap
Steel Style
Posts: 168
Joined: Sun Feb 04, 2007 3:30 pm
Location: France

Post by Steel Style »

I make it cleaner on the tracker :
http://sourceforge.net/tracker/?func=de ... tid=540678

Also I'm asking for the dev to be carefull at the comment cause this patch work but we can also make some change at the API (adding changing function) to have something better.
Post Reply