Cal3D Very Slow

Started by
1 comment, last by AnujKalia 12 years, 5 months ago
Hey guys, I've had Cal3D integrated in my engine for a long time now, but just recently got around to profiling and optimising. Cal3D's speed in returning a models vertices and normals is the issue, taking up a lot more time than I thought it should. My main character has 462 vertices and 30 bones (minimised 3DS biped) - I would call this quite low by today's standards. I run an E8400 Core2Duo with 2GB ram (I assume these calculations are done on CPU). This is more than sufficient to run modern games on the highest settings. The code:
pCalRenderer->getVertices(tvertices);
pCalRenderer->getNormals(tnormals);

takes about 0.8 - 1ms to run, which becomes non-trivial when the number of enemies on screen increases. The rest of my game, including terrain, dynamic reflections, shadows, actually drawing creatures, game logic etc. takes less than 20ms total. My game is top down and does not lend itself to using LOD. Is this simply the performance I can expect from Cal3D, or are there any tips to increase performance? This was the only code that seemed relevant - if you need any more code let me know. Much appreciated, [Edited by - Haptic on March 21, 2010 8:51:59 PM]
- Haptic
Advertisement
Just an update.

Further research has suggested that these days, doing the animation on the CPU is a pretty bad idea and that vertex shaders will be more efficient.

I didn't know you could do this so I may have just solved my own problem. Any suggestions or comments are still welcome.

Thanks
- Haptic
Hi!

I'm making a RTS game for a college course (animation is not the main focus, but i'm using Cal3D for basic animation). I was animating soldiers with about 9000 triangles (on an i7 laptop). It got pretty slow with about 4-5 soldiers.

So I've decided to go for low-poly models (about 500 triangles). Will it help a lot? How many characters were you able to animate (without the vertex shader thing)?

This topic is closed to new replies.

Advertisement