First off: I know a lot of the questions asked here can be found individually in various threads already. The reason(s) I am asking them again here are that some of the examples I simply did not understand 100% - and I am completely uncertain as to how I can combine all these things into one package. I apologize in advance for the wall of text.
The final result should be: A level with a dynamically animated skybox (multiple layers of clouds moving or NOT moving according to wind-direction). Included in the skybox are distant 3d-objects like skyscrapers or detailed terrain. Sun shafts should be influenced/blocked by clouds, distant objects and obviously objects within the level. Also the whole thing should work in multiplayer and a day/night cycle should be an optional possibility.
I have already found these threads regarding the issue of a skybox containing 3d objects, which make use of a second camera rendering the skybox and being drawn on a lower depth (if I am correct) than the main camera rendering the actual level.
- http://forum.unity3d.com/threads/7998-Skybox-for-geometry-(AKA-3D-skybox)
- http://stackoverflow.com/questions/19436558/unity3d-skybox-on-mesh-like-in-source-engine
How exactly this works is a bit beyond me, as I have limited experience with scripting, but I get the theory.
Considering the clouds and dynamic sky I have found various solutions, as well as come up with a few on my own.
So here is my theory (image thrown together quickly in MS Paint and SketchUp).
Fig.1 would be the actual level, rendered by the main camera on depth 2 (or whatever is nearest)
Fig. 2 would be rendered by a second camera and contain distant terrain and geometry. The whole thing would likely be scaled down / or be scaled to match with the fog distance. I am guessing this would come down to trial and error.
The camera is stationary and only mimes the rotation of the primary camera.
Fig. 3 depicts multiple domes layered over one another. Each dome has a different alpha-cloud texture, which scrolls across the mesh (brown arrow). The mesh itself could be rotated horizontally to match the wind-direction.
The camera, as with Fig.2 is stationary and only mimes the rotation of the primary camera.
For different /dynamic weather effects the different layers could have different type of clouds… or several layers could blend between textures (blending would have to occur on the final layer or the actual skybox anyways if there is to be a day/night cycle)
Here are my questions and issues with my theory (if you notice any more issues, please point them out or address them directly).
-
Would 3 cameras be required, or should the skybox, cloud dome and distant objects be rendered on one camera while the level is taken care of by another (so 2 cameras). Also which is better performance wise?
-
How would you resolve the scale issue of the distant objects (Fig.2)? Is there any certain system to it or is it, as I said, simple trial and error until the visual effect is just right?
-
Sun Shafts – as this is an effect applied to the camera itself, I am wondering how it works with multiple cameras rendering different objects… I have no clue on this one – nor do I have unity pro to test it out. As mentioned, it would be great if any geometry and even the clouds could block the sunshafts.
-
The advantage of the skydome is the hand-painted/textured clouds for visual quality… however I am uncertain if this is the most efficient way to do this. I am looking for an effect similar to the ones used in Dear Esther (for example). My main issues with this solution are:
- Texture size, for performance
- Alpha textures with varying degrees of transparency rather than just 0 or 1 (as well a performance issue?)
- Day/Night Cycle: the clouds would have to change in color over the course of dawn/noon/dusk/night. This could be done with a color slider and a script – at least that is my guess.
So my questions here are: is the performance loss high? If so, is it worth the visual effect and would the visual effect even be the desired one?
I know this is a lot so going through this step by step is fine by me. If my theory is also completely off the rails it would be very helpful if you could direct me to any other solutions/approaches.
Thanks a lot in advance!
