Can you get a list of "bones" from an entity?

Everything related to 3D programming
BinoX
User
User
Posts: 46
Joined: Mon Jan 31, 2005 11:57 am

Can you get a list of "bones" from an entity?

Post by BinoX »

I was wondering if there was a way to get a list of bones from within Purebasic.

Maybe something like ExamineBones(EntityID)...

I know that the bones for the robot.mesh are "Joint1" to "Joint18", but it would be useful to be able to get a list from within the program as well
User avatar
Comtois
Addict
Addict
Posts: 1429
Joined: Tue Aug 19, 2003 11:36 am
Location: Doubs - France

Re: Can you get a list of "bones" from an entity?

Post by Comtois »

you can use an editor , or this tool
http://wiki.ogre3d.org/OgreXmlConverter
OgreXMLConverter
----------------
Converts between the binary and XML formats for .mesh and .skeleton. Will also
allow you to generate LOD information if you are converting to the binary
format. This tool is necessary to convert from the XML to OGRE's native runtime
format if your exporter produces XML. You can find the XML Schema for the .mesh
and .skeleton formats in the Ogre source under Tools/XMLConverter/docs.

Usage: OgreXMLConverter [options] sourcefile [destfile]
You can convert your skeleton file to XML
example : OgreXMLConverter robot.skeleton robot.xml

robot.xml :

Code: Select all

<skeleton>
    <bones>
        <bone id="0" name="Joint1">
            <position x="0" y="51.5913" z="-0.0159202" />
            <rotation angle="0">
                <axis x="1" y="0" z="0" />
            </rotation>
        </bone>
        <bone id="1" name="Joint2">
            <position x="1.25659" y="-6.37357" z="-3.36696" />
            <rotation angle="0">
                <axis x="1" y="0" z="0" />
            </rotation>
        </bone>
        ...
        <bone id="16" name="Joint17">
            <position x="-3.68851" y="-12.7833" z="2.24464" />
            <rotation angle="0">
                <axis x="1" y="0" z="0" />
            </rotation>
        </bone>
        <bone id="17" name="Joint18">
            <position x="15.6188" y="-13.5145" z="6.73391" />
            <rotation angle="0">
                <axis x="1" y="0" z="0" />
            </rotation>
        </bone>
    </bones>

Please correct my english
http://purebasic.developpez.com/
BinoX
User
User
Posts: 46
Joined: Mon Jan 31, 2005 11:57 am

Re: Can you get a list of "bones" from an entity?

Post by BinoX »

That's the way that I got the info on the robot mesh ro begin with, but it's inconvenient for my program

Was hoping to be able to do it from within Purebasic without external program support...

I've written a decent ragdoll procedure that works with the robot, but at the moment I need to manually name each joint/bone and its relations... I would be nice to just be able to make a createragdoll funtion and point it at an entity
Post Reply