Print at Dec 15, 2025, 7:22:34 PM View all posts in this thread on one page
Posted by enkonyito at Feb 16, 2021, 3:43:36 AM
Alternative to Java 3D?
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

Posted by Puybaret at Feb 19, 2021, 10:53:59 AM
Re: Alternative to Java 3D?
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

Posted by enkonyito at Feb 28, 2021, 6:18:36 PM
Re: Alternative to Java 3D?
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 PhotoRenderer class to use Java 3D as a less photorealistic rendering engine?
----------------------------------------
EnkoNyito

Posted by enkonyito at Aug 1, 2021, 4:11:52 AM
Re: Alternative to Java 3D?
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