Skip to main content

Wave Engine Preview 3.2 | New Release

We’re excited to release WaveEngine preview 3.2 today. This new release comes with a huge set of new features and improvements.

The 3.2 preview highlights include a completely new GPU-based particle system on compute shader, which offers maximum performance on the new graphics APIs, and which is backward-compatible to those platforms which don’t support compute shaders. We also introduce a new completely dynamic shadow system with support for point lights, spotlights, directional lights, and all area light types. Finally, it is important to highlight the new auto scenes code generation, which improves the loading times in release mode. In this article, you can find more information about the rest of the changes introduced in this new version.

You can download WaveEngine 3.2 preview here and test the new set of samples from GitHub.

Also, if you want to know more about our newest graphic engine, discover Evergine!

Feature Highlights

Shadows

We introduce a new completely dynamic shadows system with support for all the current light types. This system is based on shadow map techniques using texture arrays for all light types to unify the filtering behavior and reduce the standard material shader code.

There is a new ShadowMapComponent that you can add to SceneManagers, which allows you to control some important parameters for all dynamic shadows of your project:

The three parameters allow you to change the size of the texture arrays used to hold the shadow maps by type of lights (area lights are considered point lights).

The shadow filter is based on an optimized version of PCF, used for all source light types, which improves visual quality when various types of shadow overlap.

The filter options are PCF 2×2, 3×3, 5×5, and 7×7. Here is a comparison of visual results using a point light:

The next parameter, “AutoDepthBounds,” helps to improve the visual quality for directional lights. For this type of light, we use the cascade shadow map technique with 4 cascades by default. This technique is used to represent shadows in large scenes, improving the visual quality of the closest elements by splitting the camera frustum range into parts and giving more shadow map pixels to closer areas.

Since the size of the frustum camera range is important to get better results, the distance between near and far camera planes should be as short as can be for a specific scene. To make it easier for the developer, AutoDepthBounds uses a compute shader to dynamically find the closest and farthest pixels in the last frame depth map, whose depths are used instead of the near and far plane, always getting the best visual results.

In this video, you can see shadows in a complex scene comparing the effect of using the AutoDepthBounds parameter:

Particle System

WaveEngine 3.2 includes a new particle system based on compute shaders to drastically improve the performance on the new graphic APIs, as well as maintaining backward compatibility with platforms that do not support compute shaders. It allows us to increase the particle count, interaction, and effects that affect them.

The key to this new functionality is the new ParticleSystem component. It allows you to specify a bunch of particle properties such as:

General properties: Number of particles, drag, gravity, simulation space (world or local)…

Material: Texture and particle render layer…

Other properties: Color, Life, Size, Velocity, Angle, Angular Velocity, Noise, and much more.

A particle system needs another component to specify where the particle is going to be emitted. For that purpose, we create additional components called particle shape emitters:

Primitive shapes: most commonly used shapes.

SphereShapeEmitter: emit particles from a sphere shape. You can specify to emit from the surface, from the center, or the whole volume.

BoxShapeEmitter: emit particles from a box shape.

CircleShapeEmitter: emit particles from a circle 2D shape.

PointShapeEmitter: emit particles from a position.

EdgeShapeEmitter: emit particles from a straight line.

EntityShapeEmitter: emit particles from the specified entity. It allows to create more complex particle systems:

Another interesting new feature is the possibility to apply forces to particles. We have included several components to help in that task:

PointAttractorForce: Attract (or repel using negative force) particles to a point.

WindForce: Apply a force to all particles in a certain range in a specified direction.

DragForce: The velocity of all particles under the influence of this force will be decreased.

EntityAttractorForce: Attract all particles to the specified entity mesh.

Scene code generation

We have worked to improve the load performance of the scenes. Using the new ‘Source Generators‘ .Net feature, the existing scenes of the project are converted to C# code, avoiding deserialization when it is loaded.

The next charts show how the load time of some test scenes has been reduced drastically in the Web platform when they are loaded from generated C# code:

Running these tests on Windows, the improvement is minor but still very noticeable:

At the same time, this change helps to improve the size of a built project in platforms where the linker is enabled (like web, UWP, Android..) and also removing the scene assets from the application content. For example, an empty Web project published in Release takes more than 6MB of DLLs using the 3.1 preview version, and with this release, it has been reduced to less than 3MB.

This first step using the new ‘Source Generator‘ feature opens a new door to improve many areas of WaveEngine, like optimizing exported assets, replacing the use of reflection, getting better code-editor interaction, …

Other improvements and bug fixes in WaveEngine 3.2 preview

  • Web platform mouse enter and leave fixed.
  • MathHelper constants and calcs precision improved.
  • New templates include a default additive layer.
  • The editor allows changing the scene viewer layout.
  • Editor color picker allows editing of the hexadecimal value.
  • Primitive meshes cache.
  • Net Framework 4.6.1 support restored.
  • Non-generic overloads for container methods added.
  • Launcher auto-update checksum fixed.
  • Editor entity control undo/redo fixed.
  • The editor shows detached tabs in the taskbar.
  • Editor thumbnails generation fixed for small textures.
  • Editor keyboard shortcuts working when the entity tree is focused.
  • Editor entities count fixed.
  • Editor light theme fixed.
  • Editor effect selector in material viewer now does not show compute effects.

 

logo plain concepts