This milestone focuses on redesigning the animation system, providing a new Animator component and supporting BlendShape animations, significantly enhancing animation capabilities. In terms of rendering, the PBR material interface has been redesigned, and the diffuse part of ambient light now supports the spherical harmonics mode, improving the PBR workflow. In the 2D aspect, the sprite atlas feature has been added, Spine has enhanced skin-changing capabilities, and Lottie animations have been integrated into the editor. The official website supports bilingual in Chinese and English, with over 20+ new examples.
Animation is an essential core system of the engine, making originally static scenes come to life. With the increasing demand for animation-related features and considering the healthy development of the engine's animation system in the future, we have redesigned the animation system this time, bringing various improvements in functionality, usability, and performance, while laying the foundation for future feature expansions of the animation system. The main upgrade points are as follows:
The new animation system has improved performance by about 30%:
Test Environment: Device: Mi 11 Pro | Browser: Chrome 92.0.4515.131 | System Version: Android 11
In addition to engine features, the editor has also added animation editing capabilities. Through the Animator editor, you can conveniently add transitions and blends to animations.
[
BlendShape (MorphTarget) animation is a common form of animation, especially widely used in detailed animation performances, such as character facial expression animations. We have added BlendShape
capabilities to ModelMesh
. Additionally, we support the parsing and importing of BlendShape animations in glTF models, deeply integrating with the new Animator
system. Like skinning animations, developers can play BlendShape animations in glTF models by simply calling the play()
interface of the Animator
animation component without any additional operations.
In the PBR workflow, we can set the diffuse and specular reflections of ambient light to achieve IBL (Image-Based Lighting). Unlike specular reflection, diffuse reflection results in a low-frequency signal due to the large reflection lobe, which looks like a Gaussian-blurred texture. In previous versions, we switched the diffuse reflection to pure color mode or texture mode by setting the diffuseMode of the ambient light. This required uploading a cube texture (6 textures) to achieve the low-frequency signal of diffuse reflection, occupying a valuable texture unit of the shader. This time, we use 3rd-order spherical harmonics, which are 9 color values in different directions, 27 numbers (9*3 RGB) to replace the cube texture mode. This not only frees up a texture unit of the shader but also brings better effects. (Baking tools will be previewed below)
In the past PBR material interface design, we compromised too many business-derived interfaces, such as the opacity map, which could be merged into the alpha channel of the base texture. Impure interfaces not only confuse developers but also degrade performance. Therefore, after fully considering rationality and future scalability, we made a reasonable BreakingChange adjustment to the PBR material interface. For interface changes, see the PR discussion.
The background in the scene supports texture mode settings, allowing an image to be used as the scene background.
Sprite atlas is a common optimization technique in 2D projects. It can bring fewer draw calls, less video memory usage, and fewer resource requests, greatly improving rendering performance. In the Galacean Engine, we also introduced the SpriteAtlas
class to enhance this capability. Developers only need to load the atlas resource to get the SpriteAtlas
instance and then get the corresponding sprite according to the sprite name.
To help developers use SpriteAtlas more conveniently, we provide the atlas packaging Tool-Atlas tool, which can quickly export the .atlas file needed by SpriteAtlas locally. Additionally, Tool-Atlas is integrated into the editor, allowing developers to automatically complete the packaging by selecting the sprites to be packaged, as shown below:
In this year's roadmap planning, we have listed the development of physics-related functions as a key focus. This milestone improved the usage of physical trigger events by scripting them, handling them with script callbacks like other logical events. The corresponding interface was added to Script
:
/**
* Called when the collision enter.
*/
onTriggerEnter(other: ACollider): void {}
/**
* Called when the collision stay.
*/
onTriggerStay(other: ACollider): void {}
/**
* Called when the collision exit.
*/
onTriggerExit(other: ACollider): void {}
At the same time, the raycast()
interface was redesigned. A new PhysicsManager
was added, moving the raycast()
interface from the scene to the PhysicsManager
, which also facilitates the integration of more physical functions in the future.
After weighing performance and functionality, Galacean Engine will prioritize PhysX as the core part of the physical layer in the future. This milestone released the PhysX.js repository compiled with EmScripten. This repository provides very convenient compilation scripts and corresponding NVIDIA PhysX Visual Debugger joint debugging configuration. This repository is independent of the Galacean Engine, and we welcome interested friends and peers to co-build and raise issues.
In the 0.5 milestone, the handling of buffer data was optimized, which not only improved memory usage but also resolved rendering issues caused by an increase in the total number of vertices. After optimization, the new runtime version supports the following Spine customization capabilities:
Added addSeparateSlot
and hackSeparateSlotTexture
APIs. These allow splitting specified slots from the animation and replacing their textures to achieve skin mixing effects.
Considering the integration with the engine's 2D capabilities (such as atlas and masking), the Lottie runtime has been completely refactored. A command-line tool tool-atlas-lottie is provided to help users convert native Lottie JSON documents into files that conform to the Galacean Engine atlas standard. Additionally, it supports adding Lottie assets and components in the editor, using cloud conversion capabilities to replace the command-line tool for file format conversion.
Overall unit test coverage increased from 45% in version 0.4 to 49%:
Development details:
Currently, IBL baking (specular reflection maps at various mipmap levels, diffuse spherical harmonics) is left to developers using industry tools like IBL-Baker. Due to the complexity of the concept and the fragmented workflow, many developers have not fully utilized IBL technology, making the PBR effects of the Galacean Engine less advantageous. Therefore, in the upcoming 0.6 milestone, Galacean Engine will launch its own IBL offline baking tool, integrated into the editor and the official website, allowing developers to quickly adopt the PBR workflow.
Glacean Engine will integrate PhysX and redesign physics-related features. In addition to refactoring the existing Collider
, it will also add CapsuleCollider
, provide a PhysX-optimized raycast
method, and introduce the RigidBody
component.
We welcome everyone to star our GitHub repository. You can also follow our upcoming v0.6 plans, and feel free to submit your requests and issues in the issues section. Developers can join our DingTalk group to discuss and share feedback with us: