Expose data structures of ogrexml package

hi,



is it possible to expose some of the package private data structures/methods of ogrexml package ?



i’m developing a skeletal animation api for jPCT. i started with using Ardor’s Collada loader, now extending it to use jME’s ogrexml loader. at the moment, it’s not possible to extract necessary data from an OgreEntityNode and the attached MeshAnimationController.



performance is not important, so to protect encapsulation methods can return copies of internal data objects



indeed, i have modified the source to work on it. i can send a list of required methods…



thanks,

r a f t

Sure, although do note that I originally designed the API with ease-of-use in mind, which is why I gave access only to objects that one would actually need when using the API.

cool :smiley: i liked the api, altough i had some hard time to convert it due to some differences with Ardor's. like, in yours root bone's rotation is baked into all bone's inverse transform… anyway it's cool :smiley:



below is the list, i had marked the methods hope i didnt missed anything:


ogrexml.anim.Bone
   public String getName()
   public Bone getParent()
   public Vector3f getWorldBindInversePos()
   public Quaternion getWorldBindInverseRot()

ogrexml.anim.BoneAnimation
    public String getName()
    public float getLength()
    public BoneTrack[] getTracks()

ogrexml.anim.BoneTrack
   public int getTargetBoneIndex()
   public Vector3f[] getTranslations()
   public Quaternion[] getRotations()
   public float[] getTimes()

ogrexml.anim.MeshAnimationController
    public Skeleton getSkeleton()
    public OgreMesh[] getMeshList()
    public Collection<Animation> getAnimations()

ogrexml.anim.Animation
    public boolean hasBoneAnimation()
    public String getName()
    public float getLength()
    public BoneAnimation getBoneAnimation()



btw, i suppose the ninja model used in demos is taken from ogre, am I allowed to use it in a demo ?

thanks,
r a f t



will these go into trunk or next release ?



i also wonder if there any plans to load Ogre's pose and morph animations ?



thanks,

r a f t

Please post here your googlecode username or email it to jmonkeyengine@gmail.com to get trunk access. Then you can apply the needed change(s).


btw, i suppose the ninja model used in demos is taken from ogre, am I allowed to use it in a demo ?

The model is originally taken from here: http://www.psionic3d.co.uk/?page_id=25
The license is "you're allowed to use these models in your 3D projects" so I suppose the answer is yes.

i also wonder if there any plans to load Ogre's pose and morph animations ?

Pose animations are already supported. They are combined with the bone animations at loading.

Please post here your googlecode username or email it to jmonkeyengine@gmail.com to get trunk access.

i've sent an email

Pose animations are already supported. They are combined with the bone animations at loading.

ah cool, i must jave missed it. is it possible to blend bone and pose animations ? i couldnt find in the API

i've made some quick tests on pose animations:
* if there is only pose animations in ogre files, we got a NullPointerException since there is no skeleton. we can avoid it with a null check in two places (MeshAnimationController.reset() and constructor) i can also commit them.
* pose animations seem to work incorrect. some animation is applied but it's shaky. i'm sure the mesh file is valid and has a nice animation since OgreMax viewer plays nicely that animation

i'm using 2.0.1

thanks,
r a f t

I see… Pose animations haven't been tested for a while. The animations are combined, what I mean is, if there's a "stand" animation for the skeleton, and a "stand" animation for the poses, then both of them are played.

i've found the error. blend and 1-blend values should be switched in PoseTrack. it became obvious once watching animation in slow motion  :smiley:



i'll commit it too after i had right to commit

raft said:

i've found the error. blend and 1-blend values should be switched in PoseTrack. it became obvious once watching animation in slow motion  :D

i'll commit it too after i had right to commit

Awesome ;) thanks.

still nobody gave me access to trunk, fyi.

Somebody must have missed your email then… I don't know because I don't have access to that account. What is your googlecode username?

raft said:

still nobody gave me access to trunk, fyi.
Sorry! Slight miscommunication. All done.

it's ok thanks :slight_smile: i've submitted the changes with a proper comment

btw, the project is buildable by Ant but not in eclipse: eclipse build path does not include SWT jars.