I have observed an bug when i using the latest sofa v12.16. When i zoom in, the objects start disappearing at a const speed. I have screen captured a short video below:
P.S. This doesn’t happen when i run the same scene file using the older version of sofa(v 12.15).
Anyone know about this error?
Thanks in advance!
Thank you very much for this video that helps a lot!
It seems to be a problems related to the camera, and more especially to the params znear and zfar (actually znear mainly).
Both znear and zfar are computated from the bounding box (BBox) of the scene, itself computed from your MechanicalObject. In your video, the value of znear seems to change change, which means that the BBox changes due to a moving MechanicalObject.
A quick fix would be to set yourself a fix value of the parameter bbox of your MechanicalObject, e.g.:
<MechanicalObject name="myMO" bbox="0 0 0 10 10 10" />
Let me know if this helps.
Thank you very much for the feedback!
Unfortunately, this bug still exists even when i add the fixed bbox for every MechanicalObject in my scene.
I also tried printing out the znear and zfar values of the InteractiveCamera(p_zNear in the InteractiveCamera.cpp). The result is attached below:
It seems like the znear and zfar value keep increasing from the start of the animation. The above video shows that value increasing when i just moves the mouse.
Indeed, something seems to move in your scene, thus affecting the bbox computation, i.e. visualization.
Could you share with us here your XML scene ?
If the value increases when you are moving the mouse, the problem might come from one of your draw() functions.
You must be logged in to reply to this topic.