## [Algorithms] Wasteful keyframes

 [Algorithms] Wasteful keyframes From: De Boer - 2004-04-06 07:29:18 ```It appears many game formats (md2, md3 etc) save the position of every vertex for every frame of animation, and use linear interpolation to make it smooth. So if you had a box that translated from point A to point B over 100 frames, you would save every vertex 100 times. For that case it would seem better to have a translation matrix and duration or 2 keyframes instead of 100. I am trying to create an animation format that can handle animated boxes, cars, and people, would this style of saving every vertex for every frame of animation be the best way? Many formats seem geared toward character animation but I need something more generic. It does get more complex when splines need to be used. For example having a box move from point A to point B along spline S. So maybe saving every vertex may be faster at run-time depending how complex the animation is. -Ryan De Boer ```

 [Algorithms] Wasteful keyframes From: De Boer - 2004-04-06 07:29:18 ```It appears many game formats (md2, md3 etc) save the position of every vertex for every frame of animation, and use linear interpolation to make it smooth. So if you had a box that translated from point A to point B over 100 frames, you would save every vertex 100 times. For that case it would seem better to have a translation matrix and duration or 2 keyframes instead of 100. I am trying to create an animation format that can handle animated boxes, cars, and people, would this style of saving every vertex for every frame of animation be the best way? Many formats seem geared toward character animation but I need something more generic. It does get more complex when splines need to be used. For example having a box move from point A to point B along spline S. So maybe saving every vertex may be faster at run-time depending how complex the animation is. -Ryan De Boer ```
 RE: [Algorithms] Wasteful keyframes From: Jamie Fowlston - 2004-04-06 07:47:34 ```Our animations are presented as sets of vec4 tracks (i think it's a more compact representation in the object database, but i'm not sure). You can put in as many or as few keys on each track as you want. Interpolation can be step, linear or catmull-rom on a per key basis. A hint is stored with the track to indicate whether it's a quaternion track. We use this for animating everything, from characters and meshes to textures. (It's on the web at http://qdn.qubesoft.com/docs/latest/QSDK/doc/qsdk/html/structQ_1_1Animation. html) I think the details of what system is fastest for you will depend on what you're doing, how you use it and all sorts of other things :) Trying to just use step or linear keys tends to suffer when you play the animation back slowly.... jamie -----Original Message----- From: gdalgorithms-list-admin@... [mailto:gdalgorithms-list-admin@...]On Behalf Of De Boer Sent: 06 April 2004 00:30 To: gdalgorithms-list@... Subject: [Algorithms] Wasteful keyframes It appears many game formats (md2, md3 etc) save the position of every vertex for every frame of animation, and use linear interpolation to make it smooth. So if you had a box that translated from point A to point B over 100 frames, you would save every vertex 100 times. For that case it would seem better to have a translation matrix and duration or 2 keyframes instead of 100. I am trying to create an animation format that can handle animated boxes, cars, and people, would this style of saving every vertex for every frame of animation be the best way? Many formats seem geared toward character animation but I need something more generic. It does get more complex when splines need to be used. For example having a box move from point A to point B along spline S. So maybe saving every vertex may be faster at run-time depending how complex the animation is. -Ryan De Boer ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ GDAlgorithms-list mailing list GDAlgorithms-list@... https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=6188 --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.594 / Virus Database: 377 - Release Date: 24/02/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.594 / Virus Database: 377 - Release Date: 24/02/2004 ```
 Re: [Algorithms] Wasteful keyframes From: - 2004-04-06 12:04:23 ``` --- De Boer a écrit : > It appears many game formats (md2, md3 etc) save the > position of every > vertex for every frame of animation, and use linear > interpolation to make it > smooth. Skinning was not there at that time or too expensive maybe ? > I am trying to create an animation format that > can handle animated > boxes, cars, and people, would this style of saving > every vertex for every > frame of animation be the best way? Depends on what kind of animation you intend to apply to the object. I would distinguish 2 types of animations: - at object level: typically when you translate your box, rotate you wheel, ... For this you need to store keyframes for the object transform (you can even split it to keyframes for translation, for rotation or for scale). - at vertex level: here I see two main techniques to achieve this, morphing and skinning. For morphing, you will save every vertex' position for every keyframe. For skinning, you come back to object level animation as you will store the bone (object) transform according to the keyframes. Then you will modify the mesh object at vertex level by seeing to which bone(s) each vertex is connected. I think that most of the animation can be done using either object level or skinning technique. As a consequence, you need for your format to save transformation information at per object level (as for skinning the per vertex modification is deduced from the bones). If interpolation is to slow for your purpose (splines, NURBS curves, ...) then you can think of storing pre-computed values for the animation (evaluate and store like 60 frames per second for your object and do some linear interpolatino if quality is not satisfying). The drawback of this evaluation is memory footprint but you can reduce it by compressing your data in some way, for example a RLE kind of compression to eliminate identical consecutive frames. Depending on the precision you require for the data, you could also compress 3 or 4 floats into 2 (I just remember that it was used in vertex/pixel shaders so why not here :) Dealing with splines and all those interpolators was just too boring so now I am using pre-computed data at export time. Finally, you can just export morph data in the same way. In fact you export a controller for each vertex. By controller I mean some object that tells you which type of value it is controlling (float, vector, ...), the targeted object or vertex id that will be affected by this controller and the values for the keyframes (or for the frames in case you precompute them). Well I hope it helps, I am not very experienced with animations but that is what I would do. Vincent Prat http://vprat.alrj.org Yahoo! Mail : votre e-mail personnel et gratuit qui vous suit partout ! Créez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/ Dialoguez en direct avec vos amis grâce à Yahoo! Messenger !Téléchargez Yahoo! Messenger sur http://fr.messenger.yahoo.com ```
 RE: [Algorithms] Wasteful keyframes From: Jon Watte - 2004-04-06 17:00:42 ```Back when CPUs were less fast, and the CPU was needed for transforming vertices (and even rasterization), it made sense to blow out the animation like this, because it loads the CPU less. However, with memory latency costs rising steadily, CPU speeds chugging along (alas, Moore's Law hasn't been around for the last 18 months, but it held before that), and hardware transform being commonplace, every new animation system uses skeletal animation. Counter-strike was one of the first games to put skeletal animation with soft skinning in a character-heavy game (Tomb Raider used hierarchical skeletal models but didn't go skinning until version III I think). Pretty much any new technology after that has been using skeletons. Games based on Quake III are the last vestige of blowing out the vertices (md3 format) as far as I can tell. Another advantage of skeletal animation (besides storage and looks) is that you can compose animations fairly easily, and it works well with IK. Try doing IK with blended meshes for a lesson in "can't get there from here" :-) If you're starting from scratch, you should SERIOUSLY considering either downloading something off the web, or just buying a package like Granny. Cheers, / h+ -----Original Message----- From: gdalgorithms-list-admin@... [mailto:gdalgorithms-list-admin@...]On Behalf Of De Boer Sent: Tuesday, April 06, 2004 12:30 AM To: gdalgorithms-list@... Subject: [Algorithms] Wasteful keyframes It appears many game formats (md2, md3 etc) save the position of every vertex for every frame of animation, and use linear interpolation to make it smooth. So if you had a box that translated from point A to point B over 100 frames, you would save every vertex 100 times. For that case it would seem better to have a translation matrix and duration or 2 keyframes instead of 100. I am trying to create an animation format that can handle animated boxes, cars, and people, would this style of saving every vertex for every frame of animation be the best way? Many formats seem geared toward character animation but I need something more generic. It does get more complex when splines need to be used. For example having a box move from point A to point B along spline S. So maybe saving every vertex may be faster at run-time depending how complex the animation is. -Ryan De Boer ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ GDAlgorithms-list mailing list GDAlgorithms-list@... https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=6188 ```