I am currently trying to build a skydome. In small levels it is no problem, but in a large scale scenario the dome is much too big to be seen by the main cam with the desired camera-setting. I dont want a max culling of 15 km just to make sure the dome can be seen from each edge of the terrain... That would definetly ruin performance. What can i do? Thanks in advance! Frank
If I understand your question correctly, why not just parent your skydome and main camera to an empty game object so it moves (but doesn't rotate) with your camera. Depending on how your camera moves/rotates, you may have to do some fancy coding, but that's the general idea.
Yes i do. A skybox uses plenty of textures for a not so good effect at all. A skydome can be modyfied ingame by changing gradients. The result is much cleaner and the whole system gives lots more options. I would prefer keeping the dome steady because of the planned cloud simulation... The plan is, to create a simple but convincing environment simulation including day-/night-cycle, and some weather effects so that they can be called during the Game, when they are needed.
Create another camera. Render the skydome camera before your main camera. You can clear the depth buffer without worry on the main camera since the skydome is always behind everything.
Better not. I am trying to use as less resources as possible. And 6 movies at an acceptable resolution could not be considered anywhere near "less"... to create them would be a real pain and the performance drop when playing 6 movies in real time... But thanks anyway. Any idea is welcome. On a skydome you can get a nice clean atmospheric gradient effect with a single texture using 64 x 256 pixels or simply use an animatable gradient shader for day/night effects... and you can use projectors on it without getting artefacts you would have when projecting into the corner of a skybox for example... Skydomes offer much more control, they are easier to use and consume less resources while presenting better results.
Go to your 3D App, create a sphere, cut it in half, turn the normals inward... apply a gradient texture... import to unity, create second camera and set the cam parameters as stated above in this thread... It takes about 15 minutes including texture creation... To have clouds, create a mesh with some dozen loose polygons... import to unity, apply a particle mesh emitter and a particle renderer... remove the mesh renderer... and again 15 minutes later you can have controllabe volumetric clouds... Add another hour for tweaking the dome texture, cloud particles and cloud mesh. There you go. I never created a convincing skybox texture in such a short time... usually it takes many hours and without the correct software packages you can easyly spot the corners of the box, because the textures are not correctly curved...
Why not carry this to the next step? You can leave the whole sphere in place, have it rotate slowly and texture a night portion on it. Then you have a moving sky with sun and moon.
Wow this sounds great, I definitely planned a 'dynamic' weather system as an integral part of my gameplay and I'm not that keen on the cube skybox either - got any screenshots or web players you could show? Cheers Boxy
That is the plan. But i will use a changing gradient to achieve that effect. @ Gaston - Look at (or just use) the attached texture to color your skydome. Use a cylindrical projection @boxy - here you go. I used the enclosed texture on the example skydome and a light that hits the skydome only. The clouds are created from the standard assets smoke particle. The scene took just a few minutes to set up. And it would take only a few more minutes to get the colors right, so it would look like a real sky I am currently testing to get more depth into the clouds. Maybe i can use bumpmaps on particles to achieve that. Another option would be a fresnel shader or so... any other ideas are welcome. I will post more results soon.
I´ll post a little .unitypackage this evening, so you can see how it works. Maybe we can get a nice environment simulation from this here together. My skills are mainly on graphics, so i will concentrate on creating better effects. Is anyone willing to do some coding? F.e. spawn cloud meshes and move them around, change colors, maybe a gradient shader, sunrotation... so we end up with a nice environment wizzard?
Sounds like a nice idea Only thing I've noticed is that on my macbook pro there is a definite gradient banding, which isn't serious but means you can tell the sky object isn't as big as a planet Maybe that is just down to compression? Cheers Boxy
why couldn't you apply a gradient to a sky box. so you would only need 3 textures for that; top, bottom and gradient sides. that way you will have that infinite effect that the sky box does so well. then make a skydome for the moving clouds and other effects. so you base you cloud nulls off the sphere curvature. then use a directional light for the sun movement. but i agree i would love to see this moved to the collaborative section of the forum and see this turn into a nice little realtime environment modeling project. cheers.
I havent found the time to build a unity-package, but attached you´ll find a webplayer with skydome and moving clouds. @thylaxene - i agree that a skybox can do certain things quite well, but again i have to create a gradient with very exact curving. I dont want to do that... painting straight or just do a gradient in photoshop is much easier and of better quality. @boxy - I can see that banking effect too here. Maybe i should increase the gradient to 1024 in height for a smoother look. The next step will be a texture projection on the skydome for additional atmospheric effects...
Instead of using a light, that illuminates the skydome-layer i used a self-illuminated texture in the attached example... The banking is gone now.
Very cool. Its nice to see moving clouds in an environment, works really well. Going to have to find some time to try and learn this one Cheers Boxy
I have opened a thread for a community project in the collaboration section. Please post any further suggestions, questions and ideas here: http://forum.unity3d.com/viewtopic.php?t=8881
Hi. I have the same problem with a Space game. I have a huge SkyDome and some times my spaceship camera doesn't render my skydome although its FAR is larger than the Dome. I really don't understand the solution of this problem. It happend only in my mobile phone, but not in my PC. Thank you very much for your help.
Just thought I'd chime since I've encountered similar issues - what seems to work so far is using a separate camera at the lowest depth that has a culling mask set to only render a special "skybox" layer. This layer contains the skydome mesh, ships in the sky, clouds, or anything far away. The farClipPlane values can be set to extreme distances and it works with culling as well. Also I just offset the sky texture for movement (w/ careful UVmapping to keep things in proper perspective).