Speed is good!

BlitzMax Forums/OpenGL Module/Speed is good!

Tom(Posted 2005) [#1]
50, animated, un-textured MD2s, 888 Tris / 477 verts per model (about 44,500 polys total)

Full screen @ 800*600 res, decent FPS! :)



20


Very basic implementation at the moment, I'm hoping instancing will improve the ram situation, and prevent texture thrashing when I get round to that.

Tom


N(Posted 2005) [#2]
What's memory usage like on a standard loaded MD2?


eizdealer(Posted 2005) [#3]
>decent FPS

What would you expect from an API? Hardly anything can be faster than that if you do it right. How did you do it? glVertexPointer etc. and then glDrawArrays or alike?
Have you considerd to declare your MD2 loader (I suppose you've written one) and animator to be public domain? That would be great!


Tom(Posted 2005) [#4]
Noel: Greedy at the moment, I see now why they used bytes & shorts for deformed mesh animation :)

eizdealer: It will be once it's done. I might release stuff like the MD2 loader in the meantime...but at the moment it's kind of tailored to how I want to use it (not that that's the best way, it just suits my graphics system better)

Having just a loader won't make life for us all any easier at the moment, it's a nice, complete set of Blitz3D style functions that most of us want for max, that's what I'm aiming for.

Tom


N(Posted 2005) [#5]
How are you storing the animation data? Is it a basic copy of all the mesh's vertices per frame? If so, you may wish to just store the relative vertex positions and nothing more or less for frame data. If you're already doing that, then my plan hath been foiled.


Tom(Posted 2005) [#6]
That's an idea I guess, the only other option to to stick the usual method, and create the arrays on the fly from stored data.

MD2 does store 'per frame' information on the mesh, in the case of that one in the pics, 198 frames @ 1948 bytes per frame = approx 385k. That's for the stored MD2 though (data is shorts & bytes), I've been converting it to float arrays, I'm gonna try it on the fly instead, save on memory.


Clyde(Posted 2005) [#7]
Hows about a tutorial?

That would be special, as it looks very good.
Welldone


Dreamora(Posted 2005) [#8]
far faster would be possible with the right hardware *greetings from vertex shaders*

but very good to see how good it works if we think of B3D with this kind of stuff ...


flying willy(Posted 2005) [#9]
Whats the speed like compared to b3d md2's?


Panno(Posted 2005) [#10]
@ tom
please do not this

fps:+230
drawtext x,y,fps ;)


col(Posted 2005) [#11]
Well done. That's great.

Now for the texturing ;-) with each model having its own texture ;p