Posted December 20, 2021 by Cocos Technologies
#3.4 #Marionette
This more extensive update to Cocos Creator brings about many great features that animators have requested from us for a long time. Though our animation tools have been satisfactory to many people using Cocos Creator, we had many requests to improve it, making it easier to use animations, textures, and other items.
So we spent the last few months building some impressive features that we feel will help many animators and make their jobs a lot easier. (Don’t worry programmers, we have you covered in the next big update.) We want to thank many developers for their support and recommendations. We have seen incredible growth over the last few months and hope this trend continues.
Here are a few of the great added features in 3.4. If you want to know more about this update, check our developer log at our forums.
The most significant update to the engine is our animation state machine, Marionette. This allows you to build more complex animation that can be called when an action occurs in your game.
In version 3.4, Marionette already supports the basic features of the animation system, including state machine, sub-state machine, state machine components, trigger variables, Blend Tree, and so on. Of course, more complete animation system capabilities are still being iterated, such as animation layers and masks, human skeletons, and IK capabilities are already under development. To help you learn the Marionette animation system, we have also prepared detailed documentation, a Demo, and video tutorials are coming soon.
Preset curves are here to help you speed up your animation building, allowing for the most common types of curves to be selected in the animation panel. You can still manually work on them to get them in the right style you want, but for many, a simple quadOut or circOut is all you need.
We have added a bunch of ways to copy, paste, and move multiple keyframes in your animation as well, as moving multiple points together simultaneously. This has made the Animation panel as easy as possible and gives animators ways to build great animations quickly.
You can now align, space out, and center your UI nodes, helping build advanced UIs for your game. This has been a requested item for a long time, and we’re happy to have it in this version.
Added support for particle emitter culling, offline automatic calculation, and manual adjustments.
Support the unity of particle orientation and node orientation
Developers can build and install their macros to the project from the project setting panel.
This includes wrap mode, filter, and other parameters.
The new octree scene acceleration structure can optimize the performance of the frustum culling process. It can be turned on in the scene inspector.
You can choose from either natural ambient light or a diffused reflection convolution map.
HDR/LDR switching
Can now switch between the two in the scene node of the skybox
IBL sampling and noise reduction
You can add IBL sampling and noise reduction (check USE REFLECTION DENOISE in standard material)
In terms of rendering pipelines, FrameGraph is an infrastructure introduced in v3.1. After several iterations, in v3.4 we officially docked both Forward and Deferred pipelines to FrameGraph.
The current deferred pipeline of the engine contains a total of 2 computation passes and 7 rendering passes, which is not complex but already highlights the role of FrameGraph. On the one hand, it simplifies the code organization of the pipeline layer and reduces the maintenance cost; on the other hand, it also reduces the mental cost of developers when customizing the pipeline.
In addition, the Subpass in the rendering pipeline is also based on FrameGraph. The second advantage of FrameGraph is that the retained-mode rendering (not related to the deferred rendering pipeline) allows the engine to analyze the rendering process and optimize it before executing the full rendering process.
Currently, mobile GPUs share system memory with CPUs, and one of the major hotspots of power consumption is the read and write of GPU memory. When the write and read resources of two neighboring rendering subpasses are the same in-frame resource and will not be referenced by other passes, the resource will only be read and written through the Tiled cache and will not read and write memory, which can significantly reduce power consumption. This automatic derivation of resources and rendering processes is the advantage that FrameGraph brings.
The deferred pipeline now uses Clustered Light Culling to optimize the dynamic light source calculation performance, supporting hundreds of dynamic light sources on the same screen on a mobile device. (A Kirin 990 chip can run 1000 dynamic light sources in this Sponza scene, reaching 40 fps)
If you have a texture compressor for your jpg and png files that you think can do better for your job, you can now add it to the engine. We’ll be updating you on how to build it in English in future builds.
Stability is the primary goal of the v3.4 version, so we have also fixed some flaws that have been troubling for a long time, pushing the stability of the engine to a new height. Here are some of the more important fixes:
In addition to fixing important issues, the overall performance of the engine has also been improved, such as 2D rendering and batch efficiency, physical performance, iOS Web 3D scene performance, and Android partial scenes. Here are some test results of 2D rendering:
Due to the adjustment of the relevant logic of web platform screen adaptation, we have changed the web-related index.html
template, which includes preview templates and building web platform templates. We have done related compatibility processing inside the engine cocos-creator/engine#9830
This process will ensure that there is a fixed div structure inside index.html
:
<div id="GameDiv"> <div id="Cocos3dGameContainer"> <canvas id="GameCanvas"></canvas> </div> </div>
If GameDiv/Cocos3dGameContainer
is missing, it will be automatically filled during runtime.
Note: thisdiv
structure is a private structure managed internally by the engine. We hope to keep this structure intact and not customized. If other web tags are added to this structure, it may cause some uncertain compatibility issues.
The newly added IBL sampling noise reduction algorithm currently has some problems with the compatibility of the iOS Web environment. Since it was found that it was not merged in the version later, the support for iOS Web will be completed in the follow-up 3.4.1.
Currently, the deferred pipeline is still in the process of high-speed iteration, and there are still some problems with function and platform compatibility. It is not recommended to use it in actual projects for the time being. Some of the current known issues include some particle blending modes that cannot be rendered, builtin-toon materials are not supported temporarily, some low-end platforms and devices have compatibility issues, spotlight shadows are not supported, and 2D & 3D camera mixing issues.
For more information, check our developer log for more details.