Galacean Logo
English
English

Galacean Engine v0.5 Release

Bo Kou
September 03, 20217 min read

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

Animator

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:

  • Animation Transition: No longer requires strict skeletal matching between the target animation and the original animation for transitions, greatly reducing the workload for designers.
  • Animation Blending: Changed to blend according to the blend mode and weight of the respective animation layers, supporting multi-layer animation blending. You can easily blend multiple actions, not just the previous two.
  • Animation State Machine Capability: You can manage your project animations through the animation state machine. Transitions between states will automatically add the transitions you set. Conditional transitions are not yet supported; this feature will be added in the next milestone.
  • Animation State Trimming: You can trim existing animation clips for reuse without requiring designers to recreate them.
  • Animation Events: Changed to a script-driven approach, making it more flexible and simple to use.

The new animation system has improved performance by about 30%:

IMG_20210831_160627.jpg
Old Animation System
IMG_20210831_160443.jpg
New Animation System

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.

[

animate-mini.mp4

](https://yuque.antfin.com/docs/87657933?_lake_card=%7B%22status%22%3A%22done%22%2C%22name%22%3A%22animate-mini.mp4%22%2C%22size%22%3A%2210779287%22%2C%22taskId%22%3A%22u08dce560-814c-4162-a405-2b86b7089ef%22%2C%22taskType%22%3A%22upload%22%2C%22url%22%3Anull%2C%22cover%22%3Anull%2C%22videoId%22%3A%22inputs%2Fprod%2Flark%2F2021%2F18082%2Fmp4%2F1630575395412-f04c9c83-f248-4801-82dd-47a470ceee67.mp4%22%2C%22download%22%3Afalse%2C%22__spacing%22%3A%22both%22%2C%22id%22%3A%22svtOA%22%2C%22margin%22%3A%7B%22top%22%3Atrue%2C%22bottom%22%3Atrue%7D%2C%22card%22%3A%22video%22%7D#svtOA)

BlendShape

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.

CameraUse.gif

Rendering

IBL Spherical Harmonics

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)

image.png

PBR Interface Refactoring

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.

Background Texture Mode

The background in the scene supports texture mode settings, allowing an image to be used as the scene background.

wufu.gif

2D

SpriteAtlas

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:

Physics System

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.

Ecosystem

Spine Component

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:

  1. Full skin replacement
Sep-02-2021 17-23-38.gif
Sep-02-2021 17-24-19.gif
  1. Single attachment replacement
image.png
image.png
  1. Skin mixing

Added addSeparateSlot and hackSeparateSlotTexture APIs. These allow splitting specified slots from the animation and replacing their textures to achieve skin mixing effects.

image.png
image.png

Lottie Component

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.

Other Features

  • Engine: Blinn-Phong material supports vertex colors.
  • Engine: Added common methods to Color.
  • Editor: Added one-click texture to Sprite resource generation and automatic texture binding.
  • Editor: Integrated atlas packaging tool.
  • Editor: Added project engine version upgrade feature.
  • Editor: Style revamp and interaction optimization.

Other Updates

Overall unit test coverage increased from 45% in version 0.4 to 49%:

  • Improved unit tests for the math library.
  • Added unit tests for materials.

Development details:

0.6 Milestone Preview

IBL Baking

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.

Physics

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.

Aug-30-2021 18-56-04.gif

In Conclusion

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:

Galacean Logo
Make fantastic web apps with the prospective
technologies and tools.
Copyright © 2025 Galacean
All rights reserved.