- Home /
renderning quality on far away objects
hey everyone,
i've created a flying game, where you are in a plane, and i have a fairly large terrain.
it also has some trees, and the trees dont't render as 3d until i get just above them, and it doesn't look that good when your flying over a tree, and it all of a sudden grows really quickly... and also, you can't see much of the terrain, as it generates as you get fairly close to the edge... i was just wondering if there was a way to improve these two things...
thanks
-Grady
Answer by aldonaletto · Jun 28, 2011 at 02:04 AM
If the terrain seems to be cut at some fixed distance, the problem is the camera's far clipping plane - its default value is 1000 m, which is too short for a flying camera. You should set the Far Clipping Plane to the length of your terrain. If your terrain is too large, you may notice that lakes and other objects "buried" in the terrain start to have jittered margins. It's caused by inaccuracies in the Z (or depth) buffer, and you can solve this by increasing the distance of the Near Clipping Plane (even small changes in this parameter result in great improvement). Finnally, you should adjust some Fog level in the Edit->Render Settings menu to make the terrain vanishes in the distance (you surelly will not want the borders of your terrain to appear). The fog is also useful to reduce the distance of the far clipping plane: if your fog settings limit the view distance to 5000 m, for instance, you can set the far clipping plane to this value, thus reducing Z buffer problems (and improving performance, since there will be less objects to be rendered).
thanks, it all works now except that the more i increase the near clipping plane, parts of my airplane will dissapear.... and when i change the clipping plane from 0.01 (default) to 1, it improves extremely, and barely has any white lines left on the objects..... but if i increase it more, then it will just stay the same, no more lines will dissapear.....
The best way to adjust these parameters is:
- Adjust the fog intensity: the terrain should vanish in the fog at a reasonable distance; you must experiment to achieve the desired results.
- Adjust the FAR clipping plane so that the terrain won't be clipped before vanishing in the fog;
- Only increase the NEAR plane distance if you have problems with objects "buried" in the terrain. When you have objects which intersect with the terrain, the video card uses the Z buffer to decide which part of the object is visible. If the near plane is set too low (below 0.3), when flying you may notice the borders of these objects varying randomly while you move. This is caused by inaccuracies in the Z buffer, and increasing the near plane distance greatly improves its accuracy - but you may have the nearest parts of your airplane clipped, since nothing before the near plane is drawn.
The Z buffer values represent the distance of every pixel rendered in the screen measured from the near plane. A non-linear function is used to compact the distances in 24 bits (the usual word size for the Z buffer). This function is much more sensible at small distances - that's why the near clipping plane has much more influence on the Z buffer accuracy than the far plane.
Usually the best range for the near clipping plane is 0.3 to 0.5
Answer by testure · Jun 27, 2011 at 11:28 PM
If you're using unity's built-in terrain, there are LOD options for the terrain:
http://unity3d.com/support/documentation/Components/terrain-OtherSettings.html
ok, i fixed the tree issue, but still i can't figure out how to make the terrain that is further away appear when you are not close to it..... :( ...
Your answer
Follow this Question
Related Questions
Increase tree draw distance 1 Answer
Cannot see grass terrain unless I zoom in. 1 Answer
Terrain distance rendering 1 Answer
LWRP Trees Billboard not working as expected 0 Answers
Tree rendering distance 1 Answer