Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

Question Full screen drawn animations performance issues

Discussion in 'Animation' started by cedtat, Nov 20, 2020.

  1. cedtat

    cedtat

    Joined:
    Jun 20, 2018
    Posts:
    5
    Hi !

    I am currently working on an action game with a combat gameplay using full screen animation drawn frame by frame (Cuphead art style). The game is a turn by turn game. Characters are presented like in a Street Fighter game, 1v1 on an animated background.

    Each character has three customization layer;
    - the character
    - the FX
    - the shadow

    They were separated in order to be able to apply specific shaders to each layer, for example when the character is poisoned, we need to apply a color effect on the character but not on FX and shadow.

    In the end, some characters are in 512x512 textures, but many need 10214x1024 and even 2048x2048. Each animation can have around 100 frames. So for biggest characters, each frame in BC7 compression takes 2MB x 100, around 200MB just for one layer. In the worst case scenario, both players are moving and we need to read 1.2GB of textures.

    So there is performance issues because of animation loading time on the disk
    Capture.PNG

    I was wondering if there was a way to enhance that ? preloading textures in memory when loading the scene ?

    We have experimented with another idea, replacing frame by frame texture animation with a videoplayer instead, we don't have performance issues anymore but I am a bit concerned by porting this solution to NINTENDO switch for example.

    Do you have best practices in such scenarios ?
    I was wondering if there is an other alternative ?

    Thank you for your help,
    Ced