Export transparent PNG and use it in a GLTF display

Hello,

I have a new SD file where I use the GLTF display component.
I managed to use a transparent png in the material.

A have another SD file, where I need to export a transparent png
I need this png to be generated live and then used in the first SD.

Problem A :
I do not manage to export a transparent png file (background black and holes transparent)

Problem B :
I do not manage to use the GLTF display with a black and white texture

I need to resolve A or B, to get a working combinaison
I try many things : use Curves, Brep, Surface, Mesh
Change every option in the GLTF material
Etc

Attached, you’ll find an exemple of my code.
Both SD a represented in the same example file.

debugDisplayTransparency.gh (79.4 KB)

Could you help me?

Thanks !
Olivia

The way the Squid plugin generates bitmaps is by using successive draw actions (draw the background, draw curves, etc…). If you draw transparent curves on a black background, you just get black (it adds transparent curves on top of a black background). This is a limitation inherent to the way the plugin works.

As a workaround, you could try to use other bitmap manipulation plugins that work differently (for example Bitmap+).
Alternatively, I am attaching your file modified with a script that inverts the values of the alpha channel for each pixel. This solves your problem but note that this is not very efficient in terms of computation time (it adds a couple of seconds to the script’s execution).

debugDisplayTransparency.gh (79.6 KB)