Yeah, actually I was talking about child, as you can see, in the config, I made Head,Torso,Legs,Hands child of object.
So, child of child can also have animations ? This way it would be very easy to simulate darkFunction animation system, which is kind of close to skeletal animation.
I gave some more thought on multi-sprite animation in DarkFunction, I tried to do it from config. I was kind of right about the way I wanted to go but now I see I hit a dead end. Its still possible to do but using only config is not possible. So here is what I did, it does not do much, head just go up and down but I shows what I was talking about. In config
// get objects from object event create then set animation as
orxObject_SetTargetAnim(head,"HeadJump");
orxObject_SetTargetAnim(head,"TorsoJump");
orxObject_SetTargetAnim(leftLeg,"LeftLegJump");
orxObject_SetTargetAnim(rightLeg,"RightLegJump");
It was all good now, but when I tried to apply Rotation on key frame it does not work, as I can see we can only define Pivot and Flip for "Graphics" but not Rotation.
As we can define Angle in DarkFunction, without rotation it is not possible to make a complete darkfuntion anim importer. Though we can apply Rotation from code, using KeyEventValue as Rotation, I have to look more into it.
One more thing, is there any gotcha the way I defined my animation for multi-sprite or there could be a better way to achieve this type of animation?
Jim, you and I scarily follow similar developments paths, and every time I look for a concept I am working on, I find your posts
It seems I do need a multi-sprite support, as my head and arm of my character will be separate from the rest of the body.
So I'll be looking very closely at the converter to support this.
But I don't intend for orx to handle the two parts for me... I'll have twin configs for all the animation and links: one for body and one for arm & head.
Then I'll ensure in my code that the two objects stay together or make one object a child of the other. Cross that bridge when I come to it.
Yep, I will be going this way too, one thing I did not mention is, the example animation in DarkFuntion editor is a mess, its way too complicated to handle manually, there each frame consist of around 30 individual sprite, which is insane.
So, in my implementation I would be using fixed and less amount of sprites. It would be really a cool addition to orx, because I have not seen this type of animation often, of course it is different than skeletal, it is still frame based animation.
If DarkFunction does not work, I might make an animation tool like DF but with some features that I wanted, as I was talking to a java guy who is a friend of mine.
I'll certainly be able to take in two or more layers of animations, but I'll be splitting them up into their own animation sets.
Perhaps with some autonaming... though maybe I should be more strict that the naming largely coming from how things are configured in darkFunction. I dunno.
I'll have to take a look again how I went about it.
There's some messy recursive code in there which I don't like.
Once I get my anim calculation stuff done, I'll get back onto this. Hopefully next week.
Bump, I wanted iarwain to see the code I posted earlier, is it okay to manage multi-sprite animation this way ?
Only thing I had to do manually is, rotation per frame, which I have to set from code not a big deal though.
I think when, animation channel would be available it would take orx animation to a new level. I am not clear about features of animation channel but I think it would be possible to add FX or transform (rotation, scale ) per frame or per key.
And yes you're right about animations channel. It's the first step for skeletal animation to separate keys into different channels (sprite, transforms, events, ...).
V1.05 added. This version finally supports multiple layers of animation. Each layer becomes an ANIM config section of its own.
I've changed the interface as well. Now, you browse for the anim, file rather than the sprite file. The sprite file is determined from the anim file, checked for existence and autoloaded.
Because each sprite frame in darkFunction can have an angle, ie, the angle can be animated, the closest we could have in orx is a custom EventName/Value pair.
Comments
So, child of child can also have animations ? This way it would be very easy to simulate darkFunction animation system, which is kind of close to skeletal animation.
As we can define Angle in DarkFunction, without rotation it is not possible to make a complete darkfuntion anim importer. Though we can apply Rotation from code, using KeyEventValue as Rotation, I have to look more into it.
One more thing, is there any gotcha the way I defined my animation for multi-sprite or there could be a better way to achieve this type of animation?
It seems I do need a multi-sprite support, as my head and arm of my character will be separate from the rest of the body.
So I'll be looking very closely at the converter to support this.
But I don't intend for orx to handle the two parts for me... I'll have twin configs for all the animation and links: one for body and one for arm & head.
Then I'll ensure in my code that the two objects stay together or make one object a child of the other. Cross that bridge when I come to it.
So, in my implementation I would be using fixed and less amount of sprites. It would be really a cool addition to orx, because I have not seen this type of animation often, of course it is different than skeletal, it is still frame based animation.
If DarkFunction does not work, I might make an animation tool like DF but with some features that I wanted, as I was talking to a java guy who is a friend of mine.
Perhaps with some autonaming... though maybe I should be more strict that the naming largely coming from how things are configured in darkFunction. I dunno.
I'll have to take a look again how I went about it.
There's some messy recursive code in there which I don't like.
Once I get my anim calculation stuff done, I'll get back onto this. Hopefully next week.
Only thing I had to do manually is, rotation per frame, which I have to set from code not a big deal though.
I think when, animation channel would be available it would take orx animation to a new level. I am not clear about features of animation channel but I think it would be possible to add FX or transform (rotation, scale ) per frame or per key.
And yes you're right about animations channel. It's the first step for skeletal animation to separate keys into different channels (sprite, transforms, events, ...).
I've changed the interface as well. Now, you browse for the anim, file rather than the sprite file. The sprite file is determined from the anim file, checked for existence and autoloaded.
Instructions on the wiki will be updated shortly.
See first post for updated version.
Because each sprite frame in darkFunction can have an angle, ie, the angle can be animated, the closest we could have in orx is a custom EventName/Value pair.
So perhaps we could have:
KeyEventName1 = Angle
KeyEventValue1 = 13
KeyEventName2 = Angle
KeyEventValue2 = 45
This would be quite possible and then the rotation in degrees would have to be handled and rotated with your own code.
Before now, an animation had to be defined as well.
https://forum.orx-project.org/uploads/legacy/fbfiles/files/DarkFunctionToOrx19.zip