x


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

more ▼

asked Jun 27 '11 at 11:00 PM

Grady gravatar image

Grady
1.1k 66 70 82

(comments are locked)
10|3000 characters needed characters left

2 answers: sort voted first

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).

more ▼

answered Jun 28 '11 at 02:04 AM

aldonaletto gravatar image

aldonaletto
41.2k 16 42 195

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.....

Jun 28 '11 at 04:01 AM Grady

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

Jun 28 '11 at 06:25 AM aldonaletto

Thanks, you helped alot :)!!!!!!

Jun 28 '11 at 07:08 AM Grady
(comments are locked)
10|3000 characters needed characters left

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

more ▼

answered Jun 27 '11 at 11:28 PM

testure gravatar image

testure
4.2k 20 25 48

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..... :( ...

Jun 27 '11 at 11:49 PM Grady
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x1463
x353
x329
x248
x139

asked: Jun 27 '11 at 11:00 PM

Seen: 1818 times

Last Updated: Jun 28 '11 at 07:08 AM