Material transparency export

export
transparency

#1

Hi everyone,

I’ve been developping an extension to Sketchup for one year, and I’m facing a problem with no solutions yet.
The application context is:

  • creating 2D plans using sketchup, adding some “areas”, with colors, materials and transparency using different layers.
  • exporting these plans to a webapp, where user can turn on/off the layers.

Up to there, everything’s working fine. I’ve added a feature which export each layer one by one to PNG transparent, by hiding other layers. Then, in the web view, I show all PNGs at the same location using absolute positionning.

What making me mad now, is that some people uses colored area on different layers, which is obvsiously lost in the web view. More precisely, my layer 0 is the actual building plan: walls, room labels, doors, …
Each layer then match a “logical” split, on which areas could be drown, but which should preserve building plan visible, so transparency is required.
As, during the export, only the current layer is visible, building plan is hidden and the PNG generates areas with the color and opacity level, but without walls or labels under.

Does anyone face the same problem?

I only think of export each combinations of layers, active and inactive, then in the web part, try to find the correct image to show. But, as I got 8 layers, it will result on exporting more than 50 PNGs for one drawing… not really effective.