x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Animation jitter when far away from world origin

This can apparently be fixed by using world origin rebasing, too bad I can't use it because the game is supposed to be a multiplayer game.

The weapon is attached to the hand_r bone and hand_r bone is transformed so that the rotation matches view rotation (using set bone rotation in world space).

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. The error is too great even at just 3 km away from the origin.

Are there any plans to fix/improve this, or am I doing something wrong? Should I try to fix world origin rebasing so that it works online too? I think all animations and rendering should happen relative to the current active camera, so that the camera location is the world origin for rendering and animation work.

Product Version: UE 4.9
Tags:
more ▼

asked Sep 18 '15 at 11:41 AM in Bug Reports

avatar image

jonimake
126 11 19 26

avatar image BobJoel Nov 07 '15 at 08:15 PM

Can't see how this has been resolved. I think it's correct to say the Shooter Game project doesn't rely on animation based aiming, which is when camera / weapon alignment starts to suffer. I suspect any project attempting "true first person" will run into this issue with precision or the 1-frame lag experienced with attachments / mesh space transformations.

I don't expect these issues to be fixed any time soon - don't know that they could really be called bugs. Would just like to request robust support for screen space animation.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Hi jonimake:

If I understand your question correctly, the following paragraphs answer your question *from the documentation located here: World Composition

World Origin Shifting

The World Composition editor supports shifting of the world origin by some arbitrary amount. Shifting the world origin results in adding an offset vector to all registered Actors in the world. Each Actor has an ApplyWorldOffset function which can be overridden in the child classes to do additional things. In case you have created a new AActor derived class and store absolute position values in it, you have to override ApplyWorldOffset function to make it work correctly with world origin changes and shift your absolute values in it. Rendering and physics primitives will be shifted in parallel to Actors in game thread.

Big Worlds and Multiplayer

Right now world origin shifting is not supported in the multiplayer games. Here are two solutions that can be imWoplemented for your specific needs:

  1. Implement your own server solution. MMO licensees mostly do this.

  2. Implement some layer between clients and unreal dedicated servers which will transform shifted absolute positions from the clients and route them to the right dedicated server, which only holds part of the world where client is.

However if you disable world origin shifting, you can run a tiled world with a dedicated server. Dedicated servers will load all distance dependent levels, and each connected client will work as usual loading only level that satisfy streaming distance settings. A server holds a list of visible levels for each client and filters Actor replication by this list.

more ▼

answered Sep 22 '15 at 05:51 PM

avatar image jonimake Sep 22 '15 at 08:02 PM

Ah, I my post might've been a bit hard to read, I accidentally deleted the old one and wrote that one hastily.

The main problem that prevents me from working on the game is the animations breaking apart like in the videos. I need the animations to be smooth with the first person mesh, but they aren't like you can see in the videos. The weapon is attached to the character mesh hand, and the hand is transformed so that its world space rotation matches camera rotation. That way the weapon sights are aligned properly. The animation starts to break apart when the player is only 3 km away from the origin, like you can see in the video. The player can't aim with weapons if the weapon sights don't point the same way the camera does. The broken animations are clearly evident when the player moves even further away from world origin like in the 8 km video I posted.

I only mentioned world origin shifting because it fixes the animation jittering (by setting world origin to the camera location), but I can't use it because the game is supposed to be a multiplayer game.

If I can't use world origin shifting due to game being a multiplayer game (and I lack the know-how to make origin shifting work in multiplayer), how can I fix the animations so that they don't break when the player is far away from world origin?

Are there any planned fixes for this?

avatar image Steve Hardister ♦♦ STAFF Sep 23 '15 at 07:49 PM

Hi jonimake,

I have not been able to reproduce this effect using the 1st person blueprint template, maxing the "floor" plane out to the corners of the default grid. Can you send your file so we can observe this issue here? You can provide your project in a zip file as an attachment here, if small enough, or via dropbox, or as an attachment in a private message to me on our forums.

Providing your files would be a great help in isolating the cause of this issue. -Thanks

avatar image jonimake Sep 23 '15 at 10:01 PM

Sent you a PM on the forums. I'm personally not convinced that I'm not doing something wrong with the anims though. I'm setting the world space translations and rotations of bones so I guess that could cause the problem I'm having. Are there any animation best practices guides or something, rather than just purely technical guides about the editor tools?

avatar image Steve Hardister ♦♦ STAFF Sep 28 '15 at 09:03 PM

The best source I can point to is The Shooter Game project. I have moved the character to exteme parts of the map without experiencing the jittering that you see with the way you have your character set up. My advice would be to examine the way the character is set up emulate it as close as possible.

avatar image Kory Oct 12 '15 at 09:42 PM

We are having this same exact problem and it appears to be something with attaching meshes to objects. How is your gun attached? For us it is the optics that causes issues and the gun movement is smooth but the optics jiggle around on the gun itself even though they were properly attached.

avatar image BobJoel Nov 07 '15 at 08:37 PM

Can't see how this has been resolved. I think it's correct to say the Shooter Game project doesn't rely on animation based aiming, which is when camera / weapon alignment starts to suffer. I suspect any project attempting "true first person" will run into this issue with precision or the 1-frame lag experienced with attachments / mesh space transformations.

It's moving away from a bug fix, but there should be support for screen space coordinates / transforms that would allow "animation driven" 1st person views to at least function at parity with systems where the 1st person meshes have been parented to the camera.

avatar image Steve Hardister ♦♦ STAFF Nov 09 '15 at 07:03 PM

Hi BobJoel,

This issue was reported as a bug and determined not to be a bug, so in that sense it is resolved. In which case if the user (or anyone else) wanted further support on the correct way to set this up, they would need to add a new post under "Using UE4" or "Everything Else."

As it happens, while looking into this I ran across this video that I believe explains how to achieve what you are trying to accomplish with animation based aiming: https://www.youtube.com/watch?v=haA6vYgbEw0

If it does not, as I mentioned above, please start a new post in the appropriate AnswerHub section and call it something like "The best way to set up animation based aiming."

Thanks, Steve H

avatar image jonimake Dec 14 '15 at 01:15 AM

So are there any plans to improve the precision of animations when the player isn't close to the origin? I mean, the game "Squad" (http://joinsquad.com/) is also suffering from the jittering when player isn't near the world origin. I read that it's making it hard to use gun sights because they jitter around.

Also, I did post this under "Using UE 4", but nobody ever answers there. https://answers.unrealengine.com/questions/295661/bone-rotation-jitter-after-aim-offset-transform-bo.html

Are there any plans to improve the precision of animations when the player isn't near the world origin? Do you understand the problem that is happening? The fact is that the floating point precision of the FTransform class, that is used for everything, isn't high enough when player isn't near origin. The imprecision causes the jittering. This jittering happens even if you just attach a mesh to the player, it doesn't have to be animated.

avatar image Steve Hardister ♦♦ STAFF Dec 15 '15 at 03:50 PM

The answer to the initial question is, as stated above, "Right now world origin shifting is not supported in the multiplayer games." It has been hinted that this will change in the future, but no timeline has been set. As for the second part of the question, "Should I try to fix world origin rebasing so that it works online too?" -This would be great, if possible, and could even be released on the Marketplace as a plug in (for incentive).

Focusing on single player games, the value was changed from being around 3.5-4 km from the world origin to 20 km from the origin in UE 4.8, so if you are experiencing an issue with your animation based aiming jittering within these parameters, please re-examine your set up as this has been proven to work for UE4.8 on.

However, if you feel this feature is not functioning as expected, please provide steps to reproduce the bug on our end and we will investigate to see if World Origin Shifting has regressed and needs to be corrected for single player mode in current releases of the engine.

Finally, since this thread is getting long, and away from the initial question, please start a new thread to discuss the proper set up for Animation Based Aiming for true first person. Here's one solution posted by a user on reddit that I feels addresses the issue:

https://www.reddit.com/r/unrealengine/comments/2znb6k/creating_aiming_for_true_fps_project/

While discussion of this and other solutions is encouraged, please start and discuss this on a new post so those solutions won't be "buried" within this thread.

-Thanks

avatar image nkey May 01 '16 at 04:48 PM

Here https://forums.unrealengine.com/showthread.php?109335-Pull-Request-World-Origin-Shifting-in-MP some solution for multiplayer and world origin shifting.

avatar image Steve Hardister ♦♦ STAFF May 02 '16 at 02:10 PM

For future reference, here is the official "World Origin Shifting for Multiplayer" feature request: JIRA [UE-13079].

avatar image Jin_VE Apr 17 '17 at 06:54 PM

Just for completion's sake, anyone reading this should be aware: origin shifting has been partially implemented for multiplayer. That PR was eventually merged into 4.14. There are still limitations but they go beyond the old ones apparently.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question