Improve skeletal mesh animation when far away from world origin

Skeletal meshes jitter and stutter a lot if the player is far away from the world origin. By far I mean 3km. There’s a noticeable stutter in bones that are supposed to stay still relative to camera. I could mask this by playing some anims, but it doesn’t help if I need visual precision on the player screen (think of weapon iron sights, they can’t stutter if the player moves his mouse by one pixel). World origin rebasing fixes this, but it only works in singleplayer. Would it be possible to have some sort of origin rebasing only for the local player animations so that the stuttering wouldn’t happen?

My original problem thread here: Bone rotation jitter after aim offset + transform bone - Animation - Unreal Engine Forums

Soooo, any comments? Would it be feasible to calculate all skeletal mesh animations so that the world origin was the current camera view, instead of level origin?
Or do I just have to bite the bullet and make the world origin rebase system to work properly in multiplayer?

You might want to show a video of the problem or something, as I just tested my skeletal mesh animation at 3km+ with World Composition and I am not seeing any jittering. I did originally experience jittering of skeletal meshes when I did not attach the camera the actor in question, but thats the closest ive seen.

I can’t use world composition and origin rebasing because the game is a multiplayer game. That’s the problem.

The weapon is attached to the hand_r bone and hand_r bone is translated so that the rotation matches view rotation.
Distance from origin 3 km: https://youtu.be/6neMRwoHEng
Distance from origin 8 km: https://youtu.be/HCZKD-GCFSk
50 meters from origin: http://youtu.be/h5CHQgU2V5w

I can’t have any precise animation driven aiming of weapons because of the floating point precision errors when you’re far away from the origin. I wouldn’t mind if this would happen with 3rd person anims only, but since it’s a first person view the stuttering is very noticeable.

You can use World Composition in multiplayer without Origin Rebasing. All World Composition does without Origin Rebasing is take care of streaming levels in and out based on location. I am using World Composition, and am not using Origin Rebasing either. I have tested from 3km, and 6km. Unfortunately I cannot test out to 8km as my world is not that big yet. I will try with some aiming anims and see how it looks, but as I said, I did not notice any major jittering like your videos.

I don’t actually need world composition. I just need origin rebasing. In the editor rebasing option is greyed out unless you enable world composition also.

Anyway, I’ve been thinking about this and right now I’m debating with myself if I should just try to convert the existing coordinate system to use doubles instead of floats or or do some kind of large world coordinate system with automatic rebasing.

Okay firstly, I wasn’t telling you what you need/don’t need. I was just letting you know that World Composition does not mean Origin Rebasing (As you pointed out, Origin Rebasing requires World Composition, but World Composition does not require Origin Rebasing). So I was just trying to tell you what my setup is (That is World Composition without Origin Rebasing). Since it seems you are experiencing precision issues and I appear not to be, and we appear to have similar setups (Ignoring the fact that I have World Composition enabled - In both cases, we are a long way away from the Origin).

So that would say that there may be something else at play here and precision may not be the likely cause - Epic increased the level limit from roughly 4km (or so) to 20km around v4.5 so you would suspect that precision would have been one of the things they were testing.

To make sure I understand you right:

  • when the player is 8 km from the origin, the hand and the weapon do not move together – you can see the hand vs the weapon stutter when turning
  • when the player is close to the origin, the hand and the weapon appear to move together – there’s no visible jerkiness when turning

This looks like a bug to me. I’m not sure it’s skeletal mesh based; it could be anywhere in the rendering pipeline. All rendering coordinates should be camera-relative, which means that the precision isn’t a problem.
So, I would suggest filing the 8km-movie and 50m-movie as a bug on AnswerHub, saying “animated movement is jerky when far from the origin” without necessarily calling out skeletal animation.
You might also want to include the project/assets you’re using to reproduce the bug, in the bug report. There may be something else going on.

That’s what I hope, but doing a rendering coordinate transform each frame for all scene components sounds like a hefty perf drop. Either way, I hope some Epic dev chimes in on this: whether they could improve the skel mesh anim system precision or make origin shifting work with multiplayer.

That should all be baked into the World matrix for rendering. All the animation/math should be done in local coordinates.
It looks like some math is pushed into world coordinates and then back into local, which is never the right thing to do.

For physics, you’ll want to do a coordinate transform when the player is more than 1 km or so from the previous origin – you don’t need to do it each frame.

Hopefully someone from Epic can chime in on this. Meanwhile I’ll just continue working on modifying the existing origin rebasing.

Ca you help me how to make iron sight camera? Thank you.

No, I can’t.

Hello, I’m suffering the same bug For A long times, do you have got a solution. Would you mind share with me?Thank you