SHADER Looking for a simple Shader with specular map

Discussion in 'Tracks' started by Gunnar333, Jun 30, 2019.

  1. Gunnar333

    Gunnar333 Well-Known Member

    Joined:
    Aug 5, 2017
    Messages:
    293
    Likes Received:
    596
    Location:
    Germany
    Hi,
    Anyone knows how to do a simple texture with specular parts are defined by alpha channel or extra bitmap for specular map.
    Just like the simple ksPerPixel but alpha channel used for specular value - not alpha value.

    I think ksMultilayer can do this but it's a bit "overcoded"
     
  2. Pixelchaser

    Pixelchaser Well-Known Member

    Joined:
    Jan 4, 2015
    Messages:
    1,541
    Likes Received:
    1,048
    given you have released a few tracks. im KS_PERPLEXED :lol: about why u ask this a question.

    are you asking how to get a specular from the texture separately ? or how to ad specular into to say multimap per pixel.
     
  3. Gunnar333

    Gunnar333 Well-Known Member

    Joined:
    Aug 5, 2017
    Messages:
    293
    Likes Received:
    596
    Location:
    Germany
    I always use one specular value for the whole material.
    But let's say I have a texture that is a black and white checker and I only want the white parts have a specular value.
     
  4. Pixelchaser

    Pixelchaser Well-Known Member

    Joined:
    Jan 4, 2015
    Messages:
    1,541
    Likes Received:
    1,048
    not sure I understand the main question. but you just gota paint good alpha. take the texture de saturate it. tune its brightness and contrast and use it as alpha.
     
  5. Gunnar333

    Gunnar333 Well-Known Member

    Joined:
    Aug 5, 2017
    Messages:
    293
    Likes Received:
    596
    Location:
    Germany
    Yes I know, how to paint an alpha channel.
    But on which ks Shader does the alpha channel of the dds effects the specular amount?
     
  6. Prototype

    Prototype Well-Known Member

    Joined:
    Dec 24, 2018
    Messages:
    329
    Likes Received:
    587
    Location:
    JHB / SF
    As you say KsMultiLayer gives you the ability to specify specular areas using an image channel …
    Are you concerned that its too heavy performance wise / over engineered for your task?

    As far as I can tell, you don't need to use all the channels, the null placeholder (which exports with the kn5) does just fine for the channels you dont use, which makes the shader lighter in terms of data use.

    As for performance … never really stress tested the shaders personally … the engine in general feels pretty light on todays hardware… what's the context? You need tons of objects using the shader?
     
  7. Gunnar333

    Gunnar333 Well-Known Member

    Joined:
    Aug 5, 2017
    Messages:
    293
    Likes Received:
    596
    Location:
    Germany
    Okay, I thought there's a smaller Shader for it.
    I'm trying to reduce PID count and was wondering if there's a slimmer way.
     
  8. Prototype

    Prototype Well-Known Member

    Joined:
    Dec 24, 2018
    Messages:
    329
    Likes Received:
    587
    Location:
    JHB / SF
    Maybe there is a less complex shader for it? I guess just go through the shader list, unless someone knows one offhand … which is why you posted this in the first place :-D

    ------

    Ive been getting ok specular results using normal maps with the simple KsPerPixelAT_NM
    When making your normal map, I push the the areas I want more specular in the normal map image.
    This can be a bit tricky, because youre also affecting "bump", but its the context that will affect whether this would be a solution or not.

    Have you ever used Substance painter? You can get a lot of control with your normals that way.
     
    Gunnar333 likes this.
  9. Gunnar333

    Gunnar333 Well-Known Member

    Joined:
    Aug 5, 2017
    Messages:
    293
    Likes Received:
    596
    Location:
    Germany
    Might be a solution I will have a look at it
     
  10. Pixelchaser

    Pixelchaser Well-Known Member

    Joined:
    Jan 4, 2015
    Messages:
    1,541
    Likes Received:
    1,048
    don't think you`ll find such a cheap alternative in the form of a shader.

    you cant turn it off. you can only appropriately design it to not produce an effect. and the rest is an albedo association with how its used set in the editor.
     
    Last edited: Jul 3, 2019
  11. GreyDesigns

    GreyDesigns New Member

    Joined:
    Apr 27, 2020
    Messages:
    7
    Likes Received:
    1
    Location:
    Warrington
    Hi, I'm very confused by this also - I have made a very simple texture for testing purposes - Full black RGB, and a checker (full white to full black) in the ALPHA - and have tried all the different shaders I think, but didn't see anything that gave me the results I would expect, or anything visually tbh.

    Does anyone have an example of how to setup a basic material for variation on the specular / glossiness? - I have attached an image of the effect I would like to be able to reproduce.

    Thanks!
     

    Attached Files:

  12. GreyDesigns

    GreyDesigns New Member

    Joined:
    Apr 27, 2020
    Messages:
    7
    Likes Received:
    1
    Location:
    Warrington
    I could see that the alpha was working for transparency on appropriate shaders btw.
     
  13. Gunnar333

    Gunnar333 Well-Known Member

    Joined:
    Aug 5, 2017
    Messages:
    293
    Likes Received:
    596
    Location:
    Germany
    I use the following shader for windows with frames. txMask is like your alpha channel: white for specular black for non specular. Hope this helps.

    SpecShader.png
     
    GreyDesigns likes this.
  14. GreyDesigns

    GreyDesigns New Member

    Joined:
    Apr 27, 2020
    Messages:
    7
    Likes Received:
    1
    Location:
    Warrington
    Excellent, thanks!

    Il give this a go later. :)
     
  15. GreyDesigns

    GreyDesigns New Member

    Joined:
    Apr 27, 2020
    Messages:
    7
    Likes Received:
    1
    Location:
    Warrington
    Worked great, I will probably need to make a few test examples to better understand exactly what each of the settings is actually doing though.
     
    Gunnar333 likes this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice