AnimatorGroup example

All topics about ZGameEditor goes here.

Moderator: Moderators

Post Reply
User avatar
y offs et
Posts: 418
Joined: Wed Apr 22, 2009 4:26 pm
Location: BC, Canada

AnimatorGroup example

Post by y offs et »

Hello folks,

Would there be a .zgeproj file illustrating use of this component?
I'd like to explore what is possible with primitives before looking at .3ds.
User avatar
Kjell
Posts: 1883
Joined: Sat Feb 23, 2008 11:15 pm

Post by Kjell »

Hello,

The AnimatorGroup Component is just there to "group" a bunch of AnimatorSimple Components together, allowing you to create complex ( procedural ) animations that you can start / stop with a single operation.

What are you trying to do exactly?

Welcome to the forum ~
Kjell
User avatar
jph_wacheski
Posts: 1005
Joined: Sat Feb 16, 2008 8:10 pm
Location: Canada
Contact:

Post by jph_wacheski »

here; try this., the two "AnimatorSimple"s are trigered when anime_group is started in the timer,. . usefull!
Attachments
animGroup_example.zgeproj
an example in motion.,
(1.46 KiB) Downloaded 557 times
iterationGAMES.com
User avatar
y offs et
Posts: 418
Joined: Wed Apr 22, 2009 4:26 pm
Location: BC, Canada

Post by y offs et »

Yup, thanks. It said a list, so I thought there might be a little code to write.
It would be nice if there were movable pivot points. That would really increase the possibilities.
User avatar
Kjell
Posts: 1883
Joined: Sat Feb 23, 2008 11:15 pm

Post by Kjell »

Hi,

You can easily "simulate" Pivot Points by encapsulating one RenderTransformGroup into another. Use the parent for any transformations like always, while the child's translation represents the offset from the Pivot Point.

K
User avatar
jph_wacheski
Posts: 1005
Joined: Sat Feb 16, 2008 8:10 pm
Location: Canada
Contact:

pivot point example

Post by jph_wacheski »

here is a little example of a pivot point,. it is a tad counter intuitive (to me at least) as you do the rotation in the parent and the translation in the child transform,. . however it does work nicely when figured out. ;)
Attachments
pivotpoint_example.zgeproj
.zgeproj example
(1.82 KiB) Downloaded 528 times
iterationGAMES.com
User avatar
y offs et
Posts: 418
Joined: Wed Apr 22, 2009 4:26 pm
Location: BC, Canada

Post by y offs et »

cute! - and now I understand that spawnModel/style/clone is like a blit or swap buffers (not really, but effects the same thing).
User avatar
Kjell
Posts: 1883
Joined: Sat Feb 23, 2008 11:15 pm

Post by Kjell »

Hmm,

Counter intuitive? Not really .. it behaves exactly like any other FK ( Forward Kinematics ) chain, in which all transformations are passed down to the child. The only thing that might be a little confusing is that the translation of the mesh ( visible ) is the exact opposite from what you actually control, the pivot ( invisible ). But this happens in all 3D applications ( Softimage / Maya etc. ) when you change the pivot point of a Object that is part of a FK ( Forward Kinematics ) chain as well.

And I wouldn't exactly compare it to a blit or swap-buffer as Clones != Instances. Most 3D Apps use this analogy as well. Instances are identical to each other ( although they can be rendered at various positions / rotations / scale ), while Clones keep their own states / variables etc. So for example, when you have a bunch of instantiated characters, they all march together as if they are mirror's, while clones can make decisions individually and move around freely.

K
User avatar
y offs et
Posts: 418
Joined: Wed Apr 22, 2009 4:26 pm
Location: BC, Canada

Post by y offs et »

Thanks Kjell
I understand FK, having made a few animations.
About blit, in my noobiness I hadn't gotten the update cycle of the editor at that time. Thanks for explaining clone/reference - docs updated.
JPH - In my noobiness I hadn't noticed the dickHammer action until now. Cool.
User avatar
y offs et
Posts: 418
Joined: Wed Apr 22, 2009 4:26 pm
Location: BC, Canada

Post by y offs et »

Something I'm not getting here.

AnimatorSimple.FromKind.UseTargetValue
* UseTargetValue - Use the current value of the Target property.
To me, that reads that the animation should begin again from the new, updated value. So why doesn't this work?
Attachments
pivotBone.zgeproj
(2.83 KiB) Downloaded 490 times
"great expectations"
User avatar
Kjell
Posts: 1883
Joined: Sat Feb 23, 2008 11:15 pm

Post by Kjell »

Hi,

My guess is that the interpolation values are only read when the animator starts ( looping doesn't count, regardless whether the fromKind has been set to Target ). Anyway, I've updated your project slightly to make it work the way you want.

K
Attachments
pivotBone.zgeproj
(3.36 KiB) Downloaded 502 times
User avatar
y offs et
Posts: 418
Joined: Wed Apr 22, 2009 4:26 pm
Location: BC, Canada

Post by y offs et »

Umm... :? Yeah, I kinda thought of that. Also thought of a before/after expression loop for resetting the target value.

This is nothing real - just trying to establish if chaining animations is actually possible with the component alone.

Edit -
Well, after working out the best and least confusing organization of .3ds and animation pieces in ZGE, for simple animations it really is just as easy to "make your own" with Wings pieces, as opposed to importing animations generated with Fragmotion, for example. For complex animations, visually smooth transitions at the joints is a problem.
"great expectations"
Post Reply