Jump to content
  • Advertisement
Sign in to follow this  
resle

[D3D10] scattered ground quads arrangement

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

Hi, consider a very large plane which will be populated with scattered quads like the following picture. Every quad could be using a different texture but the average situation will see 500 to 700 quads using 30-50 unique textures. What structure would you suggest to render everything efficiently? How would you proceed? The first thing that comes to mind is gathering a list... of lists. Each list is bound to one material. Information about the scene is collected, then for each list a vertex buffer is created, filled with the required quads vertices, and rendered. Sounds computationally intensive and a brute force approach, though. [ps., as the thread subject hints... Dx10 only. Thanks]

Share this post


Link to post
Share on other sites
Advertisement
Do you intend to make the entire surface viewable at once? Do you intend to render it from multiple perspectives? Do the quads move relative to one-another or relative to the plane?

Share this post


Link to post
Share on other sites
Some more details:

- The surface is always 100% viewable

- Quads position, size and texturing changes almost every frame

- Quads are always laying over the plane

- There's a free moving camera so stuff is rendered from all the possible perspectives



As for istancing, is that really suitable to render a thousand times such a simple geometry as a "4 vertices mesh"? Also, how would I manage the fact that the combination of size and texture makes almost every quad "unique"? If instancing can save me here.. then please help me understand because it could potentially save me in another couple of difficult situations I will face as well!

Thanks.

Share this post


Link to post
Share on other sites
Instancing it's the right solution if you have to make multiple draws of the same vertices.

Each instance can be modified with matrix, a float or what you need using a second vertex buffer.
Explain the entire technique it's not easy, so check our tutorial here

http://www.notjustcode.it/dblog/articolo.asp?articolo=122

[Edited by - XVincentX on December 1, 2008 4:41:24 AM]

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!