[Bug] Layout in Hybrid Mode and Transparent images do not render correctly in Hybrid mode

When you have a component including an image with some transparency, it does not render well in Hybrid Mode.

Fori instance, here is a model, where the tree is in front of the cube. The tree is a component containing a PNG image.


In Layout, Hybrid mode, the edges are occulted by the image. Worse, the image is rasterized under the transparent portions of the image (the face boundaries in the cube are jaggy).


**In Layout, Raster mode**, the edges are not occulted, but indeed, appear jaggy.

Note that you get the same wrong result if you use a face with the image applied as texture.

So, it seems this is related to the treatment of the image transparency.

Attached is the model

Bug Layout image.skp (1.1 MB)

1 Like

I see the same as you, even in old versions of LayOut.

@trent will be interested in this.

Is the raster version using the Low quality setting? This was changed in 2023.1 to something like 36 DPI or even lower, and the Medium setting corresponds approximately to Low in 2022. Only the High setting is unchanged.

I am not sure to understand…

The problem is not in the quality of the image but in the fact that the underlying edges of the geometry (i.e. the cube) visible by transparency are not vectorized, and even hidden.

The screenshots were taken from Layout, not from a generated PDF.

Setting higher quality helps with the jaggy lines, but doesn’t solve the missing lines problem.

I did set High Quality for everything, but this does not really change the problem.

It seems that in Hybrid mode, the whole zone of an image is rendered as Raster, even if it is transparent.

By the way, same problem on Mac.

It didn’t occur to me that it might have been a Windows only issue. My tests were on Mac, and I saw the problem.

This was in case this was related to the reengineering of the rendering pipeline, which may be different between Mac and Windows.

Unfortunately, I cannot open Layout 2022, nor any previous version of Layout. I don’t know why. Maybe this has been like this since long, that is, you can only use the latest installed version of Layout.

Actually, all Layout programs were stuck because of a process ‘GDI…’ whcih was itself in trouble.

After rebooting my laptop, I could start Layout in several versions (noting that you cannot launch 2 versions simultaneously).

Same problem in Layout 2022

image

…and in Layout 2021

So, the issue was there since long.

I have seen that as well. However, even if Layout appears without .png transparency on screen, the export/Printing looks ok. So no biggie.

On my side, the problem of missing edges persists on PDF export

image

I would guess that you get the same occlusion when Vector rendering a Hidden Line view. Hybrid rendering just superimposes a Raster view with no edges with a Hidden Lines vector view. Vector views do not support any kind of transparency.

Hi Fredo, this happens with any transparent face. If you have glass represented by a simple color with less opacity the effect is exactly the same in Hybrid.

I suppose a PNG image or material painted in a face is still treated as a face with a transparent material.

Maybe Sketchup should read fully transparent pixels of an image as not being there, but that calculation might be hard to solve in Layout.

Raster mode works differently than Hybrid mode, as in Raster what you see is what you get, and edges get blended in the background raster and take into account alpha of images and materials, while in Hybrid we want our edges to be replaced by vectors and independent from the background. So, in hybrid all edges are removed from the raster part of the viewport and they are replaced by vectors. As the vectors are calculated without face transparency to be taken in account, every edge behind a transparent face is removed.

So, I don’t think this is a bug, while I think it could become a cool feature request as long as vectors would be shown only through fully transparent pixels or faces.

My honest opinion is that I wouldn’t like this calculation to occur in my projects, if it would imply even more time reloading hybrid viewports. I work a lot with those.

Stacking viewports would perhaps be a workaround, with a standard Raster rendered view with edges superimposed with a Hidden line vector view.

The only workaround would be to trim the image. But this only works for full transparency, not for geometry that is behind a semi-transparent glass.

Maybe we should have the option to hide or draw edges behind a transparent face

I came across a bug very similar to this in another version of SketchUp - when I switched the transparency rendering to the more expensive “nicer” option in the style, the issue ceased.

Obviously layout is dealing with different things also, but it might be worth a try.

Thanks for the tip.

In Sketchup, the transparency is correctly handled, whether with Faster or Nicer

In Layout, this makes no difference. I think this is specific to the Vector mode. When the model is rendered in Layout, the zone occupied by the image is rasterized, regardless of transparency.

1 Like

Yes. Vector rendering ignores all kinds of transparency.