Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


#Actualkauna

Posted 07 July 2013 - 09:04 PM

Procedural generation of vegetation typically means that you don't have to know / create all the instances before you need them. That is, when the vegetation block is close enough you can calculate what kind of foliage / vegetation should occupy the area. 

 

That means that you'll need to update your buffers dynamically. You should however split the problem a bit. Instancing and how to handle vegetation are two separate problems. 

 

Instancing just enables you to draw multiple meshes with same / similar parameters in one draw call. How you update / organize your data is a different matter.

 

I'm copying my instance data every frame from main memory to a generic float4 buffer object. Typically this means something like 1-3 megabytes of data per frame depending on the amount of instances and data required by one instance. The data transfer isn't a bottleneck if implemented correctly. This kind of arrangement allows me to cull objects pretty well (foliage and such in bigger blocks) and have exactly one draw call per mesh.

 

Cheers!


#1kauna

Posted 06 July 2013 - 05:27 AM

Procedural generation of vegetation typically means that you don't have to know / create all the instances before you need them. That is, when the vegetation block is close enough you can calculate what kind of foliage / vegetation should occupy the area. 

 

That means that you'll need to update your buffers dynamically. You should however split the problem a bit. Instancing and how to handle vegetation are two separate problems. 

 

Instancing just enables you to draw multiple meshes with same / similar parameters in one draw call. How you update / organize your data is a different matter.

 

I'm copying my instance data every frame from main memory to a generic float4 buffer object. Typically this means something like 2-3 megabytes of data per frame. The data transfer isn't a bottleneck if implemented correctly. This kind of arrangement allows me to cull objects pretty well (foliage and such in bigger blocks) and have exactly one draw call per mesh.

 

Cheers!


PARTNERS