Advertisement

GL Display Lists

Started by April 09, 2002 12:04 AM
8 comments, last by Keef 22 years, 10 months ago
I want to code keyframe animated models using display lists for each frame (ie compiling each frame of animation into a display list). This will presumably be very fast to render (I eventually want 100s of low polygon animated models on the screen at once for a 1st person RTS game so I need to precompute the animation), but I''m concerned that this will require a lot of display lists. How many display lists will an average implementation of OpenGL support? I realise that every implementation is different, but what order of magnitude is there (10s, 100s, 1000s?) Cheers Keef ----------------------- Current Project: The Chromatic Game Engine
-----------------------Current Project: The Chromatic Game Engine
No idea, but youll want at least several thousand per model.

Say you have a hundred frames of animation, and the model animates at 10 frames per second. You dont want jerky animation, so youll lerp the meshes to smooth things out. Now if you''re pulling 60fps, thats 6 lerped frames between the key frames, and then then youll want those between every frame to every other frame.

Without doing any math, you can see that its going to be a bloody lot of display lists per model. Display lists are not good for dynamic data such as animating models. It would be much better to feed your data into a vertex array to get a speed boost with it.

-----------------------
"When I have a problem on an Nvidia, I assume that it is my fault. With anyone else''s drivers, I assume it is their fault" - John Carmack
-----------------------"When I have a problem on an Nvidia, I assume that it is my fault. With anyone else's drivers, I assume it is their fault" - John Carmack
Advertisement

Yeah, I know there will be a lot of display lists ( I experimented with this and got about 3000 per model for a smoothly animated MD2 model).

But I have found that display lists are much faster than vertex arrays, and I was hoping I could use them instead.

The other good think about precomputing the frames is that ou save a lot of cpu time when rendering.

Still the math looks forbidding. I guess I''ll need about 30,000 display lists to fully animate 10 different models

Is this doable with current implementations?

Keef




-----------------------
Current Project: The Chromatic Game Engine
-----------------------Current Project: The Chromatic Game Engine
openGL 1.0 supported 64k display lists. I don''t know about 1.3.
But by my opinion DL for animated objects is a BAD idea. you can have models with much less keyframes and just interpolate. This will look much nicer. Also about DL beeing faster thatn VA.. try VAR/VAO

There are more worlds than the one that you hold in your hand...
You should never let your fears become the boundaries of your dreams.
I was reading about these VAR commands and by what I have read they only increase speed by about 2% in most opengl implementations. I could percieve no speed increase when I tried using them. Isn''t it just the case that they speed up multipass rendering by caching vertex transformations? (probably no use in his animation program)
DMTSC : What you''re talking about is CVA (compiled vertex array), and yes, they only speed up multipass things. VAR/VAO is another thing.

There are more worlds than the one that you hold in your hand...
You should never let your fears become the boundaries of your dreams.
Advertisement
What is VAR/VAO is this an extension of vertex arrays?

Why are display lists bad for animated figures? Once you have precomputed each frame of the animation you can display it with minimal CPU cost - you can use the same set of display lists for all actors that use that model - therefore if you have a 100 actors that use the same model you can display them all without having to perform 100 different sets of interpolation per frame.

Whatever quality you get with interpolation you can reproduce with display lists - it just takes a lot of them (about 2-3000 per MD2 model for 10 interpolated frames per keyframe)

Basically, its a trade off between memory usage and the per frame CPU cost.

I'm thinking about a sort of 3D RTS game, where there are a lot of actors running about. Of course the real trick is going to be drawing 100 models at once with an acceptable frame rate, with a polygon budget of 5000 polys per frame this only allows for 50 polygons per model - not very realistic. Mind you with 64k display lists to play with there is probably room for some sort of LOD with the models too.

On second thoughts maybe I'd be better of looking at billboarded sprites (Wolfenstein RTS anyone?)

Keef






-----------------------
Current Project: The Chromatic Game Engine

[edited by - Keef on April 9, 2002 10:12:48 PM]
-----------------------Current Project: The Chromatic Game Engine
quote:

Why are display lists bad for animated figures?


Memory.

Do the math:
You want 30000 display lists. OK, how much vertices does your average model have ? Say around 500 vertices, and that''s already a *very* low amount. So 30000 x 500 = 15 mio. The hardware would have to store 15 million vertices. One vertex takes a minimum of, say, 20 byte (vertex coords, colour, texcoords for one unit). 15 mio x 20 = 300 Megs of data only for your animated models !

Ok, we aren''t done yet: a display lists also stores the index arrays: say 1000 faces per model, 3 indices per face, 4 bytes per index: 12 kB index data per DL. x 30000 = another 360 Megs for that...

I can already see your minimum system specs: ''This game requires at least 768 MB RAM for the character models only...''

/ Yann
Checkmate

Find a new method


---------------------------------------------------------------------------------------------------------------------------------------
"With my feet upon the ground I move myeslf between the sounds and open wide to suck it in, I feel it move across my skin. I''m reaching up and reaching out. I''m reaching for the random or what ever will bewilder me, what ever will bewilder me. And following our will and wind we may just go where no one''s been. We''ll ride the spiral to the end and may just go where no one''s been." - TOOL
---------------------------------------------------------------------------------------------------------------------------------------
[TheBlackJester]

"With my feet upon the ground I lose myself between the sounds and open wide to suck it in, I feel it move across my skin. I'm reaching up and reaching out. I'm reaching for the random or what ever will bewilder me, what ever will bewilder me. And following our will and wind we may just go where no one's been. We'll ride the spiral to the end and may just go where no one's been." - Maynard James Keenan Name: [email=darkswordtbj@hotmail.com]TheBlackJester[/email]Team: Wildfire Games
Projects O A.D.The Last Alliance


Good point!

I didn''t really consider the magnitude of memory required to store the display list

*blush*

Keef




-----------------------Current Project: The Chromatic Game Engine

This topic is closed to new replies.

Advertisement