News Liste Synergy

Devlog #5: Shadows and Depth
Synergy
10.11.23 17:00 Community Announcements
Hello everyone!


Welcome to this new Devlog, which will be a little more technical than the others as we will tell you about the process of creating shadows and depth in Synergy!


While creating the game, we faced a common challenge in top-down 2D games - sorting rendering elements. The go-to strategy is drawing elements from top to bottom based on the texture's baseline, but it doesn’t work in some cases!

Buildings and environmental elements vary in size and don't always have a square base. As a result, larger elements may need to be rendered behind smaller decorations, even when they are lower on the screen. Simple fixes, like dividing long decorations into sections, can resolve these issues.



But this approach isn't quite suitable for us because in Synergy, the buildings are animated. Cutting them into sections would complicate production.

We opted for a solution similar to what is done in 3D games: sorting the entire game environment with a Z-buffer.



This not only allows us to sort buildings and the environment without issues but also gives us the ability to position characters realistically within the buildings!



To have a functional Z-buffer, we needed a basic 3D model of each building or environmental element and to store depth information in a texture.



We use Blender for our 3D models, and an in-house tool makes a standardized file for each of them, ensuring consistent depth textures for all buildings. After that, we process the texture to smoothly integrate it into the engine, using a filter in Substance Designer.



With a depth representation of the building, we can explore various visual effects by accurately determining the world position of each pixel in the environment!



This allowed us to implement our atmosphere and fog system, enhancing the world's relief and visual appeal.



Access to 3D information in the game allows for dynamic shadow casting on the screen. The process is a bit intricate.

In typical 3D games, shadows are rendered by comparing the Z-buffer from the game camera to the light source's perspective. However, our depth textures are limited to the game's view, not the light source's. So, we use rays from surfaces to the light until they hit a building for shadows.

It may not be the most efficient, but it provides interesting results in our 2D world. To maintain smooth gameplay, we generate intermediate images to estimate distance for optimal performance.



Simply having depth information doesn't cover the thickness of a decorative element. For the most accurate shadow, we have to estimate thickness; otherwise, the shadow appears too large and incorrect.

The building's thickness is estimated based on the rendered element's width. This way, a pole or column looks less solid than the body of a house.



There is still some work left to enhance shadow quality and performance, but it's a visual bonus well worth the effort.

We hope you enjoyed this 5th Devlog and thank you for your support during this project. See you soon for the next one!

https://store.steampowered.com/app/1989070/Synergy/
Logo for Synergy
Release: Genre: Simulation Entwickler: Leikir Studio Vertrieb: Goblinz Publishing Engine:keine Infos Kopierschutz:keine Infos Franchise:keine Infos
Einzelspieler Mehrspieler Koop

Aktuelle Steam News
Neue Steam News in der ePrison Datenbank

Update 0.2 - Corrective patch #2
Synergy
12.08.24 15:05 Community Announcements
Hotfix - Spanish Tutorial issue
Synergy
06.08.24 13:56 Community Announcements
Update 0.2 - Corrective patch #1
Synergy
31.07.24 17:12 Community Announcements
0.2 update out now!
Synergy
23.07.24 15:27 Community Announcements
SimFest + Update 0.2 Launching Tomorrow!
Synergy
22.07.24 17:05 Community Announcements
Opening an experimental branch!
Synergy
10.07.24 16:08 Community Announcements
Patch #2 - 12/06/2024
Synergy
12.06.24 11:07 Community Announcements
Patch #1 - 06/06/2024
Synergy
06.06.24 13:47 Community Announcements
Hotfix #4 - 29/05/2024
Synergy
29.05.24 15:14 Community Announcements
Hotfix #3 - 24/05/2024
Synergy
24.05.24 13:30 Community Announcements
Hotfix #2 - 23/05/2024
Synergy
23.05.24 13:15 Community Announcements
Hotfix #1 - 22/05/2024
Synergy
22.05.24 14:42 Community Announcements
Early Access Out Now!
Synergy
21.05.24 15:03 Community Announcements
Release date announcement!
Synergy
22.04.24 17:10 Community Announcements
✨ Synergy - Steam Next Fest
Synergy
09.02.24 11:15 Community Announcements
✨ Synergy - Steam Next Fest
Synergy
05.02.24 17:38 Community Announcements
SYNERGY DEMO IS OUT NOW!
Synergy
02.02.24 16:07 Community Announcements
Devlog #6 - Well-being and Neighborhoods
Synergy
19.01.24 16:55 Community Announcements
Devlog #5: Shadows and Depth
Synergy
10.11.23 17:00 Community Announcements
ICYMI: Synergy's latest trailer is out!
Synergy
31.08.23 15:00 Community Announcements
Devlog #4 : Research and Flora
Synergy
28.07.23 15:30 Community Announcements
Devlog #3: The citizens
Synergy
25.05.23 13:25 Community Announcements
Buildings plans & Environment unfolds
Synergy
17.11.22 17:04 Community Announcements
Devlog #1
Synergy
12.08.22 15:42 Community Announcements