You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers. No questions about C++ programming or topics which are answered in the tutorials!
Hi, i`ve got problem with bounding boxes in skeletal-animated .x files.
X file was created in 3ds max 9 with X format exporter it includes skeletal animation. Running following program occurs in wrongly placed bounding box. Bounding box does not change during animation.
Ok. I get it. Recalculating bounding boxes would slown down any game, but i would like recalculate bounding box once at begining and use more proper then shown at picture. Is it possible?
Yes, we will work on this issue. There should be an initially correct bbox, and the possibility to update the bbox during animation. This part was skipped in the new animation system as of now due to some difficulties which came from the new structure and algorithm.
Sorry for bringing this problem back to limelight, but I am wondering if a solution exists for the bounding box problems for .x meshes.
Other formats like .3ds displays correct bounding box, but for the .x the bounding box is incorrectly placed. it shows up somewhere near 0,0,0 origin, whereas my object is located far away from the bounding box.
Also I the bounding box doesn't change while the .x file is animating.
Due to the above problem, my collisions don't work with Bullet properly.
Are you using getBoundingBox or getTransformedBoundingBox? the first one will always give you a bounding box around the origin, the latter should give you a correct bounding box for your model (not necessarily animated though)
The issue is that I can see that the bb is incorrect just by setting node->setDebugDataVisible(scene::EDS_BBOX);
(This is not even in bullet. Its just plain Irrlicht). That too, the actual mesh is visible at, 0,2,5, but the bounding box is somewhere at 0,0,0. So clearly, there's no relationship between the object and bounding box. And as I said earlier, the same mesh gets correct bounding box if its a .3ds file (non-animated). But if I use .x, it shows incorrect bounding box (both static and animated .x meshes have this problem.) I use Panda Exporter for exporting .x
I tried that before and I didn't help, and that's why I actually posted that question because I thought I may not have used that function properly, and thus I wanted to know if that will help solve the problem.
At this point, I am still confused.. Has anybody else faced such a problem with .X mesh? Or is it only me? If its only me, then what could be the issue?
not only You. I have the same problem, but I export X mesh with scale(100%, 100%, 100%) and use bullet physic to get correctly boundingbox with animation. I had problem with correctly render mesh if I use different (like -100%) scale values.