Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Projectors Stretching/Making Weird Lines

Discussion in 'General Graphics' started by aidengaming123, Jan 12, 2020.

  1. aidengaming123

    aidengaming123

    Joined:
    Apr 19, 2013
    Posts:
    55
    When using projectors, some stretch/skew in very unnatural and unwanted ways- and make these terrible lines stretching everywhere. Is there anyway to go about fixing this?

    Examples:

    (this isn't that bad; it's actually kinda cool- just too exaggerated)


    But this is where it becomes the most awkward and problematic. It's very common for the projectors to form these lines all over the place.





    Here's how I have them configured:
     
  2. Tartiflette

    Tartiflette

    Joined:
    Apr 10, 2015
    Posts:
    84
    Make sure that the pixels on the edge of the texture are transparent. I suspect you have some red pixels at the edge which get repeated when the projector is out of bounds.
     
    aidengaming123 likes this.
  3. kdgalla

    kdgalla

    Joined:
    Mar 15, 2013
    Posts:
    4,615
    Along with what Tartiflette said, also make sure that in the image import settings, that your projector image's wrap mode is set to clamp
     
    aidengaming123 likes this.
  4. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,329
    And you want to enable Border Mip Maps, which ensures the edge color of the imported texture is maintained across all mip levels. So as long as the image you’re importing has a fully transparent edge, all mip levels will too.

    The stretching is because the texture is already set to clamp... which it should be for a projector otherwise it’ll repeat across the meshes.
     
    aidengaming123 likes this.
  5. aidengaming123

    aidengaming123

    Joined:
    Apr 19, 2013
    Posts:
    55
    Thanks! There were pixels at the very edge of a few of the textures, so I fixed that and enabled border mip maps and now everything is working flawlessly.
     
  6. aidengaming123

    aidengaming123

    Joined:
    Apr 19, 2013
    Posts:
    55
    Made sure they are set to clamp, thank you