[h1]Hello Riftbreakers![/h1] As you might have noticed from all the promotional materials we’ve released on the topic of the Fungal Swamp, this new biome is a lot different from the other areas of Galatea 37. Of course, all biomes are unique thanks to their varied fauna and flora, but the Swamp stands out because of something else. The amount of dry land is by far the lowest among the biomes we’ve visited so far. Not only does this present a building challenge to you, but also a visual challenge for us. Liquid pools were never the strongest point of The Riftbreaker’s visual presentation. However, thanks to the improvements in The Schmetterling Engine, this will change with the World Expansion III update. https://store.steampowered.com/app/2506610/The_Riftbreaker_World_Expansion_III/ [b][i]Wishlist, pretty please?[/i][/b] For a long time, we did not have support for rendering transparent materials in the engine due to the constraints of deferred shading. Last year, we made an effort to switch to a new shading technique called tiled deferred shading, which we described in detail in this article. This change was largely dictated by the fact that an idea for a water-based biome has been brewing in our minds for quite some time. Transparent materials were the first step in order to pull this off properly. After a period of experimentation carried out by the graphics team, we arrived at this result: [img]https://media.giphy.com/media/v1.Y2lkPTc5MGI3NjExc3cwMWI1N3J4cTRuMnBwOHNvdXF4M2toZzMzYXE1OG1hN3dpYnZpdiZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/pW9vWgSCB65Jr4OnBc/giphy.gif[/img] [b][i]Each physical element that comes into contact with water causes waves to appear.[/i][/b] As you can see, the water we created is not perfectly clear. Moreover, the deeper the pool is, the darker the water gets. This way, we can simulate how the light behaves in the liquid without having to carry out the complex math of light refraction. It is done via a shader that controls the color of the liquid material based on the depth of the pool. This way, we can change the appearance of the liquid by adjusting shader properties. It also means that you can potentially create mods with new liquids and custom looks based on what we’ve done. [img]https://media.giphy.com/media/v1.Y2lkPTc5MGI3NjExaGJ5Y2x2Znp2MGMwamNxdW1oYjVyNndxczhyY3RzbW5nMDVrOWI3cSZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/EvIMnqqh67ac9R9qZ3/giphy.gif[/img] [b][i]'Water' in the prologue mission did not look like water at all, however, we did not have the correct tools to make it better.[/i][/b] Naturally, filling a pool with water or any other liquid is not enough to simulate the behavior of a real liquid pool. To make a convincing lake, you need more than water. The bottom of the lake must be filled with various stones and plants, and the formation of the terrain itself must vary as well. Our level designers carefully redesigned every liquid pool on every tile in the game, creating a believable layer of tiny decorations hidden beneath the surface. You might not notice them a lot in-game, but believe us - if they weren’t there, the game simply wouldn’t look right. [img]https://media.giphy.com/media/v1.Y2lkPTc5MGI3NjExZjViaHlhcmtpMXp4dGhxaHByY2dqN2k0bHRvYjR6aDkwY20xcmRoOCZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/xIvnOOGDIMgepJlIw2/giphy.gif[/img] [b][i]After the switch to the new system, the water looks much more convincing. The waves that appear on the surface play a huge role in that. The edges of liquid pools are much more distinct in the new system and easier to notice.[/i][/b] Another aspect of a good looking water simulation is convincingly portraying the waves and ripples on the surface. That’s a job for another custom shader. First, we made sure that each vertex that comes into collision with the surface causes concentric waves to appear. This is visible when Mr. Riggs walks through a lake, for example, but truly shines when you observe a creature with more than two legs. In the case of Stickrids, for example, you can see each of the six legs causing its own ripple effect. In addition, the waves multiply and cancel each other out if they come into contact. [img]https://media.giphy.com/media/v1.Y2lkPTc5MGI3NjExMmJxNWVrM21udHhzY2NiMzFqMXQ5NTUzemRveXZlbjFsd3V1Mm93MSZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/Qj5YqR0r02H03xCCZ9/giphy.gif[/img] [b][i]In the previous system we faked waves and ripples by using a 'refract' particle effect, which generally caused chaos on the screen.[/i][/b] [img]https://media.giphy.com/media/v1.Y2lkPTc5MGI3NjExb2ozcmZqeGpqbW0xZWk0bG9pZG9uY3ZzcWM0MDltOGlvM3Z3ODJlZyZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/E7orxnYtlRkNT3q11T/giphy.gif[/img] [b][i]The new and improved version. It takes some time for the surface to settle after it's been disturbed.[/i][/b] However, some phenomena can also cause waves to appear on water despite not making direct physical contact with it. Explosions and shockwaves caused by rockets and other projectiles should also have a visible effect and cause a wake to appear. The solution to that required some creativity, but we made that happen. Explosions and large projectiles now have an invisible collision sphere attached to them. The sphere is large enough to come into contact with the liquid surface. Thanks to that, our shader knows that it should cause waves to appear. The effect looks great, especially when you shoot multiple rockets - just check out the new and improved Swarm Missile launcher! [img]https://media.giphy.com/media/v1.Y2lkPTc5MGI3NjExZXYzbHg5anVkb3hycnVoMDhhcTczc3lzaDZpMmh3d21vajc3enYxayZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/QMso0s1bj4WxoJVfcO/giphy.gif[/img] [b][i]The improved Swarm Missile Launcher is a great tool for testing the 'interactability' of the liquid pools![/i][/b] Additionally, to give our lakes a more lively and natural look, we decided to sprinkle in some details. Take water lilies as an example. All the vegetation and decorations in lakes are created using our prefab system. The level designer marks the area to be filled with a prefab, and the system spawns various props on the ground. However, we give water lilies a bit of special treatment. The game always spawns them on the surface of the water. This way, you can decorate your lakes, even without the ability to place objects directly on the surface in the editor. We also made sure that whenever a liquid comes into contact with the ground or a prop, you will see delicate foam forming at the point of contact. This allows the ground and liquids to blend in a natural way. [img]https://media.giphy.com/media/v1.Y2lkPTc5MGI3NjExMWc4ZWo4ZDJyMnp6aXlvYzN6bmk5bDFzM3Bha3NwOWljeDNqcmtiOSZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/rm6mBK8sZ9cpdGf1d4/giphy.gif[/img] [i][b]The refraction effect looked quite okay on some liquids, but it wasn't the level we were satisfied with.[/b][/i] [img]https://media.giphy.com/media/v1.Y2lkPTc5MGI3NjExeXUwc3VtdnpqcGlybnRudTE4M2ZxYmloNzYxMjBmNTQ3cXAxd2xjdCZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/bcVDio7JtjGmAIkQSG/giphy.gif[/img] [b][i]Things can always look better. We won't stop improving.[/i][/b] We applied these changes to all the liquids in the game, so all the biomes are going to get a visual boost with the arrival of World Expansion III. Naturally, these changes are not without a performance cost, so if you would rather have a couple of extra frames per second or just do not enjoy these effects, you can simply flick a switch in the options menu to turn the water simulation off. If you’re on the fence - come and see the new liquids live at www.twitch.tv/exorstudios - we’re on at 3 PM CEST on Tuesdays and Thursdays. Drop by Discord to get notified about that: www.discord.gg/exorstudios See you next time! EXOR Studios