FS2004 Animation over 1024 frames, a question...

arno

Administrator
Staff member
FSDevConf team
Resource contributor
#41
Hi,

Can you also include the main ASM file? I would need that one to be able to compile and see the errors.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
#44
Hi,

You forgot to define a label. Try the code like this. It is the second to last line that I added.

Code:
SETWRD usrvr2,0
IFIN1 trainanim1_1_fc_512, usrvar,257,512
IFMSK trainanim1_1_fc_512, usrvar,0001h
SETWRD usrvr2,08000h
trainanim1_1_fc_512 label word
IFIN1 trainanim1_1_fc_1024, usrvar,513,1024
IFMSK trainanim1_1_fc_1024, usrvar,0003h
SETWRD usrvr2,04000h
IFMSK trainanim1_1_fc_1024, usrvar,0002h
SETWRD usrvr2,08000h
IFMSK trainanim1_1_fc_1024, usrvar,0001h
SETWRD usrvr2,0C000h
trainanim1_1_fc_1024 label word
IFIN1 trainanim1_1_fc_2048, usrvar,1025,2048
IFMSK trainanim1_1_fc_2048, usrvar,0007h
SETWRD usrvr2,02000h
IFMSK trainanim1_1_fc_2048, usrvar,0006h
SETWRD usrvr2,04000h
IFMSK trainanim1_1_fc_2048, usrvar,0005h
SETWRD usrvr2,06000h
IFMSK trainanim1_1_fc_2048, usrvar,0004h
SETWRD usrvr2,08000h
IFMSK trainanim1_1_fc_2048, usrvar,0003h
SETWRD usrvr2,0A000h
IFMSK trainanim1_1_fc_2048, usrvar,0002h
SETWRD usrvr2,0C000h
IFMSK trainanim1_1_fc_2048, usrvar,0001h
SETWRD usrvr2,0E000h
trainanim1_1_fc_2048 label word
LOCAL_BASE_32 trainanim1_trans_1
 
#45
Thank you Arno! I'm going to test it. I've just recieved my brand new computer so it will take time :)

I did not forget it. To tell the truth I have no idea what I'm doing.

Before somebody reported that after some cycle the animation stops. The same by me. Did I understood well that the 2048 what I set is wrong I have to adjust it for the exact frame what is actualy the length of the animation (1627)?
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
#46
Hi,

Yes, the interpolation should indeed run till the last keyframe you are using, not to 2048.
 
#47
So everywhere where I see 2048 I have to replace it to 1627? That's it?

e.g. here:

; Animation parameters for animation: 0
trainanim1_1_tick18_mod_1 label word
dw 8
dw -32768,0,-16386,16383
dw -16384,0,-2,16383
dw 0,0,16382,16383
dw 16384,0,32766,16383
trainanim1_1_tick18_mod_2 label word
dw 8
dw 0,0,2047,2047
dw 2048 1627,0,4095,2047
dw 4096,0,6143,2047
dw 6144,0,8191,2047

trainanim1_1_float_convert_hi label word
dw 13 ; num entries
dw 0,0
dw 1,16256
dw 2,16384
dw 4,16512
dw 8,16640
dw 16,16768
dw 32,16896
dw 64,17024
dw 128,17152
dw 256,17280
dw 512,17408
dw 1024,17536
dw 2048 1627,17664
what about here? I see here 1024 ???

; Animation parameters for animation: 4
trainanim1_3_tick18_mod_1 label word
dw 10
dw -32768,0,-16770,15999
dw -16768,0,-770,15999
dw -768,0,15230,15999
dw 15232,0,31230,15999
dw 31232,0,32767,1536
trainanim1_3_tick18_mod_2 label word
dw 32
dw 0,0,999,999
dw 1000,0,1999,999
dw 2000,0,2999,999
dw 3000,0,3999,999
dw 4000,0,4999,999
dw 5000,0,5999,999
dw 6000,0,6999,999
dw 7000,0,7999,999
dw 8000,0,8999,999
dw 9000,0,9999,999
dw 10000,0,10999,999
dw 11000,0,11999,999
dw 12000,0,12999,999
dw 13000,0,13999,999
dw 14000,0,14999,999
dw 15000,0,15999,999
trainanim1_3_float_convert_hi label word
dw 12 ; num entries
dw 0,0
dw 1,16256
dw 2,16384
dw 4,16512
dw 8,16640
dw 16,16768
dw 32,16896
dw 64,17024
dw 128,17152
dw 256,17280
dw 512,17408
dw 1024 ???????,17536


BTW I could generate the bgl with your code. I could not test it yet, but BIG thank you Arno!


I'm sorry Arno, but I really do not have any idea about bglc codes....
 
Last edited:

arno

Administrator
Staff member
FSDevConf team
Resource contributor
#48
Hi,

No, I am afraid it is not that easy :).

The length of the animation determines the interpolation table for your animation. Because you want to "slice" the timer variable in pieces with the length of your animation. So the entire interpolation table will be different.

After the interpolation table is OK, I don't think you have to change other pieces of the code.
 
#49
I think its pretty much easy to see that without a little Arno proggy for it, extended animations will remain on the wish list of most developers.

Mark
 
#50
Lot of people sent me private messages if I could create a tutorial for this train. In the next few weeks I'm going to create a video where I'll show how to create the animation along a path which is longer than 1024 frames, how to export it, how to change the frame numbers in the following asm files with the excel, how to combine them. What I can not show how to finish the asm tweak as I'm also not aware of that knowledge.

We are about to release a new scenery that is the reason why I can not do this video shortly.
 
#51
So finally I had a little time to make the video. The video shows how to make the animation - a firetruck along a path - how to export the animation, how to use the excel tool to merge the two asm file. But the rest is question mark!

The video will be available here:

http://www.youtube.com/watch?v=GzvsLkYGO4A

It is still in progress by youtube. I'll add comments as well.
 
Last edited:
Top