24/4/2024
|
Case studies

Enhancing Game Visuals with Zibra Liquid and Zibra Smoke & Fire - A creator's journey

Project description:

Echoes of Somewhere is an ambitious 2.5D point and click adventure game anthology series in development, depicting a dystopian future, where human society is ruled by machines. 

The project aims to create immersive experiences utilizing AI-assisted graphics and storytelling. 

One of the visual elements the creators sought to incorporate was realistic, interactive smoke, liquid & fire effects to enhance the game's atmosphere and authenticity. 

Volumetric smoke

Creation of performant volumetric effects with Zibra Smoke & Fire functionality

Current challenges:

Creating VFX for games, artists have to consider various challenges. First, games have to run smoothly on a wide range of hardware. This means VFX artists have to create effects that look good and perform well on lower-end hardware, which can limit visual fidelity for owners of high-end hardware. 

VFX can also significantly weight down the asset size, drastically increasing game storage requirements. 

Echoes of Somewhere is a game that needs to run on both low and high-end PCs

According to one of the game creators, Jussi-Petteri Kemppainen, the initial approach to creating the desired smoke effect in Echoes of Somewhere involved using EmberGen, JangaFX real-time fluid simulation software. 

The process required exporting pre-rendered flip-book animations. 

However, flipbooks can be limiting in terms of fluid simulation duration. Additionally, as far as these textures are baked into the game, limited interaction between the fluid simulations and the 3D game environment was also a concern. 

Solution:

The developer turned to Zibra Smoke & Fire as a potential solution to these challenges. Zibra Smoke & Fire offers real-time, AI-powered smoke and fire simulation for Unity. 

“My only concern was performance. I had experimented with Niagara fluids in Unreal 5, and they eat up quite a bit of performance. To the point of being unusable for now. 
Luckily, I had a direct connection to the Zibra guys, and they showed me some demos of it running on the iPhone. It ran amazingly well! The quality was great, the frame rate butter smooth.”

Realization process:

The realization process was straightforward. Within the framework of Zibra Smoke & Fire, each manipulator has an SDF (Signed Distance Fields) component, which defines its shape.

This feature empowers users to create emitters in the form of static or skinned meshes. In a given scene, Zibra Smoke & Fire was utilized to add a cylinder emitter to a moving train for generating smoke. 

To introduce motion to the smoke particles as the train moved, the “Use Object Velocity” parameter was enabled. This feature determines whether the velocity of the emitter GameObject should be applied to the emitted smoke or fuel particles. 

When activated, the emission of smoke or fuel particles combines the velocity of the GameObject with the Initial Velocity settings.

Afterwards, the look of real-time simulated smoke was enhanced with a force field: 

“I also created a ground collision shape and a force field that adds random forces & twirls to the smoke to make it look more interesting and natural.”

Fine-tuning the visuals:

Fine-tuning the visuals mainly involved matching the smoke color to the scene. Zibra Smoke & Fire has many built-in parameters that enable users to control the look and behavior of the simulation according to their needs. 

The smoke's lighting was adjusted using a directional point light, a part of Zibra Smoke & Fire unique lighting system.  

The end result was a realistic, full-screen smoke simulation with complex scene interactions that added only about 2 ms to the frame times, showcasing Zibra Smoke & Fire performance efficiency.

Unlock a new level

of realism

background image with smoke

Interactive liquid

Creation of interactive game mechanics based on realistic liquid physics with Zibra Liquid functionality 

Current challenges:

A further challenge was to include liquid simulation. In the first episode of Echoes of Somewhere, the story is focused on water. 

The developer wanted to use realistic water effects to create custom game mechanics based on liquid control, where water reacts to player actions and interacts with its surroundings in real-time. 

Solution:

Having used Zibra AI’s smoke and fire effects before, the creators turned to Zibra Liquid to create custom game mechanics based on realistic liquid physics. 

Zibra Liquid employs Signed Distance Fields (SDFs) to enable precise interactions between the liquid and scene geometries, ensuring realistic collisions and behaviors.

“Zibra AI tools contain scripts that allow you to generate an SDF from either rigid, or skinned geometry. This allows their fluids or smokes to collide with complex, even animated geometry. You do not need to worry about colliders or anything, really. Just make sure the mesh is watertight (it does not have holes)”. 

The solution also uses AI acceleration to optimize both performance and memory footprint, making it possible for simulation to interact with various objects using their precise shapes, without need to manually setup approximated collisions, sacrifice collision precision or performance.

Realization process:

The creator modeled a detailed, watertight scene mesh in Blender. 

High level of detail made it possible to ensure that the water could go in all the nooks and crannies, providing realistic collision of liquid simulation against scene geometry. 

Afterwards, the scene was integrated into Unity. A Neural SDF was generated from the geometry to serve as the base against which the water collides. 

“I was lucky with my scene and the SDFs just worked out of the box! The water has pretty nice collisions with the scene mesh. Everything in the scene is stored in the same mesh, there are no colliders, just polygonal geometry.”

Fine-tuning the visuals:

To achieve natural-looking water, the developer tweaked several liquid parameters, such as the index of refraction, scattering, and absorption. 

A dark color was chosen for the water, and the simulation volume resolution was increased to make the water behave more naturally.

“When I was tweaking the options, I found out that the most natural look comes when the index of refraction was set unrealistically low and the scattering to 0 and the absorption to some low value. With a dark color, this made the water look pretty natural to me. You can also render the water as a normal mesh with any custom material you like, but I found out that this made the performance dramatically worse“.

Shadows were added to the scene to give depth and realism to the water simulations. A reflection probe was also incorporated to enhance the visual fidelity of the water by reflecting the environment.

“I duplicated my special shader version of the scene mesh (that has the custom shadow renderer and placed a simple default lit shader on it and changed the render to shadows only. This is to make the environment cast shadows on the player character when it is moving in the scene. It now also casts shadows on itself as well, but it seemed to work ok as long as I lined up the light with the shadows that were in the AI image. The fluid rendering also requires a reflection probe, so I placed on in the scene and created an otherwise invisible mesh contraption that fills the probe with something for it to reflect.”

To adjust the behavior of the simulation, the creator also set up the volume resolution parameter. 

“Getting the water to act naturally requires the simulation volume resolution to be quite high. In this scene there also is quite a lot of water, so the volume had to be rather large. I was pretty surprised to see this scene run in Unity editor at 100fps even on my M1 Max. on my PC with 2080 it easily surpasses 250fps. This is pretty bonkers!”

Zibra Liquid and Zibra Smoke & Fire played a key role in enhancing the Echoes of Somewhere’s visuals, making them more realistic and immersive. 

The creators faced challenges in developing special effects like smoke and water that were both high-quality and efficient for different gaming devices.

Zibra AI solutions solved these issues. Zibra Smoke & Fire introduced realistic smoke effects that fit the game's environment and make it look more natural using only a modest amount of frame budget.

Additionally, Zibra Liquid enhanced the game's liquid elements, and allowed the developers to create water that responds to the player’s actions and interacts with its surroundings in a believable manner. 

Take a more detailed look at the full creator's journey in Jussi Kemppainen's blog.  

More about Zibra Effects

Zibra Effects is a multipurpose, no-code toolset  designed to simplify VFX creation and make virtual worlds more immersive by leveraging real-time simulation and realistic physics. 

Powered by a custom physics solver and unique technology for neural object representations, it makes it possible to easily create realistic, high-quality VFX based on real-time simulated liquid, smoke and fire. 

These effects can be used on small to medium scale and applied for various use cases, from PC, mobile, and console games to cinematics and even MR projects. 

Read more about Zibra Liquid, Zibra Smoke & Fire, Zibra Effects and their potential applications here.

Read more about

Zibra Effects and its potential applications

background image with smoke

Dig Deeper