Jump to content
  • Advertisement
yhkim

3D Limitation of terrain resolution

Recommended Posts

Sorry for my short english :(

Hello, currently I'm developing heightmap renderer for study.

The renderer runs mostly on GPU side(geometry shader).

Currently, with zero point arrays(vec3(0,0,0)), geometry shader expands terrain(128x128 to 128x128x3x3) and computes height and normal every frame.

128x128x3x3 terrain is my current limitation with GTX660, which takes 23 ms for each frame.

As far as I know, for the purpose of game development, CPU-side calculation is efficient rather than GPU-side.

So I'm trying to change terrain generation mechanism to CPU-side calculation.

By doing so, GPU would calculate height and normal only one time on initiation.

What GPU will do is rendering terrain data from pre-calculated vbo or ssbo.

However what I want to ask is, "What is the maximum terrain resolution that can be rendered without freezing?"

I know that it differs by other components in renderer, and GPU performance, but please tell me based on your experience.

example1) Terrain 16384x16384 was enough to render 60fps with GTX1060

example2) Summoner's rift in League of legends uses 4096 x 4096 terrain map

Waiting for your answer, thank you for reading!!

Edited by yhkim

Share this post


Link to post
Share on other sites
Advertisement

Hi,

The answer will depend on how do you render that terrain. The naive approach will be to generate a grid and apply height and also store normals as attributes, this will work OK but once you start making bigger terrains you will be wasting a lot of mesh density further from the camera and also outside of the frustum. 

Most terrain systems use a Level of Detail system where density of the terrain decreases far away from the camera. You can also do some visibility tests to reject parts of the terrain outside the view frustum.

Recently I worked on a terrain system, height was stored on a texture (then it was sampled on the VS) normals where also calculated from this texture. The terrain was divided into chunks (so I could apply frustum culling) I experimented with tessellation for LOD but I didn't have enough time to polish it (however I've got acceptable results). With this, I was able to render quite large terrains at a nice frame rate.

I can't give you exact numbers, you may want to experiment with different techniques. For example if you intend to make some kind of procedural and deformable terrain you may want to implement it as marching cubes etc.

Share this post


Link to post
Share on other sites

@piluve Thanks for answer, that's the answer exactly what I was waiting for! Now I'm gonna apply LOD terrain and frustum culling.

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!