Page 1 of 1

B3D levels and pick objects inside him

Posted: Sat Mar 22, 2008 3:25 pm
by link3rn3l
use B3D levels develop with http://www.blitzbasic.com/Products/maplet.php
not work with this funtions

getSceneNodeFromScreenCoordinatesBB
getSceneNodeFromCameraBB


i like point MD2 objects inside B3D levels but not work,,

only work with BSP levels ,, why?

possible bug?

Posted: Sat Mar 22, 2008 11:17 pm
by hybrid
Yes, skinned meshes have problems with bounding boxes and getMesh(x) calls, but no hot-fix, yet.

Posted: Mon Mar 24, 2008 3:00 am
by Luke
I cannot see how this could be related to the bounding boxes problems.

could you post an example or some code and the mesh?

Posted: Mon Mar 24, 2008 9:35 pm
by hybrid
The bounding boxes are not correctly calculated and updated for Skinned Meshes. Just check the meshes in the meshviewer with enabled debug output.

Posted: Tue Mar 25, 2008 3:39 am
by link3rn3l
Luke wrote:I cannot see how this could be related to the bounding boxes problems.

could you post an example or some code and the mesh?

test working:

1. load q3 bsp as octree
2. load md2 as animatenode
3. test camera point functions

all working

test error:

1. load b3d level as octree
2. load md2 as animatenode
3. test camera point functions

function not return nothing



Why not working, if all test is load with octreee??

only work with q3 bsp maps?


is more easy create b3d levels

P.D.: the b3d test mesh is included in maplet :
http://www.blitzbasic.com/Products/maplet.php





..

Posted: Tue Mar 25, 2008 10:17 am
by hybrid
So what happens if you don't use an octree. There had been several error reports about octree loading. Also show your full code (the actual C++ code you use), because it might just happen that you create an empty octree selector instead of a wrong one.

Posted: Wed Mar 26, 2008 12:03 am
by Luke
The bounding boxes are not correctly calculated and updated for Skinned Meshes. Just check the meshes in the meshviewer with enabled debug output.
why aren't they correctly calculated? and being updated isn't a problem, as it's a static mesh.

anyway I'll have a look

Posted: Wed Mar 26, 2008 12:08 am
by hybrid
I think the bounding boxes are calculated based on the binding pose of the animation. Using the getMesh(0) method you get the first frame, i.e. the transformed mesh.

Posted: Thu Mar 27, 2008 9:22 am
by hybrid
Ok, the only b3d file I found with a (just slightly) incorrect box is the beast model from Psionic. You can see that one leg is outside the bbox in the initial frame. .x has far more problems due to initially transformed submeshes.