Open ahmedaomda opened 5 years ago
This is JDK-8091851. I agree that there is a need for it (several questions on SO as well).
There is a 3rd party FBX importer, but it is limited in what it imports. There is also the 3D viewer in the repo, which isn't being maintained and supports several importers, with .ma being the only one capable of animations.
The question is: who will be willing to work on it?
There are a few demo loaders in apps/samples/3DViewer/src/main/java/com/javafx/experiments/importers/ that you could look at.
I don't think this belongs in the core JavaFX API.
So is it possible to work on this under apps/samples?
Yes. I note that Johan is proposing to move the samples to a new jfx-samples repo -- see jfx-samples#1 -- but unless / until that happens, folks can work on it here.
@jperedadnr Would you be interested in working on 3D importers in some fashion?
@nlisker Definitely I'm interested.
As Kevin said, I don't think this should be part of the JavaFX core, and I wouldn't have them hidden in a sample, even if 3D Viewer is the reference for JavaFX 3D.
I'd say that we could add the existing importers from the 3DViewer project to FXyz 3D, creating a new artifact (org.fxyz3d:fxyz3d-importers or alike).
As far as I know these importers are BSD3 licensed, so that wouldn't be a problem. Anyone could work on improving them if possible, and working on new ones (FBX, ...).
Let's see what others say about this?
I agree 3D importers are very valuable. While we can have a sample that both contains the importer as well as an example on how to use it, it makes much more sense to me to have those importers (and more code) in a third-party project (e.g. FXyz 3D) if the maintainers of that project want to do that.
Still, there needs to be a sample, but that then belongs in the FXyz samples (which depends on OpenJFX but not the other way round).
In general, I think this would be a great example on how third party projects extend the OpenJFX core modules.
I don't mind in which code base they are (FXyz is fine), I just want them to exist and work properly, and am ready to contribute.
I also don't know about the licensing, but I doubt it would be a problem.
I think this move is a good one and sensible. FX 3D is useful now but improving access to 3D models would dramatically increase that usefulness. Consolidating these importers with FXyz is a reasonable move that will help "lower the bar" of difficulty for Java developers to use JavaFX 3D for rapid development. (including AR support in JavaFX which I dream for and could be a killer feature that I believe would elevate JavaFX interest significantly )
I am in agreement with nlisker in that I do not personally care which code base they exist in. We only started this project years ago to make it easier for other developers to use FX 3D and that is what I want today. This consolidation is something that should have been done 4 years ago honestly.
Until this is realized there are a couple of importers by InteractiveMesh: http://www.interactivemesh.org/models/jfx3dimporter.html. Supported formats: 3ds, dae, zae, fxml, obj, stl, x3d, x3dz. I'm using it for obj and it works pretty well. However its licencing can be problematic.
I use the 3DViewer for obj and it also works fine. The issue is with the more complex types that have animation, materials and other data.
FYI, I've started the work on FXyz-Importers with a first PR, anyone is welcome to check and review.
I have been searching around for a 3D loader for any of the major 3D Models extensions such as FBX I think it's popular request to have a FBX loader in javafx which is a well known extension used by most of the 3D Modeling tool such as Maya and 3D Max and also used in Unity which means a lot of assets .