Object is not fully seen

Started by subhalakshmi27, July 10, 2012, 12:15:49 PM

Previous topic - Next topic

subhalakshmi27

Hi All,

I am using bones in my android project. My object is very near to the camera, as it is close to the camera, object is not fully seen. Camera radius is calculated based on the height of the object.

float[] bb = calcBoundingBox();
      Log.d(TAG, "autoAdjustCamera: Bounding box="+bb.toString());
      
      float groupHeight = bb[3] - bb[2];
      Log.d(TAG, "autoAdjustCamera: groupHeight="+groupHeight);
       
      cameraRadius = calcDistance(camera, frameBuffer,
              frameBuffer.getHeight() / 1.5f , groupHeight);
        minCameraRadius = groupHeight / 10f;
        cameraTarget.y = (bb[3] + bb[2]) / 2;

I noticed the width and height obtained from  skin.getMesh().getBoundingBox(); is very small values but the actual object is not a small object.

07-10 15:44:35.070: D/BlendShape(5727): height min-7.421923

07-10 15:44:35.070: D/BlendShape(5727): height max-0.5732739

07-10 15:44:35.070: D/BlendShape(5727): width min-1.96085

07-10 15:44:35.070: D/BlendShape(5727): width max1.96652


Please let me know if there is any issue in calculating the camera radius or there is any issue in my model.

Thanks and Regards,
Subha

EgonOlsen

How about a screen shot. I've no idea what "not fully seen" actually means....can be everything.

subhalakshmi27

Hi Egon,

I am attaching the screen shot. I think I found the root cause.

I found that in default skeleton pose, the character has legs up and hands closed. And in animation the legs are down. The height is calculated on default pose and I got small value, and the camera is placed based on it. And on animation the legs are not seen. I have asked the animation designer to give the default pose with hands opened and legs down.

Can you please let me know if my analysis is correct.

Thanks and Regards,
Subha

[attachment deleted by admin]

EgonOlsen

I still don't get the problem...if you move the camera to a position where the legs will leave the screen when animating it, then what do you expect? That the screen extends itself...?... ;)
If this is an animation related problem (i.e. if you are using Bones für this), please post in the Bones sub-forum instead. I've not much clue about Bones.