Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualYura

Posted 12 December 2012 - 03:57 AM

You can't draw 60,000 objects per frame with a draw call for each object. I don't know what the limit is these days, but I would say about 5000. My personal experience with rendering shadowed lights slows down at around 1000 draw calls. The numbers will be tied to your code and your expertise in managing the pipeline and resources.

So some strategies you might like to look into include :

Geometry instancing - drawing a single object multiple times using instanced hardware rendering, reducing draw calls.
Storing multiple objects in a single vertex buffer - maintaining the buffer to represent your different objects, reducing draw calls
dynamic surface construction - constructing larger surfaces from contiguous ones, thereby reducing the number of surfaces / objects you need to draw, reducing draw calls

There's a start for you.


Storing multiple objects in a single vertex buffer REALLY WORKS! It draws much-much-much faster!
I'll try to implement other strategies too.
But I have one more problem. I need to fill my rectangles with some colour. It is impossible while I draw it line-by-line.
Any suggestions?

Thanks for help!

#3Yura

Posted 12 December 2012 - 02:09 AM

You can't draw 60,000 objects per frame with a draw call for each object. I don't know what the limit is these days, but I would say about 5000. My personal experience with rendering shadowed lights slows down at around 1000 draw calls. The numbers will be tied to your code and your expertise in managing the pipeline and resources.

So some strategies you might like to look into include :

Geometry instancing - drawing a single object multiple times using instanced hardware rendering, reducing draw calls.
Storing multiple objects in a single vertex buffer - maintaining the buffer to represent your different objects, reducing draw calls
dynamic surface construction - constructing larger surfaces from contiguous ones, thereby reducing the number of surfaces / objects you need to draw, reducing draw calls

There's a start for you.


Geometry instancing might work, didn't try this trick yet)
Storing multiple objects in a single vertex buffer - not sure about it. I have 60 000+ elements, each have 8(may be less, but generally 8) points. 60 000 * 8 = 480 000 points in one buffer.
Dynamic surface construction - I think it will be the best solve. I Have some 3D figure and most of it's elements are inside of it. Many lines are drawn several times.

Maybe I should not draw lines but draw rectangles? Is it possible?
Thanks for reply!

#2Yura

Posted 12 December 2012 - 02:09 AM

You can't draw 60,000 objects per frame with a draw call for each object. I don't know what the limit is these days, but I would say about 5000. My personal experience with rendering shadowed lights slows down at around 1000 draw calls. The numbers will be tied to your code and your expertise in managing the pipeline and resources.

So some strategies you might like to look into include :

Geometry instancing - drawing a single object multiple times using instanced hardware rendering, reducing draw calls.
Storing multiple objects in a single vertex buffer - maintaining the buffer to represent your different objects, reducing draw calls
dynamic surface construction - constructing larger surfaces from contiguous ones, thereby reducing the number of surfaces / objects you need to draw, reducing draw calls

There's a start for you.


Geometry instancing might work, didn't try this trick yet)
Storing multiple objects in a single vertex buffer - not sure about it. I have 60 000+ elements, each have 8(may be less, but generally 8) points. 60 000 * 8 = 480 000 points in one buffer.
Dynamic surface construction - I think it will be the best solve. I Have some 3D figure and most of it's elements are inside of it. Many lines are drawn several times.

Maybe I should not draw lines but draw rectangles? Is it possible?
Thanks for reply!

#1Yura

Posted 12 December 2012 - 02:07 AM

You can't draw 60,000 objects per frame with a draw call for each object. I don't know what the limit is these days, but I would say about 5000. My personal experience with rendering shadowed lights slows down at around 1000 draw calls. The numbers will be tied to your code and your expertise in managing the pipeline and resources.

So some strategies you might like to look into include :

Geometry instancing - drawing a single object multiple times using instanced hardware rendering, reducing draw calls.
Storing multiple objects in a single vertex buffer - maintaining the buffer to represent your different objects, reducing draw calls
dynamic surface construction - constructing larger surfaces from contiguous ones, thereby reducing the number of surfaces / objects you need to draw, reducing draw calls

There's a start for you.


Geometry instancing might work, didn't try this trick yet)
Storing multiple objects in a single vertex buffer - not sure about it. I have 60 000+ elements, each have 8(may be less, but generally 8) points. 60 000 * 8 = 480 000 points in one buffer.
Dynamic surface construction - I think it will be the best solve. I Have some 3D figure and most of it's elements are inside of it. Many lines are replied several times.

Maybe I should not draw lines but draw rectangles? Is it possible?
Thanks for reply!

PARTNERS