BabylonJS, an open source browser based game engine, just released a major update in the form of the 4.0 release. In addition to a website makeover and new forums, the 3D game engine gained several improvements including a new Inspector, improved PBR rendering capabilities, physics support via the Ammo.js plugin and much more. If you are interested in learning BabylonJS, be sure to check out our existing tutorial series available here.
Top level features from the release notes:
- New fancy forum! (Deltakosh)
- Inspector v2.0. Dev log (Deltakosh)
- Added support for parallel shader compilation (Deltakosh)
- Added Object Based Motion Blur post-process (julien-moreau)
- Added support for ammo.js as a physics plugin (Composite objects, motors, joints) (TrevorDev)
- Added support for soft bodies, which are 3D softbody, 2D cloth and 1D rope, in ammo.js physics plugin (JohnK)
- Added support for Convex Hull Impostor using ammo.js plugin (MackeyK24)
- Added
AmmoJSPlugin
scene file loader (MackeyK24)- Added support for WebXR (TrevorDev)
- Added
customAnimationFrameRequester
to allow sessions to hook into engine’s render loop (TrevorDev)- Added
Camera customDefaultRenderTarget
to allow cameras to render to a custom render target (e.g., XR framebuffer) instead of the canvas (TrevorDev)- Added webXR camera which can be updated by a
webXRSession
(TrevorDev)- Added
webXRSessionManager
to bridgexrSession
to babylon’s camera/engine (TrevorDev)- Added
webXRExperienceHelper
to setup a default XR experience (TrevorDev)- Added
WebXREnterExitUI
andWebXRManagedOutputCanvas
classes to configure the XR experience (TrevorDev)- Added
WebXRInput
to manage controllers for the XR experience (TrevorDev)- Control WebXR camera rotation using parent container (TrevorDev)
- GUI:
- Added
control.useBitmapCache
to optimize re-rendering of complex controls by keeping a cached version (Deltakosh)- Added new ImageBasedSlider to let users customize sliders using images (Deltakosh)
- Added support for clipboard events to let users perform
cut
,copy
andpaste
events (Saket Saurabh)- Added new ScrollViewer with mouse wheel scrolling for larger containers to be viewed using Sliders (JohnK and Deltakosh)
- Moved to a measure/draw mechanism (Deltakosh)
- Added support for nine patch stretch mode for images. (Deltakosh)
- Added invalidateRect to AdvancedDynamicTexture to improve perf for heavily populated GUIs, works with shadows (TrevorDev)
- Migrated the code to modules and deploy ES6 npm packages (Sebavan)
- Added TrailMesh class. Credit to furcatomasz (danjpar)
- Support rendering to a multiview outputRenderTargetTexture with multiview engine component to improve performance for XR scenarios (TrevorDev)
- PBR (Sebavan):
- Added clear coat
- Added anisotropy
- Added sheen
- Added sub-surface
- Added energy conservation through multiscattering BRDF
- Added Inspector Debug Mode
- Added Smith Height Correlated Visibility term (white paper)
- Added SH Harmonics
- Added STL exporter (pryme8)
Be sure to check the complete release notes for more details, as there are dozens more improvements as well as several breaking changes for Babylon v3.x developers to be aware of.
BabylonJS is open source and available on GitHub under the Apache open source license. It ships with an excellent interactive playground that makes learning and playing with BabylonJS a breeze. There is also a complete cloud based level editor available here. Check out the video below to learn more about this release and to see that playground, inspector and editor in action.
Video HERE