Screen 'Tearing' at Touching Parallel Planes in Sketchup Pro

Hello There,

I’m using Sketchup Pro 2020 and the touching parallel plane of two components with different opacity and color produces something that resembles screen tearing or flashing.

Please view the YouTube video demonstrating this effect and let me know if there is something that can be done to fix it.

Thank you.

YouTube Video Demonstrating The Issue

What you are showing is called Z-fighting. This occurs when your graphics card can’t decide which face is supposed to be in front of which because they share the same place. It’s trying to display both. You don’t see it when there’s only one material being displayed.

Is there anything that can be done to fix the problem besides creating a minute gap between the two surfaces - which is very cumbersome?

Also, why does it not happen with x-ray when the two components are different materials?

You could eliminate or hide one face.

It still happens in X-ray but it isn’t noticeable because of the way the GPU renders. FWIW, this isn’t specifically a SketchUp problem. It’s a thing with OpenGL and other rendering applications.

This approach won’t even work very well, the further the virtual camera is from the faces in question. When the gap between faces (or between a face and an edge just behind it) is less than, say 1/10000 (not a real number, just a ball-park value) of the distance between the front face and the virtual camera, then the geometry which is behind the front face will begin to bleed through and become visible.

Texture them the same? Remove one face?

Deleting the face works but hiding it makes the opaque block transparent from certain angles. I dont know why that happens.

What is the point of using a texture? Just deleting a face works.

It would make it appear transparent or at least hollow when a face is hidden since there isn’t anything preventing you from seeing inside it.

My mistake. The opaque block only appears hollow (transparent) when i set its opacity to 99%. I had set it to 99% because it fixes the Z-Fighting tearing (flashing) on the touching parallel plane.

This is an annoying anomaly if we can call it that. Does every cad program have it?

Not every CAD program has it. Many CAD programs don’t create faces.

It’s common in graphics rendering for 3D modeling, not just SketchUp.

I think the best solution is to place the troublesome faces in their own tag and then have the ability to easily toggle them on and off with one click.

Tagging geometry (faces and edges) is not the best modeling practice.

You made the faces there. That’s an option if you have a reason to have the faces together.

In a lot of real work cases SketchUp doesn’t have the problem either. In your example you have infinitely thin walls. If the dividing wall had any amount of thickness the problem would not happen. I tested that, and set up some bad flickering. With the wall made to be 1/2 inch thick, the flickering went away.

Yes. It can work. It can also create all sorts of problems but if the OP goes into it know that, no problem. It’s certainly his model.

I dont know what you mean by walls. There is vertices, edges, and planes. Normally in life objects lie on other objects and there is no gap between them unless you go into atomic physics.

For me having the ability to place the faces on a tag called z-fighting and then to be able to place the entire component as a whole on whatever other tag i want is just the easiest solution i can think of. Of course i could be wrong. Perhaps hiding is easier. The only way to know is to try both for a complex model and see which one makes more sense. The one thing that is clear to me is that the tearing is a major distraction that bothers me.

Normally in life you aren’t dealing with faces of no thickness sharing the exact same location, nor graphics cards rendering what you see.

FWIW, you don’t place anything on tags. You assign tags to…

You can certainly do that if it gets you what you want. Just be aware of the pitfalls of doing so. It sounds like you are already aware of the problems that can be created by assign tags to raw geometry so have at it.

Ok so i was planning on using transparency to more easily visualize the design im working on and not necessarily for applying it to objects like glass or water. The reason i was opting to avoid x rays is because sometimes its desirable to only see the x ray of a single object in the forefront and not the objects behind. However with the issues that may arise from assigning faces to tags, even though i dont know what they are, but that im listening to what you and other people have told me, then i guess i should avoid doing so.

Perhaps i will nix the whole idea altogether since i dont feel comfortable having objects that appear incomplete by hiding or deleting their faces. Instead i will just use tags and section panes for strategic viewing of more complex designs.

But ultimately i really think it is a shame that z-fighting happens with materials when as far as i can see it looks perfectly fine with x-ray. But i guess there is a reason why it does happen and fixing it is either impossible or too impractical. Who knows.

With Xray you see through to what’s behind, and whether it’s the first color blended with the second, or the second with the first, it will be consistent color. When you’re not on Xray both faces are an equal distance from the camera, and it’s down to very small number math as to which pixel will come from which face.

One solution that does work is to let the shared face belong to one of the groups and not both of them. Or make it be a third group.

I dont get it. Aren’t both faces also an equal distance from the camera when using x-ray?

I just tried using a green box attached to a magenta box and then applied the x-ray and from what i can see the green completely overtakes the magenta regardless of which angle is viewed. So its clear one face is taken over the other. So if it can be achieved with x-ray then certainly it can be achieved with transparent materials, either by SU or by the OpenGL developers.

However i just searched for z-fighting discussions about solutions and its a heavy subject which requires very technical knowledge that is beyond my scope. So i will accept the anomaly, because that is what it is, and just carry on.