Search Unity

Optimal size for animation (sprite sheet) particle system texture?

Discussion in 'General Graphics' started by NathanJSmith, Mar 15, 2019.

  1. NathanJSmith

    NathanJSmith

    Joined:
    May 11, 2018
    Posts:
    57
    I want to make sprite sheet for Texture Sheet Animation module.
    I see the sample from Standard Asset: ParticleFlameLickSheet.png (256x2048)




    According to Art Asset best practice guide
    "If you author your textures to a power of two (for example, 512x512 or 256x1024), the textures will be more efficient and won’t need rescaling at build time."

    So I want to confirm: as long as it's power of two, square texture (for example: 512x512, 1024x1024, 2048x2048,...) and rectangle texture (for example: 8x2048, 32x2048, 256x2048,...) are both optimal for sprite sheet texture size in term of frame-rate performance?
    I want to confirm so that I can comfortably make 8x2048 texture without worrying about it might be slower than the rectangle 2048x2048.

    Thanks.
     
    Last edited: Mar 15, 2019
  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,342
    Yep, it's fine.*

    * Except when it isn't. Some texture formats can only be square, like PVRTC for iOS devices, or may use a square power of two worth of memory on the GPU for some GPU models & texture formats. Really though, I wouldn't worry too much about it if PC is your target platform.

    Also in no situation will 8x2048 be slower than 2048x2048, but it is possible a 128x128 could be faster.
     
  3. NathanJSmith

    NathanJSmith

    Joined:
    May 11, 2018
    Posts:
    57
    Thank bgolus, I need to clarify this:
    so 8x2048 = 16,384
    128x128 = 16,384
    so 128x128 is possible faster than 8x2048, but in theory, 128x128 is not faster (nor slower) than 8x2048.
    Do I understand it correctly?
     
  4. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,342
    Correct. Basically if you've got a GPU that internally stores textures as the next largest power of 2, and your rendering is memory bandwidth limited, then 128x128 may be faster than 8x2048.

    How much faster? Probably not enough that you'd notice a difference on dedicated PC GPU even in the worst case. Mobile worst case could actually be significant.

    Really, I'd say don't worry about it unless it becomes an issue. There are tools out there for automatically slicing and re-laying out flipbooks, including one from Unity.
     
    NathanJSmith likes this.
  5. koirat

    koirat

    Joined:
    Jul 7, 2012
    Posts:
    2,073
    Does unity3d has tool for creating flipbooks from separate textures ?
     
  6. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,342
  7. koirat

    koirat

    Joined:
    Jul 7, 2012
    Posts:
    2,073
    Bless you.
    I was searching for this blog for about few weeks now.
     
  8. koirat

    koirat

    Joined:
    Jul 7, 2012
    Posts:
    2,073
  9. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,342
    Status is it hasn’t been updated since 2017, but it should work still. Otherwise there are a handful of tools out there, or even free gimp / photoshop actions.
     
  10. koirat

    koirat

    Joined:
    Jul 7, 2012
    Posts:
    2,073
    Unfortunately clicking on a links directs me to the blank page.
     
  11. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,285
    I’ve reported this to the developer who looks after this tool. I’ll let you know what they say. (Unity stopped using the place where the tool is hosted)
     
    bgolus likes this.
  12. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,342
    Thank you @richardkettlewell !

    It is a really useful tool, even if not a lot of people use it, and if the particle system sprite support partial supersedes some of the necessity of having one. I've used a lot of tools to do flipbooks in the past, and it's honestly one of the best not-for-pay ones I've ever used.

    The absolute best tool I've played with for this task would be Facedown FX's Slate Editor.
    https://www.facedownfx.com/
    But that's $150 for any non-personal use, and has more bells and whistles than most people need.
     
    richardkettlewell likes this.
  13. ThomasVFX

    ThomasVFX

    Joined:
    Jan 14, 2016
    Posts:
    45
    Sorry for the inconvenience, indeed, our file sharing service have been decommissioned.

    If you want to access VFX Toolbox, it is now available as a package at GitHub : https://github.com/Unity-Technologies/VFXToolbox

    It is now compatible with 2019.3 and later, and maintained. If you exeperience bugs, feel free to report them to the issues section of this github repository.
     
    koirat, richardkettlewell and bgolus like this.