2D geometry has shifting color

sample(1).skp (1.4 MB)

I am drawing a floor plan for a house in 2D, which I will later Push/Pull into 3D. I draw new geometry on a painted surface which represents the floor. When I paint the new geometry, it’s color mixes with the color of the floor surface. When zooming, the two colors shift in odd patterns. Is there a way to prevent this from happening when drawing in 2D? ( I know that if I give the geometry some thickness, the colors will not shift, but that creates too much complexity when placing and moving objects.)

My model is attached.

Thanks.

When I Orbit (not Zoom) I see a couple of places in the model where I see Z-fighting - two faces at the same or almost the same height, shimmering as I orbit around.

The face inside the rectangle surrounding the text Bench 14", and the small red dot below Sink Half Bath 12 x 18 are the two places I see behaving like this.

Are those the places you see changing colour? If so, you should raise the small faces a little above the ground plane, so it is clear to the OpenGL renderer which it should display. Usually a small fraction of an inch is enough - 1/16" or 1/8" should prevent the shimmering or colour blending as you zoom in or out.

The other possibility is that the apparent colours of faces in SU change depending on the direction of light and your viewpoint. That is normal.

You can change it but I don’t remember how - try searching this forum for ‘use sun for shading’.

You still have a lot of ‘loose geometry’ in your model. As soon as you draw something, make it into a component or group, to prevent it ‘sticking’ to other geometry.

And you have assigned visibility tags to loose edges and faces.

You should ALWAYS draw new geometry on the Untagged tag (formerly Layer0).
Here you have the default tag (the pencil icon) assigned to a different tag.


These issues will cause you grief later in your modelling.

Please view the Sketchup Fundamentals at the Learning Centre learn.sketchup.com before you go further, and fix your model before you try to edit it into 3D.

Wow, that’s a lot of information. For now, referring only to the color problem, the Z-fighting I see using SketchUp for Web, is ALL colors, both orbiting and zooming.

This attachment shows that.

I am familiar with the overall color changes resulting from shade while orbiting, and that is not what is happening here.

I understand that if I give my 2D objects a bit of thickness then Z-fighting stops. I tried that and it does fix the color problem, but it causes me a worse problem. As I pull guidelines, draw new geometry, and move geometry about, as careful as I can be, things do not remain snapped to the single surface I started with; I find that one 1/16" thick object is actually placed from the surface DOWN 1/16", while all the others are placed 1/16" UP from the surface; or if I have 4 guidelines forming an apparent rectangle, I can’t actually draw a rectangle there because one guideline is 1/16" or 1/8" out-of-plane with the others.

I forgot to mention that the tag “48’ PRINT…” turns the floor surface off, and Z-fighting stops. I set the tag to visible while drawing, hoping that keeps everything co-planar, then to invisible in order to clearly see what I have drawn. So far this seems to work, but it is labor intensive.

Is there a way to draw in 2D keeping while everything in one plane and keeping colors fully visible?

Thanks.

P.S.:
Your further comments about loose geometry sound authentic, and if you are willing I would appreciate help on those next.

You would be very welcome. Either start a new public thread, or contact me via Private Message (PM) by clicking on my avatar (picture) and clicking on Message.

then you need to make the separately coloured sections a part of the floor itself, so you don’t create a double surface.

Yes. If you do what I suggested above, include the different coloured section IN the floor plane, not on top of it.

Then you can force your drawing to be on the flat face of the floor by starting with the tool showing inferencing ‘On face’, and hold Shift down while you place the tool pointer at the next pick point - whether using the Line, Rectangle, Circle, or Arc tools.

Can you give me step by step on this?

Thanks.

I’ll try.

Work in Top view, doesn’t matter if Camera/Parallel projection or Camera/Perspective. I’m using the latter.

Have your plan image (if you have one) or just a plain rectangle flat in the red/green plane.

Make it into a component, and R-click/Lock so you can’t move it by accident.

Make sure you are drawing on the Untagged tag, or Layer0 in earlier versions of SU - LEAVE the Pencil icon in the Tags/Layers panel on Untagged or Layer0 ALL the time until perhaps, later, when you know better what you are doing.

Start your tool - I’m using Rectangle to draw a inside wall. Or you could start with a large rectangle, or irregular exterior wall outline and draw it with the Line tool, then oFfset it by the wall thickness .

Watch for the blue diamond inference marker showing ‘On Face…’ then draw, holding the Shift key down.


That shows a bold magenta outline for Parallel or Perpendicular to edge (or axes, if no edge was hovered over first).

In 2020 and a few earlier versions, tapping the Down Arrow key has the same effect, and tapping it again toggles between Parallel and Perpendicular. If the wall isn’t on axis, then use the Rotated Rectangle tool, and inference to an angled edge for the start - hover the mouse over an angled line until it highlights magenta.

Or perhaps easier for on-axis walls, tap the Up arrow key to make the Rectangle draw perpendicular to the blue axis, after you select the tool, but before you make the first pick.

You should type in the dimensions if you know them. Or if you don’t perhaps turn on Length Snapping in Model Info/Units to snap to a modular size unit that will be close to what you want - say 10mm or 1/2" depending on your units. Big enough not to miss by one or two units easily, but small enough to give your dimensions ‘round numbers’ at a meaningful precision.

Once you start to inference new objects to existing ones, turn off Length Snapping, or it will give you more trouble than it’s worth.

Every time you draw a new object, make it a component, and give it a meaningful name before moving on.

I understand all in your 2:29 post, thanks.

In your 1:13 post, I can you give me step by step on:

…make the separately coloured sections a part of the floor itself, so you don’t create a double surface…include the different coloured section IN the floor plane, not on top of it…

Again, happy to try. But probably not tonight - busy on something else at the moment.

Sorry it’s so late in my day.

But here goes:

  1. Open the blue coloured rectangle (that is shimmering at the moment) for editing. Double click on the face to select the face and its edges.

  2. Cut it to clipboard, then open the yellow rectangle behind it for editing - double click on the yellow component, or select it and R-click it), which is the face I want you to put it in, instead of being a separate component and face ‘on top’ of (actually, occupying the same space as) part of the yellow face, hence the shimmering.

  3. Use Edit/Paste in place to insert the blue rectangle into the yellow face.


    You can see it’s now a separate part of the same face, and has taken its yellow colour instead of its original blue.

  4. Use the paint Bucket tool (shortcut b), select the blue colour, and change the small rectangle’s colour back to blue.
    image

  5. Verify that the blue rectangle is now part of the yellow face, by choosing the Select tool (Spacebar) to confirm that you can select in turn the larger yellow face, and the small blue face, in the same context of the ‘inside’ yellow rectangle component.
    image

Repeat for the red dot near the Sink Half Bath. And any other places where you have different component faces in the same plane.

Hope that clarifies things?

I did the steps in SU 2020, but they should work the same in the web Free version.

IS that the version you are using? If so, please remove the 2018 version from your profile, or correct it to show the principal version you are actually using.

John:
Thank you for your very through response.

  1. I am using SketchUp for Web 2020 at Trimble Identity. I guess I put 2018 in my profile a couple years ago. I have forgotten, how do I change my profile?

  2. What you are seeing regarding shimmering must be different from what I’m seeing. When I zoom or orbit EVERY object or component I have placed on the floor . shimmers. Only setting the floor tag to invisible stops the shimmering.

  3. In your steps (2) and (3) you mention “cut it to clipboard” and “edit/paste”. As far as I am aware, these are not options in SketchUp for Web. Are there SketchUp for Web equivalents?

  4. The ability to repair shimmering as you describe is useful, but since every 2D object I draw shimmers, can you tell me how to avoid shimmering from the start? Essentially, I want to draw a large colored rectangle and place small colored rectangles on it while avoiding shimmering, all in 2D.

Thanks.

These are all available in the Web versions. Cut, Copy, Paste and Paste in place. Right-click on an object and you’ll see this menu:
SketchUp Free Clipboard

You were shown a technique where you could make cutting components that you could move around in 2D with no z-fighting in this thread:

1 Like
  1. To edit your profile see this post by DaveR - Sketchup Reliability - #8 by DaveR

It has nothing directly to do with the topic title, though.

The Free version doesn’t have a year - leave that blank.

  1. Well, that’s because the floor is on the same Z-level (zero i.e., 0) as other components. Turn its tag off to remove the shimmer when you don’t need to see the floor itself.

  2. I’m not very familiar with the Free version, but I can’t believe it doesn’t have a Cut, Copy, Paste and Paste in place equivalent. Will have to check.

[A little later]

Yes it does. Ctrl+C = Copy, Ctrl+X = Cut, Ctrl+V = Paste. Standard Window shortcuts, used even on Mac for which Ctrl would usually be replaced by Command. Select something, copy it to clipboard, change context if you need to (for example to put some geometry or an object into or out of a component or group.

I can’t find a shortcut yet, nor a direct menu location, for Paste in Place but the command is there. Click on the little Search icon above the column of icons on the left of the modelling window, then type the start of paste in place in the search box. Press Enter to activate the action.

[EDIT] I see while I was typing you have a response about these in the interface - R click. Thanks @McGordon

  1. So long as you “place small colored rectangles on it” (my emphasis) you WILL get shimmering. It’s the way OpenGL (which SU uses) works. So if you want to avoid shimmering, you have to place your other objects IN that floor face.

Or while it’s a separate component, you have to turn its visibility tag off.

Or perhaps you could work in Xray mode. Not sure if that would avoid it, but it might.

V late here. Off to bed now, half past midnight.

Good point, I hadn’t remembered or thought of that. Let alone that it had been suggested before.

Several days ago I read the post about setting components to “horizontal” and “cut opening”. I tried it and it did not prevent shimmer. I tried it again now and it does prevent shimmer. Puzzled by this discrepancy, by experimenting with a new template I see the explanation. When I did it days ago, I went to components which I had ALREADY created and changed my initial setting of “none” to “horizontal” and "cut opening’. This altered component fails to prevent shimmer. But if I create a NEW component and immediately set it to “horizontal” and "cut opening’, it does prevent shimmer. This is demonstrated in the small test model I have attached.

Those who provide help in this forum have my respect and gratitude, and I’m sorry if I wasted any of their time, but I failed to notice this small discrepancy.

So it appears that if you wish to draw in 2D, you can draw a ground plane, tag it for convenience, draw and paint geometry on it, and place components on it as long as they are initially set to “horizontal” and “cut opening”; all with no shimmering on zoom or orbit, whether the ground plane tag is on or off.

Thanks.

TEST OF HORIZ & CUT.skp (760.2 KB)

It’s not enough just to change this for an existing component in place in the model. After you’ve done that, you need to drag a new copy out of the Component browser and place it in the context of the floor - that is, with the floor component open for editing.

THEN it does the ‘cut opening’.

That actually doesn’t ‘make a hole’ in the floor - the floor geometry isn’t altered. It just means that the view renders as if there were a hole.

The ‘cut opening’ property only works if you place the ‘opening’ component on a face, not on the outside of another component.

You can edit the component (as you probably did, unless you recreated it and set these properties in the Make Component dialoogue) in the Component Browser by clicking on the > symbol on its right there. The symbols turns to a V shape and opens up this dialogue.

you need to drag a new copy out of the Component browser and place it in the context of the floor - that is, with the floor component open for editing.

I don’t remember exactly how I did it 3 days ago, but that is definitely how I did it today in the test model I uploaded. I created a fresh ground plane, not grouped, not made component. I created fresh components on the ground plane by; rectangle, drag select, right clicked, clicked “make component”, then in the “Make a Component” box, selected glue and cut options. Those that I later altered, I did it in the right panel by clicking on the “>” symbol.

Even so, component 4 of the test model, which was created as “none” and later changed to “horizontal” and “cut opening”, still shimmers.

Thanks.

P.S.
I for got to say that after I created each fresh component on the ground plane, I erased that example, leaving no examples in the model; then selected that same component from the right panel and placed it on the ground plane. Component 4 still shimmered.

Can you upload the model? I’d be interested to try to work out why, as the rest of your components worked.

Better workflow is to make your floor a component from the start, then open it for editing while you add things inside it, which should also mostly be other components.

Loose geometry in a model is an accident waiting to happen.

TEST OF HORIZ & CUT.skp (760.2 KB)

K-6 RE-DRAW FLOOR PLAN DUN 7.2.skp (5.2 MB)

  1. I have uploaded both my working model and the small test model.

  2. What I have found to work best so far is to make the floor a colored rectangle, not a group, not a component, and add objects to that. I just tried making the floor a colored component and opening it for editing, and then adding objects. These two methods
    seem to me to be effectively the same in terms of work flow. I presume you recommend the latter in order to avoid loose geometry.

Thanks

I can see something weird happening now. When I open your latest TEST OF HORIZ & CUT.skp file in SketchUp Pro 2020, Component#4 is set to Glue to “None” and Cut Opening (greyed out).
Component#4 SU Pro2020
When I change it to “Any” or “Horizontal” and drag a new copy out onto your rectangle, it works as expected (no z-fighting).

Now when I open the same file in SketchUp Free on Chrome on macOS, Component#4’s settings are Glue to horizontal and Cut Opening.


I couldn’t get Component#4 glued to the rectangle. When the file opens, Component#4 is set to Glued to Horizontal and cut. Dragging a new copy out from the components browser doesn’t make it glued nor does deleting all instances and dragging a new one out. After messing around trying different things, the quickest way to get it working was to change “Horizontal” to “Any” and drag an instance out. After that, you can change back to “Horizontal” and it still works. It’s as if it’s not reading the settings from the file properly. It is behaving as the settings that Pro read (Glue to None) but the components browser isn’t displaying that, so I changed the options a few times until it worked.

Another way to confirm that a component is glued is to open it for editing and you’ll see a blue cross at the component’s axes origin:

Glued

If it’s been glued, when you right-click on it you’ll see “Unglue” available. When it is not glued, that option is there but greyed out.

I see that you’ve got length snapping turned on. Even though you have a high precision of 0.000100 mm, this could still cause problems. I don’t think it’s causing your z-fighting issues though as I checked and all your rectangles have a z-coord of exactly zero, down to 6 decimal places of a mm (nm).

I’d recommend making the floor a group or component too. You can draw anything on top of the closed floor component and it won’t stick or merge. When your new cutting component is ready then you edit the floor component and add your new object inside.

I haven’t looked at your main file.