Devlog # 52 - Water effects
Hi guys! Hope you are enjoying our water devlog series. Water is a crucial element in the game, adding depth and interactivity to the game world. From creating immersive visuals to simulating realistic physics and effects, the implementation of water was a multi-faceted challenge that pushed our creativity and technical skills. In this devlog series, we’ve explored various aspects of how we brought water to life. The last two parts focused on character and interactive physics in water. Today, let’s dive into water visuals and the various effects that bring it to life.
[previewyoutube]https://youtu.be/s3SYq48etoM[/previewyoutube]
Water Visuals and Shader Implementation
Water in Lost Twins 2 is generally cuboid in shape, whether it’s in a tank or sometimes suspended in the air. To achieve this, we added planes on five sides of the cuboid, excluding the back plane. We created a custom water shader with parameters like tint, specular highlights, and most importantly, distorted refraction—a key element in making it feel like water.
The front plane, positioned close to the camera, distorts everything behind it, including characters, interactables, and the environment. This distortion is achieved using a normal map integrated into the material. The distortion effect is dynamic, influenced by a noise factor that changes over time.
Although all five planes use the same shader, their materials have slightly tweaked parameters to enhance the overall look and feel. For instance, the side, top, bottom, and front planes each have unique material settings to ensure visual consistency and immersion.
[previewyoutube][/previewyoutube]
Character Interaction
When a character or interactable enters the water, we simulate bubbles, foam, and turbulence using spritesheet effects. We utilize two distinct spritesheets: one for the water surface reaction and another for underwater turbulence.
The effects dynamically adjust based on the object’s velocity, particularly in the Y-axis. For example, objects dropped from a greater height create more pronounced turbulence before buoyancy takes over. The FX scale and movement adapt to the object’s behavior, adding a sense of realism.
While we initially experimented with Unity’s particle system, it didn’t achieve the desired visual quality. Ultimately, we opted for custom spritesheets to better match the aesthetic we envisioned.
A similar approach was taken for when characters climb out of the water. We used a different spritesheet to simulate water splashing onto the character and surrounding environment. This effect adds a finishing touch, enhancing the interaction’s believability.
[previewyoutube][/previewyoutube]
The Water Wall
Another unique feature is the “water wall,” which characters can pass through while still containing water when objects are thrown into it. Initially, we tried creating the wall using two parallel planes with a 0.2-unit distance between them, adding front and top planes for thickness. However, for optimization, we simplified the design to a single side plane. Despite this reduction, the addition of front and top planes creates the illusion of thickness, maintaining the desired visual effect.
[previewyoutube][/previewyoutube]
Thanks for sticking with us through this deep dive into water implementation! We hope you enjoyed learning about the techniques and creativity that went into making water a key feature in the game. See you next time!
Best regards,
Playdew Team
https://store.steampowered.com/app/1752540/Lost_Twins_II/
[previewyoutube]https://youtu.be/s3SYq48etoM[/previewyoutube]
Water Visuals and Shader Implementation
Water in Lost Twins 2 is generally cuboid in shape, whether it’s in a tank or sometimes suspended in the air. To achieve this, we added planes on five sides of the cuboid, excluding the back plane. We created a custom water shader with parameters like tint, specular highlights, and most importantly, distorted refraction—a key element in making it feel like water.
The front plane, positioned close to the camera, distorts everything behind it, including characters, interactables, and the environment. This distortion is achieved using a normal map integrated into the material. The distortion effect is dynamic, influenced by a noise factor that changes over time.
Although all five planes use the same shader, their materials have slightly tweaked parameters to enhance the overall look and feel. For instance, the side, top, bottom, and front planes each have unique material settings to ensure visual consistency and immersion.
[previewyoutube][/previewyoutube]
Character Interaction
When a character or interactable enters the water, we simulate bubbles, foam, and turbulence using spritesheet effects. We utilize two distinct spritesheets: one for the water surface reaction and another for underwater turbulence.
The effects dynamically adjust based on the object’s velocity, particularly in the Y-axis. For example, objects dropped from a greater height create more pronounced turbulence before buoyancy takes over. The FX scale and movement adapt to the object’s behavior, adding a sense of realism.
While we initially experimented with Unity’s particle system, it didn’t achieve the desired visual quality. Ultimately, we opted for custom spritesheets to better match the aesthetic we envisioned.
A similar approach was taken for when characters climb out of the water. We used a different spritesheet to simulate water splashing onto the character and surrounding environment. This effect adds a finishing touch, enhancing the interaction’s believability.
[previewyoutube][/previewyoutube]
The Water Wall
Another unique feature is the “water wall,” which characters can pass through while still containing water when objects are thrown into it. Initially, we tried creating the wall using two parallel planes with a 0.2-unit distance between them, adding front and top planes for thickness. However, for optimization, we simplified the design to a single side plane. Despite this reduction, the addition of front and top planes creates the illusion of thickness, maintaining the desired visual effect.
[previewyoutube][/previewyoutube]
Thanks for sticking with us through this deep dive into water implementation! We hope you enjoyed learning about the techniques and creativity that went into making water a key feature in the game. See you next time!
Best regards,
Playdew Team
https://store.steampowered.com/app/1752540/Lost_Twins_II/