Export 2D image with alpha transparency

Isn’t it possible to export 2D PNG images with alpha transparency? I have a vague memory there was a way to do it, like the API supported it but not the 2D export in the UI, but cannot get it to work.

You have to select transparent background in the image type options.

1 Like

I’m doing that. I’m also setting the transparency option when trying through the API. The background gets transparent, but no alpha transparency for transparent materials in model.

try ‘nicer’ in the Styles setting…

john

Have tried. Makes no difference :confused: .

Graphics card issue???

john

Not that I’ve noticed.

Could this be a mac only feature?

no, some png don’t display correctly in all apps…

the standard SU glass works here…

edit: both 12.9 are png’s, one I fixed the alpha on…

the bottom ones an alpha ‘image’ on an alpha texture…

john

Is it possible that it depends on the PNG pixel format?
There are two ways how transparency can be encoded:

  • 8bit RGBA or 16bit RGBA with a complete alpha channel (256 or 65536 levels of transparency)
  • indexed 8bit PNG with “tRNS chunk”, that is a single color that is set to be displayed 100% transparent

In my tests, SketchUp renders half-transparent PNG colors correctly when the background is opaque (faces, sky, ground). When image is exported with transparent background, only 100% transparent PNG pixels are exported correctly, all half-transparent pixels become opaque, no matter of the encoding.

1 Like

This is exactly what I’m seeing.

No alpha transparency on export. Either all or none.

Anyhow, I’ve edited my exported images manually to have alpha transparency, and after that realized 100% transparency probably works better for my use case anyway.

I’m not really affected about this anymore, but it would be interesting anyway to know what the problem is. My best guess is that it’s a Mac vs PC thing.

I have no trouble with transparant pngs straight from SU to powerpoint – works very well

What OS are you on?

Make sure you have sky/ground off in styles perhaps? Between OSX and Windows 10 I’ve never encountered an issue so far.

windows 10

Made no difference :confused: . In both cases the background where fully transparent, but transparent objects in SU showing the background through did not come out alpha transparent.

Have you managed to export with alpha transparency or only full transparency? Full transparency works for me, but not alpha from transparent materials in SU.

can you post a sample skp…

like we say;-)

john

I generated this TIFF from from SketchUp 10 years ago, and it seems to have partial transparency to the glass windows. It’s hard to remember that long ago, but is it possible something changed? Is it possible SU used to handle transparency differently some time ago? This was dated September of 2008.

22%20PM

1 Like

I’m at my friends house over the weekend so here’s a test file from SU 2017. I’m seeing the exact same behavior in 2018 too though. Exported image is attached, as well as a screen shot of the image in a program that handles alpha transparency.

alpha test.skp (140.7 KB)

RTCool, did you only model half the house? I would have expected the windows in your example to show the back faces of the other side, not be alpha transparent.

1 Like

I can’t find a way to make it not transparent, from the UI or code, the material opacity is honoured…

your glass should be transparent in any raster format export…

do the others types work, jpg, tiff, bmp…

john