By: nobody ( Nobody/Anonymous )
What is the best way to represent a skelton?
2003-05-25 18:12
I have been building my skeleton editor and would like to know what other people
think a skelatal editor/animator should be capable of.
Each frame in my animator has a complete skeleton so you could not specify 6
arm animation frames and only one leg animation frame.
First this simplest case of construction goes like this:
- Build the base skelton.
- Create a sequence
- Add / Edit frames in your sequence
Should a person be able to delete or add a bone once the sequences have been
created and if so what is the expected result?
This is what I am thinking:
- If a person deletes all of the bones delete all of the sequences and frames
but give a warning message first.
- if a person adds a new bone add that bone to all of the frames in its initial
orientation.
- if a person deletes a bone attach all of the child bones to the deleted bones
parent. deleting the root bone deletes the skelton.
I have not looked at a lot of animation packages but it seems like a professional package would let you define seperate animation frame for seperate bones so you could have for example 6 frames for animating the arm while only one for animating the leg. This would be useful because you would not have to define any inbetween frames for the leg: it would be one smooth motion.
Any thoughts, ideas or papers on how this should be represented would be appreciated.
Thanks
By: martinbaker ( Martin Baker )
RE: What is the best way to represent a skelton?
2003-05-26 09:54
Yes, I would like to include keyframe animation for the program on this site,
so I would be interested in how you decide to implement this (and if you could
let me have any code?).
As I say, I have not done it, but I have always assumed that it would be implemented
as a table, with the parameter names for each node down the left hand side and
time values across the top.
We could choose which nodes to include in the table and which parameters in
each node. Each entry in the table would be a parameter value, which could be
a parameter or left null. To include a new node we would just have to add a
new row or rows in the table. To add a new time interval we just have to add
a new column to the table.
The advantage of a table is that it can be very sparsely populated and therefore does not take as much memory as duplicating the whole model. If any element of the table is null then its value will be interpolated between the values to its left and right or its value could be taken from the model.
Another advantage of a table is that if any element is changed then the columns on either side of it can be automatically updated with new interpolated values.
Using this method you would have 6 columns for the example you gave, but it would not take up too much memory because the entrys for the leg would be left null and it would be intorpolated between the values on either side of the 6 columns for the arm.
Martin
By: nobody ( Nobody/Anonymous )
RE: What is the best way to represent a skelton?
2003-05-27 00:08
I like your idea because it revolves around a robust table implementation. If
you build a good table class then things should fall into place. If you had
a table which was a (bones x orientation) table then you would need a sequence
table which had indexes into the (bones x orientation) table or each sequence
would have a (bones x orientation) table. I think the second option is the best.
I didn't think things through enough when I got into this so my code is very messy and uneccessarily complex
What I have done so far is each bone has a list of orientations with additional
information. 1 for each frame. A seperate class C_Seq is a list of sequence
frames and I have a C_Seq_List class which is a list of sequences. Each frame
has a time and an index into the bone orientation list.
This is unecessarily complex and has made things a mess.
There is another issue which came up. I think there should be 2 edit modes one for building the base skelton and one for editing the skeleton frames. Some editing options would not be avaliable for editing frames. Someone would not be allowed to change bone restarints in the Sequence/Frame Edit Mode. In my case I do not allow the length of bones to change when editing the frames.
If you are going to build a sequence / frame control I think it might be better to build a sequence / bone control. You would select the sequence you would like to edit and each entry in the listbox would be a bone and the width of the box would be a timeline. Then you could see where your animation would be in time for each bone. I am saying this because I invested a fair amount of time into building a sequence / frame control which doesn't do this. For me each frame has a time so each entry in the list box is a sequence and each entry horizontally is a frame.
I now have to think about rebuilding my skeleton and some of the underlying controls. This is painful but maybe necessary. A better design approach would have been for me to start looking how other people have implemented this. I think Maya, 3DStudio and Poser would be a good place to start. I do not have money to buy these products.
By: martinbaker ( Martin Baker )
RE: What is the best way to represent a skelton?
2003-05-27 06:20
Here are some more thoughts prompted by your last message (although I would
not presume to suggest what program architecture is best because it depends
on so many factors).
My program holds its data as a tree structure for compatibility with VRML and ease of rendering etc. I was thinking of adding a table which just holds pointers to the parameters which vary during the animation. The tree structure holds the frame that is currently being rendered and the information read from/saved to the file. The table holds the changes to this tree structure for different time intervals.
However I can think of lots of other ways of doing it, for instance it would be possible to hold all the data in a big table, even the hierarchy information, so that the scene could be rendered from the table. This would make it easy to hold the scene in a relational database.
Im sure there are lots of other combinations of tables and tree structures that would do the job so I think your right to think through all the possibilities at this stage and decide whats more efficient for your program.
Of course the way this information is presented in the user interface may well be different from the way its stored within the program. I think most commercial programs like the ones you mentioned will allow the data to displayed as either a tree structure or a tabular time line, sometimes it would be useful to have several views open at once. When you are editing the timeline you probably want to display only those parameters that you are working on otherwise the table might get so large that its difficult to work with on the screen. This sounds similar to what you are saying anyway in that a tree view would be used mostly to build and modify the hierarchy and the timeline/table view would be used to edit the movements.
Cheers,
Martin