Animation causing undesired clipping

In my game, the players can crouch and have an animation and when another player sees this over the network, if they view down from the top of the head, the geometrys are being clipped how they would beif the player was still standing. So I can so the geometries dissapering and reappearing. Is there any way around this?

It’s not clear from your description what the root cause of the issue is.

Clipping generally has to do with the camera, not with networking or animation.

A few questions:
(1) Could you provide a screen-shot which illustrates the issue?
(2) Does the issue occur only across the network, or can you reproduce it locally?
(3) What’s the distance from the camera to the clip plane, and how does this compare with the near limit of the camera’s frustum?

@sgold said: It's not clear from your description what the root cause of the issue is.

Clipping generally has to do with the camera, not with networking or animation.

A few questions:
(1) Could you provide a screen-shot which illustrates the issue?
(2) Does the issue occur only across the network, or can you reproduce it locally?
(3) What’s the distance from the camera to the clip plane, and how does this compare with the near limit of the camera’s frustum?

To be a little more specific, this sounds like a near-frustum issue. If you could answer sgolds question and provide the camera setup, you’ll likely get a resolve to this quickly.

To me it sounds that parts of the models slip trough the terrain when animated…

This is something I’ve written into my workflow to address eventually, but since I’m not there yet; i assume what J monkey is referring to:

Lets say: Left side is A player, right side B can be anything, npc, object, or another player

Desired effect, A’s camera bumps into other mesh and does not “dig” into B: (A)(B)

Camera A Clipping into B mesh, making it “disappear and reappear”: (A)B)

@sgold said: It's not clear from your description what the root cause of the issue is.

Clipping generally has to do with the camera, not with networking or animation.

A few questions:
(1) Could you provide a screen-shot which illustrates the issue?
(2) Does the issue occur only across the network, or can you reproduce it locally?
(3) What’s the distance from the camera to the clip plane, and how does this compare with the near limit of the camera’s frustum?

I will test it locally first thing tomorrow. But to clear things up… The network most likely has no effect because all the rendering and animations is done be the client. So when my crouch animation plays the mesh moves down, but the location stays the same. If I line the top of the viewport with the player (at any distance) the geometries that make up the model are clipped too early. The problem is more evident at longer distances because more of the object can be at the top of the view port. My model has about 15 geometries so you can see each one take a turn disapearing. I hope this clears it up.

I think a screenshot would help me understand what you mean by “clipping”.

1 Like

By the way, I am not sure if this is the issue, but jME3 computes bounds based on the bind-pose of the model. If an animation exceeds these bounds, then the model will be clipped incorrectly when the camera frustum no longer contains the model’s bind pose bounding volume.

This is the issue tracker entry if you’re interested:
http://code.google.com/p/jmonkeyengine/issues/detail?id=343

1 Like