How do I set a Bitmap Color to transparent in Voxler?

To set a color in a bitmap to transparent, insert a Math module between the data input module and the OrthoImage output module with the Math Output Type set to the same as the image ("Unsigned 8 bits" for examples that I used) and Expression[4] set to the following:

If A1 = R and A2 = G and A3 = B, 0, A4


A1 is the red value R.
A2 is the green value G.
A3 is the blue value B.
A4 is the alpha value or opacity.
Values range from 0 to 255.
Black is (0,0,0) and white is (255,255,255).
An opacity of 0 is fully transparent and 255 is fully opaque.


One image that I tested has white values that are not "pure" with a B value of 247, so it is important to verify the RGB values in a graphics package like Photoshop or Paint Shop Pro. You can use > and < to indicate a range of values.

IF A1 > 225 and A2 > 230 and A3 > 240, 0, A4


The alternate Boolean syntax is also valid:

A1 > 225 and A2 > 230 and A3 > 240? 0: A4


If the image colors change to gray instead of transparent, change the Math module Output Type from the default "Float (32 bits)" to "Unsigned 8 bits".


If the colors do not display as transparent, right-click in the Viewer window and change the Transparency Type from the default "Blend" to another method like "Delayed Blend". The setting that works best will depend on the type of objects you have displayed.


Updated January 7, 2019

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request


Please sign in to leave a comment.