Terrain Weird Movement

Started by
5 comments, last by belfegor 10 years, 12 months ago

I see something like undesired terrain vertex movement on the heights (for far mountains)

How do I fix it?

(See the video)

">
Advertisement

What is the values you set for your near/far clip planes? What is the format of your depth-stencil buffer?

Camera new view: 1.0f

Camera far view: 80000.0f

BackBufferFormat: D3DFMT_X8R8G8B8
AutoDepthStencilFormat: D3DFMT_D24S8

I think that you are using pretty big value for your far plane so there might be precision issue . Try to decrease it as much as possible and see if it flickers then.

This might be useful read.

@belfegor: What's the appropriate average far plane for FPS game?

I don't have problems when I make small terrain in 3Ds Max (size: 4000 x 4000).

However, If I made large terrain, like: 50,000 x 50,000 I get this problem.

Did you read the link you were provided ?

If you did, you would understand that the ratio between front/far Z-plane is too big - thus causing the Z-Buffer Shimmering.

Reduce the Far plane by at least a factor of 10.0f or increase the Near plane by at least a factor of 10.0f .

Yes, that means you will have to rescale the terrain and all objects to preserve the precision of Z-Buffer.

If you don't want to do that, your other option is to implement a Linear Z-Buffer - see http://www.mvps.org/directx/articles/linear_z/linearz.htm

If you don't want to do that either your last (and by far the easiest) option is to ignore the artifacts :-)

VladR My 3rd person action RPG on GreenLight: http://steamcommunity.com/sharedfiles/filedetails/?id=92951596

Like in Arma2 where everything is swimming. biggrin.png

This topic is closed to new replies.

Advertisement