I made lot of cubes in a mesh with vertices. When I tested with color textures I could clearly see the lot of annoying gaps and lines popping up while the Camera is moving.
The mesh looks like this:
This is what it looks like when the camera is moving:
As the gif shows, there are lines popping up, how can I fix this?
CodePudding user response:
Looks like "z-fighting". When two or more meshes overlap, placed very close together, rounding errors will cause them to fight when rendered. Possible solutions:
- Create one cube and give it a material/texture with the desired colors.
- Create three cubes on top of each other (do not let one, like the black one in your example, be bigger so it is overlapped by the red one).
- If you really want to overlap the cubes, make them slightly different in size so the rounding errors will not show up.