Alternative to Java 3D?

This topic has been viewed 7516 times and has 3 replies
Thread status: Active
Questions about extending features and developing plug-ins [img]http://www.sweethome3d.com/images/flags/en_small.gif[/img]
Post Reply New Topic
enkonyito
Posts: 607
Joined: Thu May 28, 2015 4:52 pm

Alternative to Java 3D?

Post by enkonyito »

Is another scene graph than Java 3D possible or desirable for Sweet Home 3D?
As a lot of elements are linked to it (j3d and swing packages), would that necessarily mean the creation of a derived version?
EnkoNyito
User avatar
Puybaret
Posts: 9440
Joined: Mon Nov 07, 2005 12:00 pm
Country: Paris, France
Contact:

Re: Alternative to Java 3D?

Post by Puybaret »

Replacing Java 3D by an other library is similar to the quest of finding a better rendering engine than SunFlow. It would require a lot of time, and even once you reached a working solution, you might have some bugs difficult to fix.

Another solution could be to program a half replacement, i.e. keeping a 3D API very similar to Java 3D API, but changing its implementation with more direct calls to OpenGL through JOGL and keeping only parts needed by Sweet Home 3D. This is one of the reasons why I didn't use an existing 3D library like Three.js when I ported Sweet Home 3D to JavaScript. I chose to learn WebGL and programmed a small library inspired from Java 3D (see scene3d.js and
HTMLCanvas3D.js mainly), with the hope that I could reuse my WebGL knowledge to implement a similar engine in Java with OpenGL / JOGL the day it will be required.
Emmanuel Puybaret, Sweet Home 3D creator
enkonyito
Posts: 607
Joined: Thu May 28, 2015 4:52 pm

Re: Alternative to Java 3D?

Post by enkonyito »

Another solution could be to program a half replacement, i.e. keeping a 3D API very similar to Java 3D API, but changing its implementation with more direct calls to OpenGL through JOGL and keeping only parts needed by Sweet Home 3D.
The 3D API of jMonkeyEngine being close to Java 3D, what do you mean by half-replacement while keeping the parts necessary for Sweet Home 3D?
Although some methods in this API have the same name or have the same functionality as Java 3d, their sub-methods are different.

Replacing Java 3D by an other library is similar to the quest of finding a better rendering engine than SunFlow. It would require a lot of time, and even once you reached a working solution, you might have some bugs difficult to fix.
Since Java 3D uses the GPU and manages the lights (ambient, directional, point and spot), how to adapt the [font=courier new]PhotoRenderer[/font] class to use Java 3D as a less photorealistic rendering engine?
EnkoNyito
enkonyito
Posts: 607
Joined: Thu May 28, 2015 4:52 pm

Re: Alternative to Java 3D?

Post by enkonyito »

With jMonkeyEngine, I also get a difference between a color material and a texture material for the same RGB value as in this topic.

jME3.4.0_ColoredTexturedBoxes.jpg
EnkoNyito
Post Reply New Topic

Who is online

Users browsing this forum: No registered users and 1 guest