Hey guys, we are working on a side scrolling 2D game. We try to achieve some nice depth in our background arts, so we need to take the atmosphere into account. So layers that are further away need to get gradually more blurred, less detailed and colored towards the atmosphere. (f.e. a blue sky in the background) To illustrate this: Here is a screenshot of Rayman. We are wondering what would be the best way to achieve this on the technical side. Would you take all of that into account while drawing the assets (maybe even with some non-destructive photoshop techniques) or draw them as if they are all on the same layer and "correct" the assets inside the engine afterwards. I see pro and cons for both ways, but would love to hear your thoughts about it. I am really confused.
There are multiple options. Do 2D/3D assets, which represent further distance. Probably harder to maintain, but cheaper for game to run. Or having separate rendering layers, with possible post processing. Distance Fog. Custom shaders. Mix of these.
You can add a Halo to an object(s) in the back ground and set the amount of haze you want and even the color. https://docs.unity3d.com/Manual/class-Halo.html However, I don't know the extent of performance cost or whether it will work on specific mobile devices.
Thank you both for your answers, we don’t have any plans to release our game to mobile, so it sounds like a mix oft the named techniques maybe the way to go for us. But I wonder how performance heavy those techniques really are. Maybe someone already worked on a similar project and can provide some insights? Either regarding performance or asset creation.
Test it and profile it. There isn't defined answer, as things can be optimized in many ways. And from project to project could be completely different answer.