godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
89.47k stars 20.25k forks source link

Animated mesh strange behaviour #20114

Open khairul169 opened 6 years ago

khairul169 commented 6 years ago

Godot version: v3.1.dev.custom_build 0b7df80eb1b1f6415b397f0ac115da5014b7b8a8

OS/device including version: Windows 10 x64 Intel HD 4000 & GT 820M

Issue description: I'm currently developing a fps game with huge world, and when i am moving to far location, the mesh got strange result.

Mesh at position 0, 0, 0: test6

And when it's transform translated into 2048, 0, 0: test4

It was not happening when the mesh doesn't belong to armature node or exported without animation. test5

Steps to reproduce:

  1. Import an animated mesh, then instance it into the scene.
  2. Translate the mesh x origin to 2048 or more.
  3. See the magic happens.

Minimal reproduction project: sample.zip

CptPotato commented 6 years ago

Might be related to float/half precision. (just a thought)

reduz commented 6 years ago

this is floating point precision, wont be dealt with throuhgly until 3.2

tom-jk commented 4 years ago

Testing MRP, below are very rough impressions of how this issue presents. Test involved opening test.tscn and moving the test node along the x-axis.

Testing on linux mint 18.3, GeForce GTX 750 Ti, driver: nvidia 384.130

3.1.alpha2 Can reproduce distortion seen in screenshots above. Distortion becomes noticeable close-up beyond ~256 units, from medium distance beyond ~400 units. No jitter when moving node, but distortion becomes severe at distances beyond ~1000 units.

Godot 3.2.2.stable Jitter when moving node becomes noticeable close-up beyond ~12000 units, from medium distance beyond ~60000 units. Non-moving distortion becomes noticeable close-up beyond ~30000 units, from medium distance beyond ~60000 units. (note that because of jitter, the distortion fluctuates in intensity as x-pos increases, so some positions may look good while nearby ones look bad.)

Takeaway: the sort of extreme distortion at middling distances described in original comment no longer appears.