New animation system is finally in

Improving the artwork in Warzone2100 - not for mod discussions
Jorzi
Regular
Regular
Posts: 1987
Joined: 11 Apr 2010, 00:14

Re: New animation system is finally in

Post by Jorzi » 07 May 2019, 16:57

Hi, sorry, in retrospect mixed up the two ways of doing it because I tried both approaches.
Approach 1: place origin at world origin, rotate and inverse translate the object for every frame.
Approach 2: place origin at pivot, translate object to the proper position and then just rotate it for each frame.
So my ani files were approach 2 and my meshes were from approach 1, sorry about that.
ImageImage
-insert deep philosophical statement here-

MIH-XTC
Trained
Trained
Posts: 348
Joined: 31 Jan 2014, 07:06

Re: New animation system is finally in

Post by MIH-XTC » 08 Jul 2019, 14:40

Does anyone know the name of the .pie file responsible for the rings around the power generator? I thought it was effects/fxpower.pie but that turns out to be some other animated effect on the power generator. I don't know how to view .pie models, I just edit them in a text editor.

I doubled the size of a power generator just by multiplying all vertices by two and everything works great except now the rings don't line up and they're not viewable because the generator is 2x taller. Players won't be able to tell how many oils they have if they can't see the # of rings and I don't know which file contains that animation.

User avatar
Berg
Regular
Regular
Posts: 2202
Joined: 02 Sep 2007, 23:25
Location: Australia

Re: New animation system is finally in

Post by Berg » 08 Jul 2019, 20:16

If you deleted or did not modify the connection data at the very bottom you effect is either not in the model or is inside too low to be seen.
Plus you will need to double the fxpower model pie to have it bigger that's if it is the effect.
Remember the height data is the 3rd number you might need to double it too in the connector data at the very bottom of file.

MIH-XTC
Trained
Trained
Posts: 348
Joined: 31 Jan 2014, 07:06

Re: New animation system is finally in

Post by MIH-XTC » 08 Jul 2019, 21:33

Berg wrote:
08 Jul 2019, 20:16
If you deleted or did not modify the connection data at the very bottom you effect is either not in the model or is inside too low to be seen.
Plus you will need to double the fxpower model pie to have it bigger that's if it is the effect.
Remember the height data is the 3rd number you might need to double it too in the connector data at the very bottom of file.
The ring effect is inside the model too low to be seen but I don't know which file the ring effect is stored in. I doubled the values in fxpower.pie but the rings did not move so apparently it's not that file.

The power generator uses these pie files:
blpower0.pie
power_module4.pie
blpower4.pie
blbpower.pie

I copied each file, appended ar to the new file names and doubled all the "POINTS" values.


blpower0ar.pie
power_module4ar.pie
blpower4ar.pie
blbpowerar.pie
new_pow_gen_model.zip
(5) .pie files for new 4x4 power generator
(4.28 KiB) Downloaded 12 times



The new generator is 4x4 and renders correctly but the rings did not move. I also don't know how to tell the new blpower0ar.pie to use the effect in the new fxpowerar.pie. (I need to maintain the original effect as well). The connection between fxpower.pie and the power generator model is not specified anywhere and I don't know how animation scripting works.

Image

User avatar
Berg
Regular
Regular
Posts: 2202
Joined: 02 Sep 2007, 23:25
Location: Australia

Re: New animation system is finally in

Post by Berg » 09 Jul 2019, 06:40

welcome to the animated land of Warzone2100

Forgon
Code contributor
Code contributor
Posts: 289
Joined: 07 Dec 2016, 22:23

Re: New animation system is finally in

Post by Forgon » 09 Jul 2019, 08:28

MIH-XTC wrote:
08 Jul 2019, 21:33
Berg wrote:
08 Jul 2019, 20:16
If you deleted or did not modify the connection data at the very bottom you effect is either not in the model or is inside too low to be seen.
Plus you will need to double the fxpower model pie to have it bigger that's if it is the effect.
Remember the height data is the 3rd number you might need to double it too in the connector data at the very bottom of file.
The ring effect is inside the model too low to be seen but I don't know which file the ring effect is stored in. I doubled the values in fxpower.pie but the rings did not move so apparently it's not that file.

The power generator uses these pie files:
blpower0.pie
power_module4.pie
blpower4.pie
blbpower.pie

I copied each file, appended ar to the new file names and doubled all the "POINTS" values.


blpower0ar.pie
power_module4ar.pie
blpower4ar.pie
blbpowerar.pie
new_pow_gen_model.zip




The new generator is 4x4 and renders correctly but the rings did not move. I also don't know how to tell the new blpower0ar.pie to use the effect in the new fxpowerar.pie. (I need to maintain the original effect as well). The connection between fxpower.pie and the power generator model is not specified anywhere and I don't know how animation scripting works.

Image
Look at structureEffectsPlayer() in src/display3d.cpp.

MIH-XTC
Trained
Trained
Posts: 348
Joined: 31 Jan 2014, 07:06

Re: New animation system is finally in

Post by MIH-XTC » 09 Jul 2019, 14:26

Forgon wrote:
09 Jul 2019, 08:28
Look at structureEffectsPlayer() in src/display3d.cpp.

Thank you.

It looks like what I'm trying to do is not going to work because it would require having 2 sets of spirals at the same time; one spiral for the large generator and 1 spiral for the small.

But according to structureEffectsPlayer() the position and size of the rings are hardcoded on lines 3547 and 3553 to be 32 wide and 64 off the ground. I could try to rewrite the logic to check for if small or large generator but... I'll come back to that thought. For now this is just cosmetic.

Post Reply