Search Unity

Texture Sheet Animation causes particles to be of an unexpected size.

Discussion in 'General Graphics' started by agate-pris, Oct 24, 2020.

  1. agate-pris

    agate-pris

    Joined:
    Sep 19, 2018
    Posts:
    5
    Hello.

    I'm using Texture Sheet Animation in Particle System (Shuriken), Unity version is 2019.4.12f1 (225e826a680e) Personal.

    I hadn't been using Texture Sheet Animation, but I realized that SetPass was much more than I thought it would be. So I changed the texture from Standard to Sprite and used Sprite Atlas and Texture Sheet Animation, using the same material instead of a different one.

    Then the particles were larger than their original size.

    I think this is because when the texture became a sprite atlas, the completely transparent part of the perimeter was trimmed down and it was expanded from one end of the mesh to the other.

    I realize that I can fix the problem by manually adjusting the size of the particles, but calculating them manually is a pain. Is there an approach that would automatically solve this problem?

    Translated with www.DeepL.com/Translator (free version)

    1.jpg

    2.jpg
     
  2. Torbach78

    Torbach78

    Joined:
    Aug 10, 2013
    Posts:
    296
    I know you can define 'slice' method in the legacy versions editor - https://docs.unity3d.com/Manual/TextureTypes.html#Sprite

    for the new version check 'tight packing' - https://docs.unity3d.com/Manual/class-SpriteAtlas.html
    try 'variant' and adjusting with 'scale' https://docs.unity3d.com/Manual/VariantSpriteAtlas.html

    legacy version controls also define 'pixel per unit' - https://docs.unity3d.com/Manual/TextureTypes.html#Sprite
    each sprite can be adjusted in the editor to define border size - https://docs.unity3d.com/Manual/SpriteEditor.html
     
  3. agate-pris

    agate-pris

    Joined:
    Sep 19, 2018
    Posts:
    5