Search Unity

Question How to make a partial shader?

Discussion in 'General Graphics' started by meetjane, Jan 29, 2023.

  1. meetjane

    meetjane

    Joined:
    Jan 23, 2018
    Posts:
    17
    What I have done:
    1.Create a 3D object Sphere.
    2.Drag a png image in project window on the sphere.

    Then I get a ball with albedo map shader like this:
    upload_2023-1-29_21-13-57.png

    What I want:
    upload_2023-1-29_21-25-25.png

    The standard shader make the texture image clamp to wrap the whole sphere, but I just want the image map on some part of the sphere, which looks like a poster be pasted on it.

    I don't know if Detail Mask can realizes that.I've read the document of Detail Mask :https://docs.unity3d.com/Manual/StandardShaderMaterialParameterDetail.html
    But I can't figure out how to do that. In addition, I hope the image can be easily changed on size and offset.

    Can someone tell me how to do detail mask, or is there a easier way to realize that?Thanks!
     

    Attached Files:

  2. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,063
    You need to UV unwrap a sphere
     
  3. meetjane

    meetjane

    Joined:
    Jan 23, 2018
    Posts:
    17
    Thanks! I've found a tool called UV editor to realize that.
     
    DevDunk likes this.