Frames Of Animation
Blitz3D Forums/Blitz3D Programming/Frames Of Animation
| ||
The quantity of frames of animation in a character can make my game run slowly? If Yes, How to do my animations in various files?, like this: Main_Character.b3d run.b3d idle.b3d |
| ||
Help > Command Reference > 3D - Category > Entity Animation. |
| ||
Yes Man, I know this commands, but, What I want to know is how to export the characters with animations in each file, like the example above. And, When I load my characters in the game without animation, the FPS is fine, but, when I do my characters animate, the game run slowly. This is the motive of my question :( |
| ||
AddAnimSeq, and each time you call AddAnimSeq will add new animation taken from animated character(bones) you specify, and keep old one..be sure that number of bones be same as well as bones names..otherwise it wouldnt work... |
| ||
Hi EmerGki - you will find that in blitz3d, on low end systems especially, if you simply load an entity with 'loadanimmesh' it slows down the program, more so than loadmesh would, even if it is currently not animating. |
| ||
Keeping each animation as a separate file is for convenience in authoring the content, it does not affect how fast the game runs. A lot of frames because your animation is long shouldn't matter, but a lot of frames because you're using a high framerate would matter. |
| ||
Hi! Matty, I've load my characters with LoadAnimMesh and the game run fine, but, when I call the the command "Animate" the game run slow (Note: This happen with 30 or more characters in the game, I need to use many characters). Joe, I'm using 30 FPS, I think what this be a good frame rate. I think what the game run slowly because the UpdateWorld for update all animations :(. Anyone know some game (made in blitz) with many characters in the screen? |
| ||
Hi EmerGki - this game of mine has many characters on screen at once, but they use the md2 format, which on my own machine renders twice as many characters than a similar b3d model for the same frame rate http://home.swiftdsl.com.au/~gezeder/lloyd/Blood&Plunder.html |
| ||
I've had 8 animated B3D characters in one scene with no problems. How many is 'many'? |
| ||
Many is 60 characters |
| ||
Some thoughts, - You are calling the UpdateWorld() command once per main-loop, right? - 60 characters!!!, how many polys each?, with 60 boned-animated characters on screen, if each one is made of more than 400-600 polys then I think you will get a slowdown on any PC, that would be too much stuff for Blitz to handle ... If the models are not ALL at the same time on screen, I suggest to hide the entites that are not in view, hiden entities are not detected by the UpdateWorld(). Paolo. |
| ||
Eurythmia, UpdateWorld() is only for main-loop yes. Each character have 425 Triangles. I'm working to Optimize this, I not animate the entity out of the camera view. I'll do the "HideEntity" too. =D. Thank's! |
| ||
I have a question simular to EmerGki's. If I have a who needs to run, walk, and sit, how do I load up all the different animations? Do I make them all on the same animated , and then just specify which frames to play, when? Or do I save seperate animated s for the 1 character? That would seem too messy though... |
| ||
Joe, I'm using 30 FPS, I think what this be a good frame rate. I think what the game run slowly because the UpdateWorld for update all animations If that's the framerate you're animating at, with a keyframe every frame, that may be too high (it depends how many bones there are, really.) Note that I am talking about the framerate in your animation tool when you create the animation, not the framerate of the game. @ikg: Basically it's about setting up animation sequences. If you read the command reference for the Animate command, you'll notice you can choose which animation sequence to play. You can either setup all the animation sequences as one long animation and then chop up the frames using ExtractAnimSeq, or keep each animation as a separate file and use LoadAnimSeq to add the animations to your loaded model. |
| ||
IKG, If you use all animations on a single .b3d file, you'll use the commands: "LoadAnimMesh", and for extract the animations from him, you'll use "ExtractAnimSeq". To use various file for animations, you'll use "LoadAnimSeq". To Save animations in separeted files, I have no Idea :(. To play your animations, you'll use "Animate", in this command you must inform the sequence of animation, this sequence you have using "ExtractAnimSeq" and/or "LoadAnimSeq" |
| ||
Great! Makes a lot more sense now :D |
| ||
Joe, Now I'm have many character working fine =D, I do some optimizations and now are working good. Thank's to all! |
| ||
Good stuff. So what exactly did you optimize? |
| ||
I optimize various things like : Artifical Intelligence (I stop use commands like AnimSeq and AnimTime), Hide entities out of view, EntityAutoFade. |