JavaFX 3D Transparency

Since JDK8u60 b14 transparency is enabled in 3D shapes.

This is a quick test done with it:

Transparency

A cylinder with diffuse color Color.web("#ffff0080"), is added on top of a box and two spheres.

group.getChildren().addAll(sphere1, sphere2, box, cylinder);

There’s no depth sort algorithm though, meaning that order of how 3D shapes are added to the scene matters. We need to change the order to allow transparency in the box:

group.getChildren().addAll(sphere1, sphere2, cylinder, box);

Transparency

Leave a Comment