Author Topic: Object is not fully seen  (Read 896 times)

Offline subhalakshmi27

  • byte
  • *
  • Posts: 21
    • View Profile
Object is not fully seen
« on: July 10, 2012, 12:15:49 pm »
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
« Last Edit: July 10, 2012, 12:19:55 pm by subhalakshmi27 »

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11748
    • View Profile
    • http://www.jpct.net
Re: Object is not fully seen
« Reply #1 on: July 10, 2012, 12:48:02 pm »
How about a screen shot. I've no idea what "not fully seen" actually means....can be everything.

Offline subhalakshmi27

  • byte
  • *
  • Posts: 21
    • View Profile
Re: Object is not fully seen
« Reply #2 on: July 12, 2012, 03:16:35 pm »
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]

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11748
    • View Profile
    • http://www.jpct.net
Re: Object is not fully seen
« Reply #3 on: July 12, 2012, 09:02:26 pm »
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.