Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Arrummzen

Render a landscape?

This topic is 5245 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

What is the best way to go about creating a program that can view a landscape in realtime. I wrote a program that will view them, but when I try to runder a 100*100 tile landscape my performance is to low (Im rendering a wireframe landscape). Currently each "node" on my landscape is linked to its nehbors by a line. How can I make it so my program renders more efficently? Thank you for your time, Arrummzen

Share this post


Link to post
Share on other sites
Advertisement
How are you rendering your landscape? Is it a solid triangle mesh and you are rendering with wireframe fillmode? Because that is a very slow way to do it. How many calls do you make to draw primitive each frame? Ideally you want to make as few calls to draw primitive as possible. So batch all what you want to draw together and then call draw primitive.

~Wave

Share this post


Link to post
Share on other sites
Try making it polygons. The way you''re doing it draws 99^2 line polygons, but with triangle primitives you still have 99^2. There should not be a big performance hit, if not an improventment.

Additionally, you need to consider how you render them. You should try (after making it triangle primitives) using the D3DFILL_SOLID mode (runs faster with my heightmaps; seems odd, but it''s true). Make sure you aren''t recalculating the points, but keeping them either in a vertex buffer or in an array.

If you''re using an array, but calling drawprimitve multiple times, use d3ddevice.drawprimitiveUP because it will batch the calls and do them all at once (more helpful for particle effects than heightmaps).

Finally - cull what you can''t see. I wrote a grass simulation and the fps sucked. So I culled whatever was behind the camera. This, I think, is the most effective thing to do because it removes half the geometry from the screen.

Whatever the case, good luck.


Yes... VB6 is here to steal your minds fps. Very slowly.
Call .optimize(you.sig)

Share this post


Link to post
Share on other sites
You know what looks interesting? A random landscape with each vertex assign a random number...

Thank you for your time,
Arrummzen

EDIT: Tanks for the tip on droping the number of calls to drawprimitive. I thought that 1000 simple calls was as good as 1 complex, but I guess I was wrong.

Thank you for your time,
Arrummzen

[edited by - Arrummzen on June 9, 2004 7:17:49 AM]

Share this post


Link to post
Share on other sites

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