New animation system is finally in

Improving the artwork in Warzone2100 - not for mod discussions

Re: New animation system is finally in

Postby astorian » 06 Nov 2016, 22:06

Great work Per :) I am excited to see progress in the pie animation system.
If i read the instructions and comments correctly, the export data from the blender script can be used.
It seems the pie has to be constructed manually from mesh, textures and animation data.
Even i do not understand: "Each level can now have separate animation framerates and cycle counts (how many times to run an animation, zero for infinity)." - is time the only constant here to sync all object animations?

P.S. It would be awesome to have blender support again to import and export pie with textures and animations in one (export) go.
But since you can reference different pie model for animation i see it would be tricky.

My regards,
Astorian
User avatar
astorian
Trained
Trained
 
Posts: 138
Joined: 29 Jun 2009, 12:26

Re: New animation system is finally in

Postby Per » 06 Nov 2016, 22:30

Currently you would export the PIE as normal, then add in some animation afterward. Yes, animation support in the blender plugin would be awesome, if someone could add that.

What other ways to sync animations would/should there be except time?
Per
Warzone 2100 Team Member
Warzone 2100 Team Member
 
Posts: 3605
Joined: 03 Aug 2006, 19:39

Re: New animation system is finally in

Postby astorian » 12 Nov 2016, 11:15

Per wrote:Currently you would export the PIE as normal, then add in some animation afterward. Yes, animation support in the blender plugin would be awesome, if someone could add that.

I meant to use the data from blender animtrans export http://forums.wz2100.net/viewtopic.php?f=5&t=12053&p=131265&hilit=animation+export#p131265.
Per wrote:What other ways to sync animations would/should there be except time?

Well frames per second should be the constant for all objects animated together.
For example if you animate one part of a model 100fps and other 20 fps, you will see that one animation is fluent and the other seems to be lagging a bit.
But i guess that has to be tested.
User avatar
astorian
Trained
Trained
 
Posts: 138
Joined: 29 Jun 2009, 12:26

Re: New animation system is finally in

Postby astorian » 07 Feb 2017, 18:37

Hello, i wanted to put some time into animation testing, however i am not able to find the documentation.
the link https://github.com/Warzone2100/warzone2100/blob/master/doc/Animation.markdown is not working.
Can you please let me know where i can find the actual information about the current supported animation system?
Thank you
Astorian
User avatar
astorian
Trained
Trained
 
Posts: 138
Joined: 29 Jun 2009, 12:26

Re: New animation system is finally in

Postby NoQ » 07 Feb 2017, 19:06

Seems that all .markdown files were renamed to .md, but links were not updated.
User avatar
NoQ
Special
Special
 
Posts: 6068
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: New animation system is finally in

Postby astorian » 07 Feb 2017, 19:41

Thank you NoQ :)
User avatar
astorian
Trained
Trained
 
Posts: 138
Joined: 29 Jun 2009, 12:26

Re: New animation system is finally in

Postby astorian » 07 Feb 2017, 21:45

Reading through the documentation i have question regarding:
EVENT

EVENT type filename.pie
An animation event associated with this model. If the event type is triggered, the model is replaced with the specified model for the duration of the event. The following event types are defined:

1 - Active event. What this means depends on the type of model. For droids this means movement, while for power generators it means they are linked to a power source.
2 - Firing. The model is firing at some enemy.
3 - Dying. The model is dying. You (almost) always want to make sure animation cycles for this model is set to 1 for the specified model - if it is zero, it will never die!

AND
ANIMOBJECT

ANIMOBJECT time cycles frames
If the mesh is animated, this directive will tell the game how to animate it. The values are the total animation time (of all frames), the number of cycles to render the animation, where zero is infinitely many, and finally the number of animation frames that follows.

Animation frame

frame xpos ypos zpos xrot yrot zrot xscale yscale zscale
Each animation line starts with the serially increasing frame number, followed by three (x, y, z) vectors, one for position, one for rotation, and one for scaling.

If the scaling values are negative, they indicate that the animation is a legacy keyframe animation sequence. Do not use this in future content.

If i define EVENT - do i have to point to another PIE file for the model and animation, or can i target the same (itself) PIE file? (as default/rest pose for example)
As i do not see the pointer in ANIMOBJECT to which an EVENT it belongs to, should every PIE have only one ANIMOBJECT defined?
My best regards,
Astorian
User avatar
astorian
Trained
Trained
 
Posts: 138
Joined: 29 Jun 2009, 12:26

Re: New animation system is finally in

Postby Per » 09 Feb 2017, 01:53

For EVENT, you need to specify another file. The first PIE file (not referenced by any EVENT directives) would be the default/rest pose case.

Each mesh/level may have its own ANIMOBJECT directive. The event that a model/PIE file belongs to is defined by EVENT directives pointing to that file from elsewhere.

Hope that is more clear.
Per
Warzone 2100 Team Member
Warzone 2100 Team Member
 
Posts: 3605
Joined: 03 Aug 2006, 19:39

Re: New animation system is finally in

Postby astorian » 11 Feb 2017, 11:43

Per wrote:Hope that is more clear.

Hello Per, That is clear now :)
You mentioned, that there could be a problem when both Event 1 (propulsion) and Event 2 (firing) where triggered at the same time.
Can you please clarify?
User avatar
astorian
Trained
Trained
 
Posts: 138
Joined: 29 Jun 2009, 12:26

Re: New animation system is finally in

Postby Per » 11 Feb 2017, 20:20

We can only do one animation event at a time, and the same event applies to the whole model. If one event triggers while another is active, there is no general rule about what should happen, ie if the second one should replace the first or if the second one should be ignored. There is some logic in the code to handle it on a case by case basis that I hope is correct but is not much tested.

If you see any such issues, let me know.
Per
Warzone 2100 Team Member
Warzone 2100 Team Member
 
Posts: 3605
Joined: 03 Aug 2006, 19:39

Re: New animation system is finally in

Postby astorian » 13 Feb 2017, 22:07

Thank you, i will try to make a test asap and get back with results. Do i have to download the latest executable?
User avatar
astorian
Trained
Trained
 
Posts: 138
Joined: 29 Jun 2009, 12:26

Re: New animation system is finally in

Postby Per » 13 Feb 2017, 23:31

The latest stable release should do.
Per
Warzone 2100 Team Member
Warzone 2100 Team Member
 
Posts: 3605
Joined: 03 Aug 2006, 19:39

Previous

Return to Artwork