Search Unity

Specular Map in a BumpedSpecular shader?

Discussion in 'Shaders' started by garyhaus, Feb 25, 2009.

  1. garyhaus

    garyhaus

    Joined:
    Dec 16, 2006
    Posts:
    601
    Anybody have a shader for this? Maybe I missed it somewhere? Really need to be able to map the specular channel of the shader with a texture map. Thanks in advance for any help.

    Sincerely,

    Gary
     
  2. purplelilgirl

    purplelilgirl

    Joined:
    Feb 24, 2009
    Posts:
    102
  3. Charles Hinshaw

    Charles Hinshaw

    Joined:
    Feb 6, 2008
    Posts:
    1,070
    I'm confused. How does the Bumped Specular shader that ships with Unity not meet your needs here?
     
  4. garyhaus

    garyhaus

    Joined:
    Dec 16, 2006
    Posts:
    601
    I missed that BumpColorSpec shader on the wiki. Thank you. Works perfectly!


    The standard Bumped Specular does NOT have a specular channel that I can insert a specular map into. In other words I want to vary the specularity on the surface by having areas more shiny than others. The default shader has specular but it is only color and shininess. Does that make sense?
     
  5. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    As far as I remember, indeed it has that supports, it just works efficientely (and the common way it is done) by using the alpha channel for it which has otherwise no purpose.

    using distinct maps and that way 4 unused color channels in total is a great way to waste rendering performance :)
     
  6. Aras

    Aras

    Unity Technologies

    Joined:
    Nov 7, 2005
    Posts:
    4,770
    No, it's like what dreamora said. And in the documentation
     
    isteveee likes this.
  7. garyhaus

    garyhaus

    Joined:
    Dec 16, 2006
    Posts:
    601
    Thanks everybody. I understand that now.

    Gary
     
  8. Khyrid

    Khyrid

    Joined:
    Oct 8, 2010
    Posts:
    1,790
    Useful side note. Unity doesn't use the alpha for specular mapping with Targa files, but it works with TIFFs.
     
  9. trentdk

    trentdk

    Joined:
    Jul 28, 2011
    Posts:
    22
    Sorry to revive an old thread, but how would one go about taking a diffuse texture and edit the alpha levels of it for Bumped Specular shader?

    Example: I have a PSD file that I'm using as the diffuse map. Would I just open it up in Photoshop and start messing around with opacity of parts that I want to respond to shininess? Would I leave the layer underneath black, or fill it in with white or black?
     
  10. blitzen

    blitzen

    Joined:
    Sep 4, 2011
    Posts:
    51
    Selecting the texture in the Project panel, there is an "Alpha from Grayscale" checkbox in the inspector.
     
    Last edited: Feb 22, 2012
  11. helioraanswer

    helioraanswer

    Joined:
    Apr 7, 2009
    Posts:
    412
    Having the same problem. I'm not to familiar with channels.

    I've checked Alpha from Grayscale but it just makes everything a little shiny.

    I'd like to have only the skin shiny, and the cloth not.

    Any tips?
     
  12. CognizanCe

    CognizanCe

    Joined:
    Jul 27, 2012
    Posts:
    3
    How do I get BumpColorSpec shader to install/work?
     
  13. Daniel_Brauer

    Daniel_Brauer

    Unity Technologies

    Joined:
    Aug 11, 2006
    Posts:
    3,355
  14. dratsum

    dratsum

    Joined:
    Aug 31, 2013
    Posts:
    6
    The best way to do this (the way to get the best results anyway) is to create a new Photoshop (or whichever image editor you use) file - or better yet, a new layer group - and create your custom spec map there. When done, copy it (copy merged) and paste it into the alpha channel of your diffuse map.
     
  15. isteveee

    isteveee

    Joined:
    Oct 31, 2014
    Posts:
    4
    Thx a lot for that answer for there's no more struggles for me, I'm using alphas now ^^