7th June 2009, 07:50 PM | #1 |
Junior Member
Member
Join Date: Dec 2007
Posts: 12
|
Bones and joints
The title says it all....
|
15th June 2009, 03:08 PM | #2 |
Senior Member
Professional user
Join Date: Mar 2005
Location: Phoenix, AZ
Posts: 917
|
Re: Bones and joints
For animation, or for export to a game?
There's no animation with AC3D itself. For exporting AC3D models to games or to animation programs, a number of the exporters will use the heirarchy view (F8) and object centres as basic bones and joints. |
15th June 2009, 09:33 PM | #3 |
Junior Member
Member
Join Date: Dec 2007
Posts: 12
|
Re: Bones and joints
Not for animations. I am using joints for programmatically setting camera mount positions, joining models together, docking positions, etc.
|
15th June 2009, 09:58 PM | #4 |
Senior Member
Professional user
Join Date: Mar 2005
Location: Phoenix, AZ
Posts: 917
|
Re: Bones and joints
Are you writing your own plugins?
To get the pivots (joint centers), you'll want: ac_object_get_centre(pObject) To get the hierarchy, which you can use to join things together and make your own skeleton: ac_object_get_childrenlist(pObject) ac_object_get_num_children(pObject) My own plugins work that way, I set the joint center using the object center, and then determine the bones by locating the parent object and building the skeleton that way. I believe X-Plane and some of the others do something similar. |
16th June 2009, 09:32 AM | #5 |
Senior Member
Professional user
Join Date: Dec 2003
Location: UK
Posts: 369
|
Re: Bones and joints
So how difficult would it be to make a plugin covering basic animation?
Also could the animation be included in the Collada export? It is an ask, but you don't ask you don't get.
__________________
Regards, Gerry "Mossie" Mos -------------------------------------------------------------------------- WW1 Aircraft Library http://ww1-aircraft.info/ Mossie 3D CAD, "Prompt and Precise" http://mossie3dcad.com/ |
16th June 2009, 02:58 PM | #6 |
Senior Member
Professional user
Join Date: Mar 2005
Location: Phoenix, AZ
Posts: 917
|
Re: Bones and joints
General animation\joint setup, not too hard at all. The poser exporter and milkshape skeleton exporter both already do exactly this. Collada, I don't know. I've been actually wanting to write one myself, but haven't found a good manual or simple sample file yet. I'm sure its' out there, just don't have a link for it. I found a couple of different XSDs, but the XSD is a bit vague on some of the points. Some kind of "here's a list of all the possible nodes and their meanings" would be especially helpful. |
16th June 2009, 03:36 PM | #7 |
Senior Member
Professional user
Join Date: Dec 2003
Location: UK
Posts: 369
|
Re: Bones and joints
Yes, I seen the spec for the file here: http://www.khronos.org/files/collada_spec_1_4.pdf
But a quick look around the web didn't pop up any example files, except from http://www.collada.org/owl/, you can log in without signing on. There are some files here, but not sure how usefull.
__________________
Regards, Gerry "Mossie" Mos -------------------------------------------------------------------------- WW1 Aircraft Library http://ww1-aircraft.info/ Mossie 3D CAD, "Prompt and Precise" http://mossie3dcad.com/ |
17th June 2009, 12:42 PM | #8 |
Senior Member
Professional user
Join Date: Mar 2005
Location: Phoenix, AZ
Posts: 917
|
Re: Bones and joints
Booya! Exactly what I've been looking for, thanks! Looks like I have some reading to do.
|
18th June 2009, 07:22 PM | #9 |
Junior Member
Member
Join Date: Dec 2007
Posts: 12
|
Re: Bones and joints
Hi Lisa,
I create the joints programatically in the game engine I am using (Panda3d) based on a configuration string for the model. I would prefer to create some of the joints statically in AC3D. |
19th June 2009, 07:03 PM | #10 |
Senior Member
Professional user
Join Date: Mar 2005
Location: Phoenix, AZ
Posts: 917
|
Re: Bones and joints
Here's a sample plug-in with source that shows how to extract just the joint information from a model. (attached)
I've also included a sample model to show you how to build your groups in the hierarchy for it to work. Basically, you group each object with its parent, i.e. foot to shin, shin to thigh, thigh to pelvis, etc. If there's more than one object in the group, the first object is considered the parent. The code is not thoroughly tested, but it's based on other plugins I've written so it should be a good jumping-off point for writing your own. It's in C, so you'll need the AC3D SDK if you don't have it already. The lib file for the SDK comes with AC3D, but I think you need to write support if you want the header files. |
|
|