Results 1 to 9 of 9
Thread: 3D models
- 08-02-2017, 01:09 AM #1
Senior Member
- Join Date
- Nov 2016
- Posts
- 163
- Rep Power
- 5
3D models
Is it possible to create 3D models and use them within FX application?
There is default figures like: cilinre, square... It is primite.
If I would create 3D model with some kind of program, could I import it to FX applications and use/rotate/etc...
For example I can import images:
Java FX Code:Image img = new Image ():
I currently see only Jmonkey for my plans.
ALso how about ogre4j ? its graphic rendering engine - I quess.Last edited by asdfg; 08-02-2017 at 01:11 AM.
- 08-02-2017, 03:11 AM #2
Senior Member
- Join Date
- Sep 2014
- Location
- MA, USA
- Posts
- 399
- Rep Power
- 7
Re: 3D models
Yes, it is possible to create 3D objects in JavaFX. Image and square are 2D models though, in 3D lingo you have box, cube, pyramide, ball, etc.. There are a few standard 3D shapes available, but you can also define a custom 3D shape, this is called a mesh then. The 3D view is more complicated because you have to define view angle and perspective ("camera").
It should be doable to calculate collision with 3D objects, but it is mathematically more elaborate.
As a starting point I would check this and this.
I have not heard anything about ogre4j so far.
- 08-02-2017, 10:18 AM #3
Senior Member
- Join Date
- Nov 2016
- Posts
- 163
- Rep Power
- 5
Re: 3D models
Doing these mesh figures in FX will take longer, It could be much easier to create model ( lets say in adobe ) and import it in to project, like images and audio.
Ogre4J is a version of Ogre3D, which is made for C++. Probably will lack of documentation for this counterpart.
- 08-02-2017, 10:28 AM #4
Moderator
- Join Date
- Apr 2009
- Posts
- 13,541
- Rep Power
- 27
Re: 3D models
Whatever you produce your models in will have a 3D image format.
Consequently you need a 3D engine that can interpret those models.
JavaFX, as far as I know, doesn't have such a renderer/engine.
You'll need to do a bit of research.
You could start with Blender, if you don't already have a preferred modelling software.
I can't vouch for this, but here's a Blender tutorial for creating a 3D game asset. There are plenty of others out there.Please do not ask for code as refusal often offends.
** This space for rent **
- 08-02-2017, 12:35 PM #5
Senior Member
- Join Date
- Sep 2014
- Location
- MA, USA
- Posts
- 399
- Rep Power
- 7
Re: 3D models
It is possible to import custom 3D models into JavaFX. I know for sure it works with stl files, I think it also works with other formats. Here are some useful infos:
import
3rd party solution with samples
Quick intro to JavaFX 3D
Take some time and watch the video behind the last link. It answers most of your questions.Last edited by benji2505; 08-02-2017 at 12:51 PM.
- 08-02-2017, 01:27 PM #6
Moderator
- Join Date
- Apr 2009
- Posts
- 13,541
- Rep Power
- 27
Re: 3D models
Well, that is an engine to import.
FX by itself doesn't come with that.Please do not ask for code as refusal often offends.
** This space for rent **
- 08-02-2017, 02:49 PM #7
Senior Member
- Join Date
- Sep 2014
- Location
- MA, USA
- Posts
- 399
- Rep Power
- 7
Re: 3D models
True. Using 3rd party libraries for these kind of non-mainstream applications is not unusual, though.
- 11-05-2017, 02:55 PM #8
Senior Member
- Join Date
- Nov 2016
- Posts
- 163
- Rep Power
- 5
Re: 3D models
Im not sure if we understood correct. I actually want to import 3D model and it to be as a node. So I could add it to the group, manipulate ( scale, rotate, addd collision detection and animations).
- 11-05-2017, 11:35 PM #9
Senior Member
- Join Date
- Sep 2014
- Location
- MA, USA
- Posts
- 399
- Rep Power
- 7
Similar Threads
-
Java Swing Tables ( JTable Models ) to connect to Database using Table Models
By javaprogrammerishere in forum AWT / SwingReplies: 2Last Post: 01-27-2010, 09:28 AM -
Testing EMF models.
By manik_jforum in forum EclipseReplies: 0Last Post: 12-10-2008, 09:59 AM
Bookmarks