Search Unity

  1. Get the latest news, tutorials and offers directly to your inbox with our newsletters. Sign up now.
    Dismiss Notice

Help Wanted Painting on quad (solved)

Discussion in 'High Definition Render Pipeline' started by valarus, Feb 5, 2021.

  1. valarus

    valarus

    Joined:
    Apr 7, 2019
    Posts:
    258
    I would like point lights to affect wall painting. But if I set wall painting as Default, I can't drag it on Unity scene.
    I can do it if I set it as sprite, but then lights don't affect painting.
    I tried to use quad with base albedo material but then painting is not stretched as it should.

    How can I set material quad to painting fits on it?

    d21.JPG
     
  2. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    3,716
    As a first, simple option: You can just scale your quad so it's wider, and that will stretch the texture...
     
  3. valarus

    valarus

    Joined:
    Apr 7, 2019
    Posts:
    258
    That seems to work only how can I know the exact number when painting fits ? Painting are in different resolutions.
     
  4. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    3,716
    The image itself has a resolution, let's say it's 800px by 600px. You'd just need to make sure that your x/y scale ratio is the same ratio as the resolution of the picture. You can do that manually, or you could do it in code by getting the width and height of the image. If this is a one-time thing, I'd just just do it manually.
     
    valarus likes this.
unityunity