Jump to content
  • Advertisement
Sign in to follow this  
mits

OpenGL Brute force terrain on 10fps

This topic is 4395 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I use OpenGL to brute-force render a 512 x 512 terrain using triangle strips. For texture mapping I use a base 128 x 128 texture stretched over the surface and a 128 x 128 detail texture tiled all over the surface. Nothing fancy here. I use FRAPS and I get 10 fps. I think it's very low. What do u think I should do? The system is AMD 3000+, Geforce 6800 with 128 MB and 1 GB RAM. Thanks.

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
1
make sure mip-mapping is enable for your textures
it really helps improve texture rendering time

2
quit using brute force, at the least cull the section of the heightmap that is clearly behind the camera...

Share this post


Link to post
Share on other sites
At least use an OCTree to cull out parts of the terrain that you cant see.
OCTree is a very simple space partitioning algorithm.

You can use ROAM (Realtime Optimally Adapting Meshes) very effectively to dramatically increase the FPS for terrains.

Use vertex arrays or vertex buffers to increase speed.

Share this post


Link to post
Share on other sites
Doing all those glVertex calls really slows down. My terrain rendering went from 40 fps to 300+ just by putting it into display lists. Of course you should further optimize with octree/quadtree and frustum culling, so you draw only what's visible.

-Riku

Share this post


Link to post
Share on other sites
If you're using glVertex (which I'm going to assume you are), that's not brute force. That's stupid force. Switch to VBOs and you'll be able to move vastly higher numbers of polys.

Share this post


Link to post
Share on other sites
How are you rendering it? Is the terrain stored in a VBO or a display list or whatever (in VRAM) or are you transferring it to the GPU each frame? Does the frame rate vary depending on how much of the terrain is in view?

Half a million polygons shouldn't be too much for a reasonably modern video card... You're only getting 5Mtris/sec which is a really low number indeed.

Share this post


Link to post
Share on other sites
I use glVertex() calls. It seems strange to me too because the rate is too low even for brute force that's why I made the post. I'll use VBO and some culling technique to see what happens.

Share this post


Link to post
Share on other sites
I just put my terrain rendering into display lists (added a compile function that compiles the display lists and does a few other things) and now my terrain render function is 4 lines long. However, it didn't seem to increase my framerate at all. I'm certainly not able to double the fidelity of the terrain, or the FPS drops from a constant locked 60 to about 30-40.

I also just stopped drawing parts of the terrain behind the camera, and saw no difference :S

Any suggestions?

[Edited by - industrion on October 10, 2006 1:07:24 PM]

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!