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
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

[Solved] How to PBR hair/transparency

Discussion in 'General Graphics' started by b4nj0, Jun 6, 2015.

  1. b4nj0

    b4nj0

    Joined:
    Jan 11, 2015
    Posts:
    39
    I just cant figure out the right way todo hair with unity pbr standart shader.

    I have a high res hair texture safed as .png with correct alpha channel.

    In PBR-standart spec i can choose cut-out, transparent and fade.

    Cut-out is not based on my alpha channels , and i put to much work in painting that hair for using the ugly outcut.

    transparent and fade, both make my whole hair mesh semi-transparent.(but it looks like its taking alpha channel into account, its just not treating white as full opaque)
    i can reduce this effect by duplicating my hair mesh 3-4times, but it has way to much geometry data for that

    Does anybody know a good source for infos, examples or workflows or has some information on that?
    Or will i have to build my own shader, that takes an alpha texture?

    (if you need some screenshots because my wierd english is confusing, pleas let me know)

    edit: turns out, if i use Unlit/Transparent shader, the alpha map is readed correct. So it seems the transparent mode of the standart shader is adding standart transparancy to my material?
     
    Last edited: Jun 6, 2015
  2. Zomby138

    Zomby138

    Joined:
    Nov 3, 2009
    Posts:
    659
    White should be fully opaque. You'll want to use fade rather than transparent for hair.

    Are you sure your alpha is pure white where it needs to be? Try messing around with the texture import settings maybe.
     
    Laiken and theANMATOR2b like this.
  3. b4nj0

    b4nj0

    Joined:
    Jan 11, 2015
    Posts:
    39


    i basicaly tryed all settings i can imagine.
    i tryed to turn off/on mipmaps,
    with alpha from transp/grayscale
    tryed both standart shaders in all 3 modes.
     
  4. b4nj0

    b4nj0

    Joined:
    Jan 11, 2015
    Posts:
    39
    I Solved the problem.
    I didnt know/noticed that the alpha slider in the color settings themselv wasnt set to 100% (i never touch the color settings, when i use texture xD)
     
    theANMATOR2b likes this.
  5. Zomby138

    Zomby138

    Joined:
    Nov 3, 2009
    Posts:
    659
    Ahhh! That makes sense. Perilous!
     
  6. dbailey

    dbailey

    Joined:
    Apr 20, 2015
    Posts:
    9
    Whats the right set up for this? I am using the pbr workflow for standard. So I have my albedo diffuse and within the diffuse texture I have a alpha channel for my transparency. But it makes the entire car transparent and not the part I painted dark grey.
     
    OfficialHermie likes this.
  7. curubor

    curubor

    Joined:
    May 27, 2016
    Posts:
    1
    @b4nj0 where is the color settings you are talking about?
     
    OfficialHermie likes this.
  8. b4nj0

    b4nj0

    Joined:
    Jan 11, 2015
    Posts:
    39
    The small little Color Square right next to the Albedo texture slot.