Archived

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

How would you render many small objects

This topic is 5741 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 I have the following problem: There are a few large objects (spacevessels) in my game, it is no problem to draw them efficiently, cause they contain at least hundreds or thousends of polygons. But i need to draw many (around 10 to 20 per vessel) small turrets on to those ships. Each turret consists of only 20-50 polygons. There are two ways of doing it that are in my mind now. What are you using for such a scenario, and what experiences did you get? 1. Do you have one buffer for the turret, setting a new matrix and call the draw routine (drawPrimitive,glDrawElements) for each instance of that turret. This gets inefficient according to statistics from nvidia and others, cause the calling overhead goes up dramatically. But you maybe could make more complex turrets with nearly no effect in performance. 2. Do you use one big buffer (maybe per ship to save transforms) and manually transform the turrets and update their vertexdata in the buffer each time the turret moves. This has the problem of constantly accessing the buffer and the need of transforms on the cpu. But you always send one large buffer to the card. 3. a very clever way doing it that you would like to share ;-) Thanks Lars

Share this post


Link to post
Share on other sites
I asked the same question too before, I hope someone can give the #3 answer this time ^_^. Personaly I went with #2 (a buffer per ship), it seemed the best alternative to me but other people mentionned using the vertex shader for that. I wouldnt know if it work since I havent touched it yet, I'm still growing in the force hehe.

[edited by - Dark Rain on March 23, 2002 12:14:13 AM]

Share this post


Link to post
Share on other sites
Interesting, I found a this tidbit on NVidia website :

[qu]14. Isn’t skinning slower on GeForce 256 than on the CPU?
No. Efficient use of the skinning interfaces can deliver performance significantly greater than the fastest CPUs currently available.[/qu]

It seems there''s interfaces for doing HW skinning. I must research this now!

Share this post


Link to post
Share on other sites
The problem with using skinning hardware is the limited numbers of matrices you can supply.
If you need 10 turrets, you need to suply 10 different matrices.

It would be cool if hardware would support such a large number of matrices, but even a selfmade vertexshader can''t take that much information into its 96 Variables.
But it might be a good idea for cases with only 2 or three turrets, there their geometry could be in the same buffer as the ship itself.

Lars

Share this post


Link to post
Share on other sites