javafxjavafx-8java-3d

Java 3D to JavaFX 8 conversion


I have an application written in in Java 3D. As Java 3D is now virtually dead I am thinking about converting the code to JavaFX (JavaFX 8 supports 3D objects).

The question is whether it is relatively simple to convert Java 3D code to Java FX code? Are there straightforward counterparts of Java 3D methods in JavaFX or would it be more like a total redesign of the code?

Here is a little list of packages used in the Java 3D code:


Solution

  • I don't know what gouessej is saying about Java 3D not being dead, there will not be feature development for Java3D going forward. However he/she is correct that the base JavaFX 3D API is very lacking in features.

    If you want to port your application to JavaFX 3D, you will have to rewrite the rendering portions to match the new JavaFX API. From the list that you provided only PointLight and Shape3D have DIRECT counterparts. Alpha transparency is an undocumented unsupported feature as of 8u40 that will get compiled into the official build for Java 9. The F(X)yz team has a demo of it working just fine but we had to recompile the platform from sources ;-).

    You are not alone though, there is now free open source third party support via F(X)yz: (shameless plug....)

    http://www.fxyz3d.org