Godot: Black lines flickering on mesh surface during movement

Created on 25 Jan 2019  路  9Comments  路  Source: godotengine/godot

Godot version:

3.0.5

OS/device including version:

Mac OS X 10.14.2
Radeon Pro Vega 20 4080 MB

Issue description:

When composing a scene in GDScript by placing meshes aligned with each other, black lines appear on the surface of these meshes when under a DirectionalLight. These lines always appear on the surface of the mesh that faces the directional light, and are always horizontal (x-axis, never on the y or z axes).

Here are some screenshots of the lines:

image
image
image

Link to video with the problem

Steps to reproduce:

Open minimal reproduction project and play to reproduce.

Or in your own project, place simple cube meshes through GDScript, a DirectionalLight facing the top, and move a camera affixed to a KinematicBody on the surface.

Minimal reproduction project:
flicker.zip

bug rendering

All 9 comments

FWIW: this does not occur when using the built-in meshes in Godot, only when importing a cube mesh from Blender. I've tried all formats (.dae, .glx, .obj) which all give the same flickering effect. Unfortunately, can't use the built-in mesh for this project since it does not have 6 surfaces to paint material on.

Thanks to Alastor001 on Reddit, I tried this sample project in the master build of Godot and can confirm that the issue does not occur on v3.1.beta.

Closing as fixed then. If someone manages to reproduce the original issue, this issue might be reopened.

I spoke too soon, the issue is still prevalant on 3.1beta3 or master builds, just appearing at the different positions and offsets :( @bojidar-bg Repro is the same as before, can we re-open?

Reopening as per the comment above.

This seems to be due to floating point inaccuracies from the imported mesh, try disabling compression in the mesh import options.

You can also snap the mesh to grid in Blender after selecting the entire mesh and zooming in so the grid is the level you want to snap to:

  • Shift+S -> selection to grid
  • Space -> type "selection to grid"

@anantn Does following @kaadmy's advice solve the issue?

@kaadmy @Calinou Thanks for the tip! Unfortunately, it doesn't seem to help. I am using "OBJ As Mesh" in the Import As dialog and there is no disable compression option, am I missing something?

I also tried snapping the mesh to grid but the line artifacts still appear. This continues to happen on the latest version (3.1.2.stable)

It seems this occurs even when not using an import from Blender. I tried using a simple cube ArrayMesh with the same results.

Was this page helpful?
0 / 5 - 0 ratings