Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flickering of textures and part of models when imported 3D model is big #33727

Closed
qarmin opened this issue Nov 19, 2019 · 5 comments
Closed

Flickering of textures and part of models when imported 3D model is big #33727

qarmin opened this issue Nov 19, 2019 · 5 comments

Comments

@qarmin
Copy link
Contributor

qarmin commented Nov 19, 2019

Godot version:
Godot 3.2 Beta 1
OS/device including version:
Ubuntu 19.10, both GLES 3 and GLES 2
Issue description:
When I imported to Godot model with default scale(in Godot model appears as sphere with radius +- 11000 units), then when I change camera position, model starts flickering
jfile

flickering only appears when camera is far away, when camera is close to objects, there flickering disappears

jfile

but when I change scale to 0.01, then flickering gone
jfile

I think that can be related to double precision floats, but I can be wrong.

Minimal reproduction project:
tiki_treasure.zip

@Calinou
Copy link
Member

Calinou commented Nov 19, 2019

If you're working at a large scale, you'll want to increase the camera's Near value (both in the Camera node and the editor camera using the View menu). If it's too high, objects will be cut off when you get close to them, so you need to find a balance.

@lawnjelly
Copy link
Member

It looks like z buffer fighting. You need to tune the near and far values of cameras you are using (both the IDE viewport and the game cameras) according to size of the world you are using (or rather your desired view distance).

This isn't really a bug per se, it's just how z buffers work. With godot (and most standard setups) you have more z precision close the camera than further away, hence less z fighting closeup.

Instead of fixed near / far, you could have a viewport camera in the IDE (or in game for that matter) that dynamically adjusts near and far planes according to the camera position / world size, but that might cause issues itself.

@aaronfranke
Copy link
Member

This is expected, but it might be solved in the future, see the discussion in #33207. What I would love to see is multiple cameras per viewport implemented, and used in the editor, so that we can have ultra-large and small scales at the same time without flickering.

@Calinou
Copy link
Member

Calinou commented Nov 19, 2019

I think it's mostly a documentation issue right now. We should find a documentation page where we can mention caveats related to large-scale rendering (and how to configure Godot to make it more suitable for this). See also godotengine/godot-docs#2808.

@Calinou
Copy link
Member

Calinou commented Sep 1, 2021

This caveat is now documented in 3D rendering limitations, closing.

@Calinou Calinou closed this as completed Sep 1, 2021
@Calinou Calinou added this to the 3.3 milestone Sep 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants