It is currently Sat May 26, 2018 6:32 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Can you get a list of "bones" from an entity?
PostPosted: Fri Feb 09, 2018 2:29 pm 
Offline
User
User
User avatar

Joined: Mon Jan 31, 2005 11:57 am
Posts: 41
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


Top
 Profile  
Reply with quote  
 Post subject: Re: Can you get a list of "bones" from an entity?
PostPosted: Fri Feb 09, 2018 10:09 pm 
Offline
Addict
Addict
User avatar

Joined: Tue Aug 19, 2003 11:36 am
Posts: 1381
Location: Doubs - France
you can use an editor , or this tool
http://wiki.ogre3d.org/OgreXmlConverter

Quote:
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:
<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/


Top
 Profile  
Reply with quote  
 Post subject: Re: Can you get a list of "bones" from an entity?
PostPosted: Sat Feb 10, 2018 1:23 am 
Offline
User
User
User avatar

Joined: Mon Jan 31, 2005 11:57 am
Posts: 41
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


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye