• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

FS2004 Problem with 1024 animation

Messages
6
Hello guys:
I´ve read the wiki article and (i think) all the threads related with animations . My problem is:
I´ve created a multiple animations (traffic cars for be precisely) with 2048 frames and four with 4096 frames, i´ve followed the wiki exactly (i think), parted the file in two (and four for the 4095 frames), then edited the first file, adding the rest of the frames, interpolated the animation, and else. Everything works perfectly but....after about 4 to 6 minutes and after completing many cycles, of both times animations... All the cars freezes. I have checked the data many times and it is as it says in wiki article.
I don´t know what else to do.
Maybe the file or FS does not support having two different times in the file or there is too many animations (33 for being precisely)?

What do you think? I really appreciate your help.

Regards
Mauricio

Here is part of the code:
Code:
CODE FOR 4096 frames
; Animation parameters for animation: 0
CUN_VEA_ENTRYA_9_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
CUN_VEA_ENTRYA_9_tick18_mod_2 label word
    dw  8
    dw 0,0,4095,4095
    dw 4096,0,8191,4095
    dw 8192,0,12287,4095
    dw 12288,0,16383,4095
CUN_VEA_ENTRYA_9_float_convert_hi  label word
     dw  14               ; 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,17664
     dw  4096,17792
CUN_VEA_ENTRYA_trans_9       label word
    dw           1       ; 1: Point (translation) 
    real4     -1.0       ; Previous panim value
    real4 16 dup (0.0)   ; Cached matrix 
    dw         988       ; number of entries



bgl_animation_command_start_CUN_VEA_ENTRYA_1	label	BGLCODE
    ; usrvar = tick18 mod 1024
    LOCAL_BASE_32 CUN_VEA_ENTRYA_9_tick18_mod_1
    BGL_INTERPOLATE VAR_BASE_GLOBAL,BGL_TICK18,\
                    VAR_BASE_GLOBAL,usrvar,\
                    VAR_BASE_LOCAL,(offset CUN_VEA_ENTRYA_9_tick18_mod_1 - offset CUN_VEA_ENTRYA_9_tick18_mod_1)
    LOCAL_BASE_32 CUN_VEA_ENTRYA_9_tick18_mod_2
    BGL_INTERPOLATE VAR_BASE_GLOBAL,usrvar,\
                    VAR_BASE_GLOBAL,usrvar,\
                    VAR_BASE_LOCAL,(offset CUN_VEA_ENTRYA_9_tick18_mod_2 - offset CUN_VEA_ENTRYA_9_tick18_mod_2)
    ; convert usrvar to float and store in usrvr2-usrvr3
    LOCAL_BASE_32 CUN_VEA_ENTRYA_9_float_convert_hi
    BGL_INTERPOLATE VAR_BASE_GLOBAL,usrvar,\
                    VAR_BASE_GLOBAL,usrvr3,\
                    VAR_BASE_LOCAL,(offset CUN_VEA_ENTRYA_9_float_convert_hi - CUN_VEA_ENTRYA_9_float_convert_hi)
    VAR_BASE_32   VAR_BASE_GLOBAL
    SETWRD usrvr2,0
    IFIN1 CUN_VEA_ENTRYA_9_fc_512, usrvar,257,512
    IFMSK CUN_VEA_ENTRYA_9_fc_512, usrvar,0001h
    SETWRD usrvr2,08000h
CUN_VEA_ENTRYA_9_fc_512 label word
    IFIN1 CUN_VEA_ENTRYA_9_fc_1024, usrvar,513,1024
    IFMSK CUN_VEA_ENTRYA_9_fc_1024, usrvar,0003h
    SETWRD usrvr2,04000h
    IFMSK CUN_VEA_ENTRYA_9_fc_1024, usrvar,0002h
    SETWRD usrvr2,08000h
    IFMSK CUN_VEA_ENTRYA_9_fc_1024, usrvar,0001h
    SETWRD usrvr2,0C000h
CUN_VEA_ENTRYA_9_fc_1024 label word
    IFIN1 CUN_VAA_ENTRYA_9_fc_2048, usrvar,1025,2048
    IFMSK CUN_VAA_ENTRYA_9_fc_2048, usrvar,0007h
    SETWRD usrvr2,02000h
    IFMSK CUN_VAA_ENTRYA_9_fc_2048, usrvar,0006h
    SETWRD usrvr2,04000h
    IFMSK CUN_VAA_ENTRYA_9_fc_2048, usrvar,0005h
    SETWRD usrvr2,06000h
    IFMSK CUN_VAA_ENTRYA_9_fc_2048, usrvar,0004h
    SETWRD usrvr2,08000h
    IFMSK CUN_VAA_ENTRYA_9_fc_2048, usrvar,0003h
    SETWRD usrvr2,0A000h
    IFMSK CUN_VAA_ENTRYA_9_fc_2048, usrvar,0002h
    SETWRD usrvr2,0C000h
    IFMSK CUN_VAA_ENTRYA_9_fc_2048, usrvar,0001h
    SETWRD usrvr2,0E000h
CUN_VAA_ENTRYA_9_fc_2048 label word
     IFIN1 CUN_VAA_ENTRYA_9_fc_4096, usrvar,2049,4096
     IFMSK CUN_VAA_ENTRYA_9_fc_4096, usrvar,000Fh
     SETWRD usrvr2,01000h
     IFMSK CUN_VAA_ENTRYA_9_fc_4096, usrvar,000Eh
     SETWRD usrvr2,02000h
     IFMSK CUN_VAA_ENTRYA_9_fc_4096, usrvar,000Dh
     SETWRD usrvr2,03000h
     IFMSK CUN_VAA_ENTRYA_9_fc_4096, usrvar,000Ch
     SETWRD usrvr2,04000h
     IFMSK CUN_VAA_ENTRYA_9_fc_4096, usrvar,000Bh
     SETWRD usrvr2,05000h
     IFMSK CUN_VAA_ENTRYA_9_fc_4096, usrvar,000Ah
     SETWRD usrvr2,06000h
     IFMSK CUN_VAA_ENTRYA_9_fc_4096, usrvar,0009h
     SETWRD usrvr2,07000h
     IFMSK CUN_VAA_ENTRYA_9_fc_4096, usrvar,0008h
     SETWRD usrvr2,08000h
     IFMSK CUN_VAA_ENTRYA_9_fc_4096, usrvar,0007h
     SETWRD usrvr2,09000h
     IFMSK CUN_VAA_ENTRYA_9_fc_4096, usrvar,0006h
     SETWRD usrvr2,0A000h
     IFMSK CUN_VAA_ENTRYA_9_fc_4096, usrvar,0005h
     SETWRD usrvr2,0B000h
     IFMSK CUN_VAA_ENTRYA_9_fc_4096, usrvar,0004h
     SETWRD usrvr2,0C000h
     IFMSK CUN_VAA_ENTRYA_9_fc_4096, usrvar,0003h
     SETWRD usrvr2,0D000h
     IFMSK CUN_VAA_ENTRYA_9_fc_4096, usrvar,0002h
     SETWRD usrvr2,0E000h
     IFMSK CUN_VAA_ENTRYA_9_fc_4096, usrvar,0001h
     SETWRD usrvr2,0F000h
 CUN_VAA_ENTRYA_9_fc_4096 label word
    LOCAL_BASE_32 CUN_VEA_ENTRYA_trans_9
    BGL_ANIMATE_INDIRECT   VAR_BASE_GLOBAL,usrvr2,VAR_BASE_LOCAL,(offset CUN_VEA_ENTRYA_trans_9 - offset CUN_VEA_ENTRYA_trans_9),0.0,0.0,0.0,1
 bgl_animation_command_end_CUN_VEA_ENTRYA_1	label	BGLCODE

CODE FOR 2048 frames
CUN_VEA_ENTRYA_12_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
CUN_VEA_ENTRYA_12_tick18_mod_2 label word
    dw  8
    dw 0,0,2047,2047
    dw 2048,0,4095,2047
    dw 4096,0,6143,2047
    dw 6144,0,8191,2047
CUN_VEA_ENTRYA_12_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,17664
CUN_VEA_ENTRYA_trans_12       label word
    dw           1       ; 1: Point (translation) 
    real4     -1.0       ; Previous panim value
    real4 16 dup (0.0)   ; Cached matrix 
    dw         914       ; number of entries




bgl_animation_command_start_CUN_VEA_ENTRYA_7	label	BGLCODE
    ; usrvar = tick18 mod 1024
    LOCAL_BASE_32 CUN_VEA_ENTRYA_12_tick18_mod_1
    BGL_INTERPOLATE VAR_BASE_GLOBAL,BGL_TICK18,\
                    VAR_BASE_GLOBAL,usrvar,\
                    VAR_BASE_LOCAL,(offset CUN_VEA_ENTRYA_12_tick18_mod_1 - offset CUN_VEA_ENTRYA_12_tick18_mod_1)
    LOCAL_BASE_32 CUN_VEA_ENTRYA_12_tick18_mod_2
    BGL_INTERPOLATE VAR_BASE_GLOBAL,usrvar,\
                    VAR_BASE_GLOBAL,usrvar,\
                    VAR_BASE_LOCAL,(offset CUN_VEA_ENTRYA_12_tick18_mod_2 - offset CUN_VEA_ENTRYA_12_tick18_mod_2)
    ; convert usrvar to float and store in usrvr2-usrvr3
    LOCAL_BASE_32 CUN_VEA_ENTRYA_12_float_convert_hi
    BGL_INTERPOLATE VAR_BASE_GLOBAL,usrvar,\
                    VAR_BASE_GLOBAL,usrvr3,\
                    VAR_BASE_LOCAL,(offset CUN_VEA_ENTRYA_12_float_convert_hi - CUN_VEA_ENTRYA_12_float_convert_hi)
    VAR_BASE_32   VAR_BASE_GLOBAL
    SETWRD usrvr2,0
    IFIN1 CUN_VEA_ENTRYA_12_fc_512, usrvar,257,512
    IFMSK CUN_VEA_ENTRYA_12_fc_512, usrvar,0001h
    SETWRD usrvr2,08000h
CUN_VEA_ENTRYA_12_fc_512 label word
    IFIN1 CUN_VEA_ENTRYA_12_fc_1024, usrvar,513,1024
    IFMSK CUN_VEA_ENTRYA_12_fc_1024, usrvar,0003h
    SETWRD usrvr2,04000h
    IFMSK CUN_VEA_ENTRYA_12_fc_1024, usrvar,0002h
    SETWRD usrvr2,08000h
    IFMSK CUN_VEA_ENTRYA_12_fc_1024, usrvar,0001h
    SETWRD usrvr2,0C000h
CUN_VEA_ENTRYA_12_fc_1024 label word
    IFIN1 CUN_VEA_ENTRYA_12_fc_2048, usrvar,1025,2048
    IFMSK CUN_VEA_ENTRYA_12_fc_2048, usrvar,0007h
    SETWRD usrvr2,02000h
    IFMSK CUN_VEA_ENTRYA_12_fc_2048, usrvar,0006h
    SETWRD usrvr2,04000h
    IFMSK CUN_VEA_ENTRYA_12_fc_2048, usrvar,0005h
    SETWRD usrvr2,06000h
    IFMSK CUN_VEA_ENTRYA_12_fc_2048, usrvar,0004h
    SETWRD usrvr2,08000h
    IFMSK CUN_VEA_ENTRYA_12_fc_2048, usrvar,0003h
    SETWRD usrvr2,0A000h
    IFMSK CUN_VEA_ENTRYA_12_fc_2048, usrvar,0002h
    SETWRD usrvr2,0C000h
    IFMSK CUN_VEA_ENTRYA_12_fc_2048, usrvar,0001h
    SETWRD usrvr2,0E000h
CUN_VEA_ENTRYA_12_fc_2048 label word
    LOCAL_BASE_32 CUN_VEA_ENTRYA_trans_12
    BGL_ANIMATE_INDIRECT   VAR_BASE_GLOBAL,usrvr2,VAR_BASE_LOCAL,(offset CUN_VEA_ENTRYA_trans_12 - offset CUN_VEA_ENTRYA_trans_12),0.0,0.0,0.0,7
 bgl_animation_command_end_CUN_VEA_ENTRYA_7	label	BGLCODE
 
Hi:

Nobody have a comments?

Common guys please, help me!!!

I don't know what else, can i do to solve this. Still freezes after about 3 or 5 minutes repeating the animation.


Thank you very much.
 
Hi,

I guess everybody was waiting for me to reply this one :D. And I was travelling (work and vacation) the last two and a half weeks.

Do the long animations work fine? The only mistake I can spot in your code at the moment is in the 2048 frame animation.

Code:
CODE FOR 2048 frames
CUN_VEA_ENTRYA_12_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
CUN_VEA_ENTRYA_12_tick18_mod_2 label word
    dw  8
    dw 0,0,2047,2047
    dw 2048,0,4095,2047
    dw 4096,0,6143,2047
    dw 6144,0,8191,2047

In the first table the timer variable is divided into segments of 16384 ticks. The second table is then use to make it the length of your animation. For 4096 frames that takes 4 steps, but for 2048 frames that would be 8 steps. So I would expect a table like this:

Code:
CUN_VEA_ENTRYA_12_tick18_mod_2 label word
    dw  16
    dw 0,0,2047,2047
    dw 2048,0,4095,2047
    dw 4096,0,6143,2047
    dw 6144,0,8191,2047
    dw 8192,0,10239,2047
    dw 10240,0,12287,2047
    dw 12288,0,14335,2047
    dw 14336,0,16383,2047
 
Hi:

Thank you very much Arno! In fact, the animation goes very well, the problem is just that, vehicles of 1:50 minutes (2048 frames) freezes after 3 or 5 minutes the.
I'll try changing this part and tomorrow i will report you how it goes and of course, if this solves the problem.
I really appreciate your help .

Mauricio
 
Last edited:
Glad to hear you got it working :D.
 
Back
Top