I am making flight simulator( my first Unity project) , the biggest challenge so far is terrain, so whenever I fly away from it (not that far) the terrain starts flashing and disappears which is just green mountains, so when i come back to it, i have no idea where its position is, but it suddenly appears (again flashing) when I am close , the terrain size is normal but it's on top on a huge other terrain (about 100,000 * 100,000 which is the max),I tried changing pixel error and base map distance, no change, I looked at big terrain solutions online, but non of them really helped me, Any advice? Thanks
Answer by AurimasBlazulionis
Mar 19 at 07:11 AM
You need to increase camera far frustum to a bigger value. But also, you then need to try to make the near clip as far as possible (but not clip into the plane) because otherwise, the polygons far away from the camera, but close to each other will "fight" for being drawn (this is called z-fighting).
If you really need close near clip, you can use 2 cameras. The first one being near clip 0.01. far clip - 300 and make sure clear mode is set to depth only. The second camera near clip is 300, far clip is lets say 50000. Clear mode - skybox. Make sure the first camera's depth is above the second so it is drawn over the second camera. Also, this will not work well with deferred rendering and hdr. Also, some image effects might mess things up.
Thanks for the reply, I am new to unity , can you please expand your answer about these features you described like frustum) ? I looked them up and couldn't tell what they actually do
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users navigate the site we have posted a site navigation guide.
If you are a new user to Unity Answers, check out our FAQ for more information.
Make sure to check out our Knowledge Base for commonly asked Unity questions.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
Answers and Comments
114 People are following this question.
Fast way to texture a 10km map?
Texture doesn't look the same
Is there a way to add detail maps(smoothnes/metalic) to terrain textures?
How to fix the striping artifacts on terrain?
Blue stripes on my terrain? What is it?