Sign in to follow this  
JVeron

How to render a part of mesh?

Recommended Posts

I have a large terrain. You know that if I render all, my program will run slowly. So I want to render a part of it? How do I solve this problem? Can you help me? Thanks

Share this post


Link to post
Share on other sites
Hi,

I'm not an expert on this, and I haven't done this before myself... but I think what you are trying to do is called "culling". You should do a search on it and I think you will get quite a bit of tutorials teaching you how to implement it.

good luck..

-fuchiefck

Share this post


Link to post
Share on other sites
In your title you imply that the terrain is represented by a single mesh - does that mean a single .X/.3ds model, or do you just mean you have a bunch of triangles for a heightmap?
If the first one, I can't advise except that I wouldn't do it that way!

If the second, you want to cull things as already suggested. One way is to split the level up into large chunks, and check if each chunk may need to be drawn. For instance if you have a level which is 1000 units wide and long, test each 10unit x 10unit block before drawing it.

If this is the kind of thing you want, let us know and we'll start talking about frustums, quadtrees and other fun things... :)

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

Sign in to follow this