Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Sprite Shape Artifacts

Discussion in '2D' started by InvincibleCat, Nov 30, 2021.

  1. InvincibleCat

    InvincibleCat

    Joined:
    Dec 23, 2014
    Posts:
    83
    Hi there,

    I am using Sprite Shape to create the spaceships in my game but I have some weird artifacts.
    upload_2021-11-30_18-54-18.png

    I had the same issue with tilemaps but fixed it by adding some padding in the sprite editor.

    My sprites look like this (it includes all the corners)
    upload_2021-11-30_18-55-42.png

    Any idea what could be causing this?

    (It seems to only happen when the camera is set to perspective which I can't change as I am too far into the project)

    Thanks,
    -Tim
     
  2. Venkify

    Venkify

    Unity Technologies

    Joined:
    Apr 7, 2015
    Posts:
    619
    It does look like pixels leaking from the next sprite within the same texture. Please ensure that Sprites has padding borders (If using Atlas, please add padding). Also please make sure the Sprites use FullRect for MeshType.
    If the issue still persist, could you please post a simple repro project and file a bug please ? Will take a look asap.
     
  3. InvincibleCat

    InvincibleCat

    Joined:
    Dec 23, 2014
    Posts:
    83
    Sounds good I will create a small project to try to replicate the issue
     
  4. InvincibleCat

    InvincibleCat

    Joined:
    Dec 23, 2014
    Posts:
    83
    There you go.
    Just open the Test Scene and you will see the visual glitch I was talking about.
    I placed the camera so you can see it correctly.

    I hope this bug can be fixed as I rely heavily on Sprite Shapes to build my spaceships and I am getting closer and closer to launch :)

    Thanks for taking a look at this.

    Cheers!
    -Tim
     

    Attached Files:

  5. Venkify

    Venkify

    Unity Technologies

    Joined:
    Apr 7, 2015
    Posts:
    619
    Hi, I could not reproduce the issue using the test project. Please find the enclosed screenshot and let me know if I am missing something. Also please note that the Artifact that I was referring to only really occurs in case the texture has multiple sprites (Spritesheets). The test project only contained one sprite texture. So its hard to analyze what went wrong.

    Could you please upload a scene that clearly shows the problem (more spriteshape gameobjects that shows this problem will be helpful too) ? Thanks.
     

    Attached Files:

  6. InvincibleCat

    InvincibleCat

    Joined:
    Dec 23, 2014
    Posts:
    83
    I see it right away! upload_2021-12-7_9-16-3.png

    But I will try to create a better scene and send it back to you
     
  7. InvincibleCat

    InvincibleCat

    Joined:
    Dec 23, 2014
    Posts:
    83
    hm... after rebuilding the structure, it does seem that the glitch is gone...