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.
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).
2/ I try the plugin BitmapPlus but when importing into ShapeDiver it says
Plugin BitmapPlus, Version 1.6.3.0, AssemblyVersion 1.6.3.0 by David Mans can not be used yet. The currently installed maximum version is 1.6.2.0.
The version 1.6.2.0 is not available for download
3/ I try the plugin Javid but when importing into ShapeDiver it says
Plugin Javid, Version 1.2.1, AssemblyVersion 1.2.1.0 by Mahdiyar may not be used yet.
4/ I’m trying to forget the transparency and work with a black and white image
If the background of the viewer is white, it should “do the trick”
But whatever I try, the image always appear black and GREY instead of Black and white
(I’m still using the GLTF Material)
I also found out the “View Capture” component witch seams to be very interested
I’m looking for a solution to capture the Rhino View and generate an image (to get it via the export API, without using the shapediver viewer)
We are evaluating the Javid plugin and will likely be able to support it in the future. Alternatively, you could contact the developer of Bitmap+ since the issue you are describing sounds like a bug.
The “View capture” component cannot be supported on ShapeDiver because there is no active Rhino document there. Images can only be generated from the viewer or through components such as Make2D.