Flax 0.3 Released

Flax 0.3 Released

Flax 0.3 Released

What’s new

Today we’ve released another exciting update for Flax! Version 0.3 is still Alpha release but it’s getting closer to stable Beta update and engine features completeness. Probably the most important feature is a new Terrain support. We strive to make it possible for your creations to be enjoyed as you intended by everyone. This update includes over 100 important changes which are mostly new features and improves games development. Also, there is a significant amount of changes related to the open worlds performance as we want to focus on improving quality and stability of games that don’t want to limit players to small scenes.

Checkout the release highlights section to learn more or visit Flax Documentation page with detailed release notes.

Highlights

Terrain

Terrain

We’ve added Terrain to Flax! This includes not only terrain importing and rendering but also full collisions support, holes in terrain support, advanced terrain generation from heightmaps and splatmaps, terrain live modifications and painting in Editor with full undo support. We’ve added new material domain type dedicated for terrain and added support for generating terrain at runtime.

Terrain is using Continuous LOD system with streaming which enables to create very large landscapes and render them at high view distances with no performance drop. Under the hood, Terrain actor uses a collection of patches, where each patch contains a quad of 4×4 chunks. Size of the chunk is adjustable per terrain and by default, we use the value of 127. This allows Flax to efficiently cull and draw only visible chunks with smooth LODs transitions (no cracks or visual artifacts on different LOD edges).

Editing terrain

Terrain can be imported from external tools as a heightmap with a collection of splatmaps or created right in the Editor using the terrain sculpting tools. Flax Editor support using simple carving brush, smoothing brush, noise brush, and flatten brush. Full undo-redo support and intuitive editing tools make it very nice to modify the terrain right inside the editor. Flax supports also creating holes in terrain for caves and tunnels (including proper collisions handling).

Terrain Painting

Anim Graph State Machines

State Machine

We keep improving Anim Graph to enable developers to create even more realistic and unique animated models. In this update, we’ve shipped many exciting featured for Anim Graph including State Machines support. Using State Machines is a very common technique creating characters animations blending graph and now can be also used in Flax. Alongside this feature we’ve added a series of new nodes to the Anim Graph to helps using this feature such as value comparison nodes, boolean math nodes, bitwise integer math nodes and more.

Editor Improvements

Flax Editor is a great collection of tools but we cannot stop improving it. In this update we’ve focused on improving overall productivity by adding features such as:

  • Modified properties highlight and revert to default value
  • Read-only script properties support
  • Resizing texture on import
  • Source Code editor option and C# API for other IDE integrations
  • Undo/redo support to Material Instance editor window
  • Highlighting modified material instance parameters (compared to base material)
  • and more…

Model LOD Improvements

Model LOD Dithered Transition

Now, Flax supports Dithered LOD Transition and advanced model LODs configuration. We’ve added LOD Bias and Forced LOD properties to models (and even terrain itself). This enabled developers to adjust the model visual quality to match the desired effect. You can also control the LODs per scene view by using a dedicated C# API.

Model Asset Window contains an option to preview a selected LOD.

Multi Blend nodes in Anim Graph

We’ve added more blending nodes to Anim Graph that can be used to achieve more advanced setup of model animations blending.

Multi Blend 2D

Blend up to 14 different animations in 2D space. This node can be very useful to implement player locomotion animations blending or to create character aiming blending.

Multi Blend 2D

Multi Blend 1D

Multi Blend 1D node works similar to Multi Blend 2D except it uses simplified single axis for blending. It’s more optimized and can be used for player crouching forward or left or right animations blending.

Multi Blend 1D

Blend Poses

In some cases it may be useful to play character animation selected by the pose index (random or provided by the parameter). For instance, you can play a player death animation by selecting a one from a set of various possible death type animations. This node offers also blending between two animations on selected pose change so the transition can be smooth.

Blend Poses

Open World Optimizations

Terrain and Fog

Creating terrain system was not enough to enable developers to create huge world. While Flax rendering pipeline is already quite optimized for big scenes we applied more optimizations to CPU rendering code and scene ticking code to make it run even faster. This results in great performance and less memory usage. Scene objects culling has been improved (using Radix sort and better data locality). Draw calls sorting is not only faster but Flax does not allocate any memory during scene rendering.

Scripting Improvements

Alongside the Editor improvements, we keep adding more features to the C# scripting API. Now you can use Int2, Int3 and Int4 types in your code for integer-type vectors. Flax will also display them in a proper way in Editor. We’ve improves scripts update logic so if your game doesn’t use many scripts but has large scenes you will see a significant performance improvement.

Now, you can also use default value for your properties. The dedicated attribute is not integrated into the editor and helps with scripts properties editing. See the following example code:

[DefaultValue(3.14f)]
public float MyValue;

[DefaultValue(typeof(Vector2), "1,2")]
public Vector2 StartPosition;

You can also use read-only values attribute for value-preview only purpose:

[ReadOnly]
public Int2 MyValue2;

Finally, we’ve exposed even more Editor C# API to the public so plugins can integrate with it even more and extend in future.

ModelActor renamed to StaticModel

The last very important change to mention is the ModelActor name refactor. Now it has type name StaticModel. We’ve decided to rename it early now to match the naming convention (as AnimatedModel type) and make it more related to its actual behavior: it’s non-animated, static geometry model. To match this change you will be required to update you game scripts and code to match the new type. All your scenes and assets should not be affected by this change (except minor cases of usage in Json assets that requires manual fixing). We’ve also updated our FlaxSamples so you can grab the updated project to try the out.

We just want to remember that during Alpha releases we still may introduce breaking changes to naming or data so please keep in mind that many engine parts may be still subject to change. However, it’s not likely to be done since we want to stabilize the engine before Beta release.


Wojciech Figat

Lead Developer

Leave a Reply

Your email address will not be published. Required fields are marked *