Author Topic: Skeletal Animation Idea?  (Read 43512 times)

Offline raft

  • quad
  • ******
  • Posts: 1972
    • View Profile
    • http://www.aptalkarga.com
Skeletal Animation Idea?
« Reply #15 on: February 07, 2007, 07:09:30 pm »
good work and effort cyberkilla :)

since a long time, i was also thinking of a skeletal animation system for karga. however methods differ.

have you ever tried to skin and animate a character in a 3d editor program ? at least for me, it's a damn hard thing. it's really hard to assign vertices to bones with proper weights even with help of sophisticated editor support.

so, i dont think a home made skeletal system will be much usable. i theory you can do it, you can animate your characters but all will be somewhat robotic and should be viewed from far away. rolz did that, but technopolies characters arent zoomed

instead i would take a c++ based open source skeletal system and will try to port it to java and jPCT. instead of supplying some kind of animation/skeleton editor, they typically have exporters for populer 3d editors and some mesh deforming code. ogre3d is a good example. it also supports animation blending and facial animation

your effort is really considerable but this is what i think ;)

Code: [Select]
r a f t

Offline cyberkilla

  • float
  • ****
  • Posts: 413
    • View Profile
    • http://futurerp.net
Skeletal Animation Idea?
« Reply #16 on: February 07, 2007, 07:37:33 pm »
I disagree. You cannot know if something is possible until you try:wink:

I have experience with weighting vertexes, and uv mapping, and skeletal animation, from the perspective of someone who makes 3d models.

Programatically, it is not as complex as it appears. I have actually scanned the source code of several C++/OpenGL skeletal implementations, and found them to be overkill for most people.

My method will allow you to import a 3d model, link vertexes to bones, and export them.
Exporting involves:

+ XML file containing the skeletal structure.
+ XML file containing the vertex groups for a specific model
+ XML file containing the rotational keyframes.

At runtime, these files can be loaded(by my api), and the standard mesh interpolation animation sequences can be created.

You can then use the skeletal keyframes any way you want.

You might think, "I could do that in xxxxx 3d modeller". However, this, hopefully will be a way to seamlessly integrate skeletal animations, that can be changed at load time, or runtime, and not interfere with the normal animations.

In addition, there will also be the option of not making mesh animations at runtime, but manipulating vertexes dynamically.
This way is closer to proper skeletal animation, I would guess, but the first method is my personal favourite.

It means you can make any number of clothing items for a model, and not have to edit each thing manually.
With loading 3ds files into a sequence, youd have to make some form of exporter script for your 3d modeller, which means youd have to upload them all again:)


EDIT:
Please, give me the benefit of the doubt;) Maybe I can change your opinion of the difficulty of bone + vertex binding;)
http://futurerp.net - Text Based MMORPG
http://beta.rpwar.com - 3D Isometric MMORPG

Offline raft

  • quad
  • ******
  • Posts: 1972
    • View Profile
    • http://www.aptalkarga.com
Skeletal Animation Idea?
« Reply #17 on: February 07, 2007, 08:06:10 pm »
i would prefer to use a professional 3d editor instead of a home made one. if one day you need to hire animators, most possibly they would prefer it too ;)

instead of porting a c++ implementation you can still write your own. my main point is using a proven 3d editor. i wont even use milk shape if there is chance to use 3d max, blender etc

anyway, world would be a boring place if all think the same way ;)
Code: [Select]
r a f t

Offline cyberkilla

  • float
  • ****
  • Posts: 413
    • View Profile
    • http://futurerp.net
Skeletal Animation Idea?
« Reply #18 on: February 07, 2007, 08:29:53 pm »
I'm not talking about a 3d editor.
At no point have I said that Raft:).

It is just a program to animate existing models.
Blender is my modeler;)

Its only for rotating a few pivots and pressing save:).
I wouldn't dream of reinventing the wheel.

I do not mean to sound confrontational. I understand the point you are trying to make, but, I assure you it is not valid, because that is not my aim with the project.
http://futurerp.net - Text Based MMORPG
http://beta.rpwar.com - 3D Isometric MMORPG

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11776
    • View Profile
    • http://www.jpct.net
Skeletal Animation Idea?
« Reply #19 on: February 07, 2007, 08:37:47 pm »
Quote from: "cyberkilla"
... because that is not my aim with the project.
"Project"...that's what it is...moved!  :wink:

Offline raft

  • quad
  • ******
  • Posts: 1972
    • View Profile
    • http://www.aptalkarga.com
Skeletal Animation Idea?
« Reply #20 on: February 07, 2007, 09:27:42 pm »
Quote from: "cyberkilla"
I'm not talking about a 3d editor.
It is just a program to animate existing models.
Its only for rotating a few pivots and pressing save:).


i guess that 'just' and 'only' includes creating a hierarchical bone structure, skinning mesh and animating bones with preferably inverse kinetics and constraints. a big JUST and ONLY :?  if it wouldnt do these, than we're at where we started. i would prefer a 3d studio

anyway, good luck. i'm looking forward for results ;)
Quote
r a f t

Offline cyberkilla

  • float
  • ****
  • Posts: 413
    • View Profile
    • http://futurerp.net
Skeletal Animation Idea?
« Reply #21 on: February 07, 2007, 09:37:03 pm »
Why would we need Inverse Kinetics? Constraints, yeh, but thats not hard.

Kinetics are mainly for more realistic impact reactions, etc.

To begin with, I am only doing rotational pivots. If you think we need IK,
it will be done, but not right away.

When you look at the bigger picture in that way, this is when you start to think its impossible.
We are by no means where we started though!

Heck, I plan to use this so I have have a million and one different weapons, clothing, vehicles, and control them all generically from one or more skeletal systems!

How is that like what we have now?;)

EDIT:
Skinning mesh? What are you referring to? You just select the vertexes you want bound to a bone.


I will set the 3 of the panes to a fixed angle. TOP, SIDE, REAR
http://futurerp.net - Text Based MMORPG
http://beta.rpwar.com - 3D Isometric MMORPG

Offline raft

  • quad
  • ******
  • Posts: 1972
    • View Profile
    • http://www.aptalkarga.com
Skeletal Animation Idea?
« Reply #22 on: February 07, 2007, 10:08:42 pm »
Quote from: "cyberkilla"
Why would we need Inverse Kinetics?

because it greatly eases animation. it's the system which moves upper and lower arms properly when you move hand

Quote from: "cyberkilla"
Skinning mesh? What are you referring to? You just select the vertexes you want bound to a bone.

if you just bind a vertex to a bone than the results will be strange. for proper results you should have different parameters about how mesh is deformed (for instance head is never deformed but shoulder parts are higly deformed) or otherwise you shouldnt let camera be close to your character.

Quote from: "cyberkilla"
When you look at the bigger picture in that way, this is when you start to think its impossible.

it's not impossible, 3d max did it for instance ;)

in short, this seems as a really hard task to me
Code: [Select]
r a f t

Offline cyberkilla

  • float
  • ****
  • Posts: 413
    • View Profile
    • http://futurerp.net
Skeletal Animation Idea?
« Reply #23 on: February 07, 2007, 10:50:16 pm »
I get the impression you do not want me to even bother.

I know exactly what they are. What I meant was its not important.
And most importantly, I dont need it, so its not a priority for me.

Skinning mesh - What you speak of is what I was talking about with vertex weighting.

When I spoke of you inundating me with skepticism, I was not referring to the actual impossibility of it, but the reason why nobody has dared try it on this forum.

I fail not understand why I have to defend myself. I'm doing it because I need it,
and if it benefits others, I will be glad.
-------------------
EDIT:
I've read these recent posts, and I would have to say I've overreacted somewhat;)
The point I made still stands though. Simplicity, and doing something a little bit at a time, without looking at the bigger picture too much, is the only way to get anywhere.

Yes, I will implement Kinetics, at some point.

Is there anything else that might be useful?
I cannot think of very much else that is important.

I am, for instance, not implementing the translational data that some skeletal systems use.
The length of bones not being static does not make sense to me.
Perhaps for nonorganic models.

http://futurerp.net - Text Based MMORPG
http://beta.rpwar.com - 3D Isometric MMORPG

Offline cyberkilla

  • float
  • ****
  • Posts: 413
    • View Profile
    • http://futurerp.net
Skeletal Animation Idea?
« Reply #24 on: February 08, 2007, 02:52:11 am »
More evolved interface now, and after some changes to make the bones
look "bonier", I will be doing a quick rotation interface, and then the binding of the vertexes.

Then its the interesting stuff!!:)

http://futurerp.net - Text Based MMORPG
http://beta.rpwar.com - 3D Isometric MMORPG

Offline halcor

  • byte
  • *
  • Posts: 28
    • View Profile
Skeletal Animation Idea?
« Reply #25 on: February 08, 2007, 09:50:32 am »
One feature, that I think will be useful: hardbody self-collision checking. Some algorithm like:
1) begin at the root of the bone hierarchy
2) check if vertices moved by the current bone interfere with faces, formed by vertices which belong to bones that are higher in the hierarchy than the current bone
3) correct rotation so 2) succeeds
4) do 2) recursively for all children bones of the current
5) you do 2)-4) on every bone pose operation so you don't allow self-collision.

Yeah, your project doesn't seem easy but sure is interesting, possible and useful for improving skills. Good luck with it :)

Offline raft

  • quad
  • ******
  • Posts: 1972
    • View Profile
    • http://www.aptalkarga.com
Skeletal Animation Idea?
« Reply #26 on: February 08, 2007, 01:16:16 pm »
cyberkilla,

dont get me wrong. i wasnt trying to be sarcastic or underestimate your efforts. all i was trying to say is, such a tool and effort would be of much use if it somehow makes use of populer animation tools

of course this is your project and so you're the boss ;) and as halcor said it is very improving

good luck with it..
Code: [Select]
r a f t

Offline cyberkilla

  • float
  • ****
  • Posts: 413
    • View Profile
    • http://futurerp.net
Skeletal Animation Idea?
« Reply #27 on: February 08, 2007, 02:02:29 pm »
Halcor, that sounds like a good idea. I will try that at some point.

Raft, I would not be surprised if I end up trying to load a skeletal model file,
such as MD3(?), or others. Im sure some are simpler than others:)

EDIT:
This is a little "bonier";)

http://futurerp.net - Text Based MMORPG
http://beta.rpwar.com - 3D Isometric MMORPG

Offline cyberkilla

  • float
  • ****
  • Posts: 413
    • View Profile
    • http://futurerp.net
Skeletal Animation Idea?
« Reply #28 on: February 08, 2007, 03:50:05 pm »
I am having a problem with the 3d cursor, but its not a big deal:)

You see, since the view has perspective, the mouse position also has perspective, so its not always positioned exactly where you click.

I dont think its a bit problem though, and i have gotten around it by drawing a line from the mouse cursor to its actual position, with the depth included.
I suppose its the only way. Its not a huge deal.

EDIT:
Yup, fixed now. Im quite happy with it. Perspective makes it look a little quirky, and that is not a bad thing;)

EDIT2:
I am going to try to draw 3d crosshairs, to show the perspective more clearly:)

EDIT3:
Bone movement and rotation time!:D
http://futurerp.net - Text Based MMORPG
http://beta.rpwar.com - 3D Isometric MMORPG

Offline cyberkilla

  • float
  • ****
  • Posts: 413
    • View Profile
    • http://futurerp.net
Skeletal Animation Idea?
« Reply #29 on: February 08, 2007, 06:42:23 pm »
I have looked at some 3d model formats with skeletons, and ill be honest with you...

I cannot find a single one which is simple enough to be worthwhile starting.

I will go ahead with my own format, with apis to load it in jpct, and a small application to load/save the skeleton data.

I dont have the time to start something like MD4(which I cannot find decent docs on), or the .x file format, which is just rediculous.

Whats more, Blender hasn't managed to save ANY skeletal animation for me into any format that allows it!

I really do not see any problem with making my own xml based format.
My only real concern is that my implementation may not be compatible with existing formats.
At the end of the day, who cares?
If I finish this, it should provide a fast, free, easy to grasp method of skeletal animation in jPCT.

If you already have the skeletal animations made in a modeller, Im sure I will eventually manage to support this;)
http://futurerp.net - Text Based MMORPG
http://beta.rpwar.com - 3D Isometric MMORPG