Jzy3D 2.0 is out !

269 views
Skip to first unread message

Martin Pernollet

unread,
Feb 7, 2021, 12:02:52 PM2/7/21
to jz...@googlegroups.com
Hi everyone,

Jzy3d is now at version 2.0 with the following updates.

EmulGL & refactoring of the drawing object model

A new CPU-based OpenGL renderer is born, providing an enhanced portability. Traditional GPU rendering offers great performance but sometimes hit a compatibility issue for some rare {OS, JDK, GPU} combination. EmulGL processes the 3D scene inside the JVM only with rendering time below 40ms for most surface and scatter charts. EmulGL uses jGL, a pure Java implementation of the OpenGL 1 specification. EmulGL remains relevant for simple charts. Native charts (using JOGL) remain the preferred option for fast rendering of very large geometries, volumes or rendering involving shaders.

Generalizing the framework to support multiple OpenGL libraries led to create the IPainter interface through which all drawable objects are drawn. See the repo readme for hints on refactoring your project from version 1.* to 2.0.

Many thanks to Johan Jeppsson and Thermocalc to support this improvement. 
Capture d’écran 2021-02-07 à 17.03.07.png

Chart tests

Making big changes in the framework required more test tools to ensure non regression. 
  • Jzy3d is now built by Github CI rather than Travis CI.
  • Integration tests are based on pixel-wise comparison of chart to a baseline image. Note that these tests are still sensitive to thin differences between {JVM;OS} and are intended to be stable on my computer. These tests are not ran by Github CI.
  • Unit tests are based on mocks of the JOGL GL interface. Other mocks are built with Mockito.
  • A set of OpenGL debugging tools has been added to the library to investigate bugs of the library visually.

Capture d’écran 2021-02-07 à 17.07.24.png


Volume charts

Viewing volume is now possible in Jzy3d thanks to a great contribution of Jacob Filik from Diamond Light Source. The below chart is demonstrated in the tutorial module.

image.png

Tutorials and documentation improvements

Tutorials have a better focus on portability demonstration (showing examples of AWT, SWT, Swing, EmulGL, etc). We also added examples of building 2D charts with Jzy3d. 

The Developer Guide Example Code 2.0 are already ported to Jzy3d 2.0 (the PDF Book will be updated soon). This may be usefull to you if you need lot of code examples for 2.0.

The readme files on the Github repo better explain how to use the framework and how it is built. Child modules will be better documented in the future.

Improvements in previous versions

The following features were not claimed through the usual download pages but remain tagged on github branches (maven build also deployed).

Jzy3d 1.0.2
  • Legends can be easily rendered with Java2D
  • LineStrip now supports stippling patterns to easily draw dotted or dashed lines
  • Squarifiers : Jacob Filik added multiple ways of scaling the chart inside the axis box
Jzy3d 1.0.1

2.0.0 Release Status
  • Master branch of the API is on 2.0.0-SNAPSHOT, verified by Github CI
  • Deployed from my computer to Jzy3D Maven repository
  • I wait for 2.0.0 final release to upload javadoc

Remaining work before final release
  • Getting feedback from you
  • Finalizing few refactors to prune and simplify the object the model
  • Improve portability of non regression tests
  • Maybe (?) fix JavaFX offscreen rendering OR use the new JOGL Newt Canvas for JavaFX. At least should extract the project out of the API as building JavaFX with recent JDK is difficult (at least to me). Any feedback on the relevance of maintaining Jzy3d JavaFX charts is welcome

Happy 3D!

Martin



Nils Hoffmann

unread,
Feb 8, 2021, 2:41:03 AM2/8/21
to jz...@googlegroups.com
Congratulations Martin and to everyone involved!

Best regards
Nils

Am 07.02.2021 um 18:02 schrieb Martin Pernollet <martin.p...@gmail.com>:


Hi everyone,

Jzy3d is now at version 2.0 with the following updates.

EmulGL & refactoring of the drawing object model

A new CPU-based OpenGL renderer is born, providing an enhanced portability. Traditional GPU rendering offers great performance but sometimes hit a compatibility issue for some rare {OS, JDK, GPU} combination. EmulGL processes the 3D scene inside the JVM only with rendering time below 40ms for most surface and scatter charts. EmulGL uses jGL, a pure Java implementation of the OpenGL 1 specification. EmulGL remains relevant for simple charts. Native charts (using JOGL) remain the preferred option for fast rendering of very large geometries, volumes or rendering involving shaders.

Generalizing the framework to support multiple OpenGL libraries led to create the IPainter interface through which all drawable objects are drawn. See the repo readme for hints on refactoring your project from version 1.* to 2.0.

Many thanks to Johan Jeppsson and Thermocalc to support this improvement. 
<Capture d’écran 2021-02-07 à 17.03.07.png>


Chart tests

Making big changes in the framework required more test tools to ensure non regression. 
  • Jzy3d is now built by Github CI rather than Travis CI.
  • Integration tests are based on pixel-wise comparison of chart to a baseline image. Note that these tests are still sensitive to thin differences between {JVM;OS} and are intended to be stable on my computer. These tests are not ran by Github CI.
  • Unit tests are based on mocks of the JOGL GL interface. Other mocks are built with Mockito.
  • A set of OpenGL debugging tools has been added to the library to investigate bugs of the library visually.

<Capture d’écran 2021-02-07 à 17.07.24.png>



Volume charts

Viewing volume is now possible in Jzy3d thanks to a great contribution of Jacob Filik from Diamond Light Source. The below chart is demonstrated in the tutorial module.

--
Vous recevez ce message, car vous êtes abonné au groupe Google Groupes "Jzy3d".
Pour vous désabonner de ce groupe et ne plus recevoir d'e-mails le concernant, envoyez un e-mail à l'adresse jzy3d+un...@googlegroups.com.
Cette discussion peut être lue sur le Web à l'adresse https://groups.google.com/d/msgid/jzy3d/CAK8bnzQaLxCMrFzyg-hi5GaZOOxYvX4JqK6W6mE4pe9U8OV0Bg%40mail.gmail.com.

Hosam Mukhairez

unread,
Feb 8, 2021, 4:11:33 AM2/8/21
to jz...@googlegroups.com
Dear Martin

Thank you for this good news in these hard times in our world ... really it's a power tool and the library may gold success you every time.

Best regards
Copyright © eng.h...@gmail.com


Luke Usherwood

unread,
Feb 19, 2021, 5:07:33 AM2/19/21
to Jzy3d


Hi Martin,

EmulGL sounds very interesting because this would also allay my concerns about OpenGL-based implementations on range of user's Windows and Linux systems, if there is something like a fail-safe mode.

I would like to suggest investigating this library to a team-member who is looking for 3D surface and 2D contour plots implementations. Would this library be suitable for use in a Swing-based desktop application, capable of rendering interactive plots in multiple windows at once? Would EmulGL be suitable even as a default mode, to avoid deploying additional native binaries?

(Sorry if this is the wrong place to ask!)

Kind regards,
Luke

Martin Pernollet

unread,
Feb 22, 2021, 9:03:34 PM2/22/21
to jz...@googlegroups.com
Hi Luke ,

This is definitely the good place to ask :)

Yes EmulGL can replace native rendering and is suitable for Swing apps.

There is no « default mode » neither « auto fallback » : you choose to either use EmulGL or Native (JOGL). However, swapping from one to the other only requires changing the factory, hence a single line. Chart configuration and geometries declarations do not change from native to emulated OpenGL.

Note that contour charts would require a little enhancement of EmulGL : this relies on textures - which are supported by the underlying framework (jGL) but is not wrapped yet in EmulGL.

--
Vous recevez ce message, car vous êtes abonné au groupe Google Groupes "Jzy3d".
Pour vous désabonner de ce groupe et ne plus recevoir d'e-mails le concernant, envoyez un e-mail à l'adresse jzy3d+un...@googlegroups.com.

Martin Pernollet

unread,
Mar 18, 2021, 3:34:32 PM3/18/21
to jz...@googlegroups.com
Hi again,

Just willing to mention that 2.0 will come with two great additions!

Ability of text renderers to use any java.awt.Font :

Capture d’écran 2021-03-18 à 20.25.51.png


VBO Sphere to build 4D scatter plots with a high number of spheres still with high performance :

Capture d’écran 2021-03-18 à 20.25.16.png

Despite not readable for a real chart, it's worth mentioning that I reached 10.000 spheres in a chart with a very fluid rendering. 

These two examples are now in the developer guide!

Cheers,

Martin


Martin Pernollet

unread,
Dec 26, 2021, 12:23:07 PM12/26/21
to jz...@googlegroups.com
Hi everyone,

Jzy3D 2.0 has been patched to address recent vulnerabilities discovered in log4j. The maven repository now provides artifacts depending on log4j 2.17. The source code for this upgrade is on branch 2.0. The master branch also has log4j at version 2.17.

Cheers,

Martin

On Sun, Feb 7, 2021 at 6:02 PM Martin Pernollet <martin.p...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages