Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

"Absolutely rough / non smooth" material with Standard shader

Discussion in 'Unity 5 Pre-order Beta' started by Garrettec, Jan 29, 2015.

  1. Garrettec

    Garrettec

    Joined:
    Nov 26, 2012
    Posts:
    98
    Hello, guys. It seems that with standard shaders we are not able to achieve "absolutely rough" material, which will not reflect any light at all. Is it feature of PBR, bug or am I missing some settings?

    Here is example:
    Cargo scene.jpg

    As you can see, coach has unnatural specular light, which rough wooden parts shouldn't have in real life. To see it more clearly I added two completely black cubes. One of them (which have specular too) have Standard shader with black spec and 0 smoothness, other one (which looks totally black) is Legacy Diffuse.

    here is lighting settings and scene from different angle just in case:
    Cargo scene 2.jpg
     
    Lex4art and Zylex like this.
  2. Muro

    Muro

    Joined:
    Nov 7, 2012
    Posts:
    25
    That's because absolutely rough material doesn't exist in real world. Even the roughest wood has specular.
     
  3. Garrettec

    Garrettec

    Joined:
    Nov 26, 2012
    Posts:
    98
    It's true, but at the first screenshot I see unnaturally bright glossiness on the wood. It looks like varnished wood, not old and mouldering. In addition, sand seems wet from this angle, again due to glossiness.

    And second statement is: In real world we have air friction affecting every moving object. But in Unity Physx gives us possibility to calculate movement with ideal conditions, without air friction, Coriolis effect etc.
     
  4. m4d

    m4d

    Joined:
    Jan 25, 2012
    Posts:
    27
  5. Garrettec

    Garrettec

    Joined:
    Nov 26, 2012
    Posts:
    98
  6. Autarkis

    Autarkis

    Joined:
    Oct 10, 2011
    Posts:
    318
    It would be nice to have a control slider for fresnel reflections so you could potentially dial that down on the wood, since you posted that first picture at a glancing angle that's why i'm talking about fresnel. I havent touched shaderforge for Unity5 yet, but if that's what it is, should be pretty use to code yourself a custom shader to control the amount.
     
    Garrettec likes this.
  7. Garrettec

    Garrettec

    Joined:
    Nov 26, 2012
    Posts:
    98
    Exactly what I am talking about! We should have some control over coefficient affecting how pitch angle affects specularity (reflectivity / fresnel reflection, call it as you wish). All shaders are just approximation of real world processes, thus I don't understand some people arguing and trying to prove that all real world objects HAVE Fresnel. Sure they have, but Perhaps all real world objects are not flat surfaces constructed from polygons?
     
  8. Autarkis

    Autarkis

    Joined:
    Oct 10, 2011
    Posts:
    318
    Indeed. It's not just that, but all materials have different fresnel strength and fall-offs and you can't control that through a texture map, be it metallic, roughness, specular or any other maps that Unity5 can use. It has to be a shader setting and it's a pity that Unity5 does not expose that parameter natively ( even though the standard shader has it built in, why not make the parameter visible?), like i said though, with the excellent shader forge you should be able to whip one up pretty quick, i remember, that was one of the first shaders i created for myself when the early betas of it came out for Unity 4.x - i'd do one for you but at the moment, I'm swamped with so many errors on the beta that im scrambling to fix.
     
    Garrettec likes this.
  9. Garrettec

    Garrettec

    Joined:
    Nov 26, 2012
    Posts:
    98
    Thank you, Autarkis, it is very kind of you to offer such great help! There is no need in wasting your time for me, with Shader Forge we should be able to do it by ourselves. But shader forge (as far as I know) make not optimal shaders and it will be way better to get this functionality from Unity, because I guess a lot of people later will ask the same question and handle same problem. I am personally have a lot of time until release of our game, so as it is only beta now, I'd prefer to help Unity to improve their product by making them know that we really need such feature. :)
     
  10. Autarkis

    Autarkis

    Joined:
    Oct 10, 2011
    Posts:
    318
    Exactly! That's why I was so happy than Unity was offering PBR, because stuff that's native to the engine is always better for so many reasons. We're not even alpha yet on our game, but Im worried because we want to do a public beta and i have no idea when all the stuff will be fixed. Best of luck with your project!
     
    Garrettec likes this.
  11. Zylex

    Zylex

    Joined:
    Nov 25, 2008
    Posts:
    238
    We are having the same issues in our project. I am aware of the fresnel effect but this just does not seem right. To relieve this effect we already toned down the reflection probes but it does not solve it all. The effect is especially noticeable on
    terrain:



    Are we doing something wrong or is there a way to work around this?
     
    Garrettec likes this.
  12. Garrettec

    Garrettec

    Joined:
    Nov 26, 2012
    Posts:
    98
    I guess our hope that Aras or Rober will notice this thread and in later versions give us control over this effect. (Really don't want to create request at feedback tab and wait until this request will get enough votes... Because control over this effect is not a feature, but "crucial must have base functionality" :)
     
  13. Gokcan

    Gokcan

    Joined:
    Aug 15, 2013
    Posts:
    289
    I agree with the idea that they should give us control to change fresnel amount:)
     
  14. ReJ

    ReJ

    Unity Technologies

    Joined:
    Nov 1, 2008
    Posts:
    378
    If you have very rough surface (smoothness=0) it is not Fresnel, but rather a "Disney Diffuse" term of our BRDF. Very rough materials kinda glow a tiny bit on the edges - intensity/tint comes from the light, not from reflections!. Currently we have no separate control for this. You might want to increase smoothness a bit to diminish this effect.

    See red plastic sphere from MERL100 database:
     

    Attached Files:

    Garrettec likes this.
  15. Garrettec

    Garrettec

    Joined:
    Nov 26, 2012
    Posts:
    98
    Thank you, Rej, for your reply.
    Unfortunately increasing smoothness even a tiny bit only amplify "this effect", material became even more shiny:
    1.jpg 2.jpg
     
    Last edited: Feb 2, 2015
  16. Zylex

    Zylex

    Joined:
    Nov 25, 2008
    Posts:
    238
    Hi Rej,

    Thanks for your reply. Increasing smoothness does not help since that only makes our object seem more 'wet' like GarretC said. ( http://i.gyazo.com/78ac45bc31971ce70f1bf27119ffc9e7.png ). With this effect in place everything seems too smooth and shiny and loses color which wouldn't be the case in real life and there seems to be no way to create rough surfaces. We currently workaround this by using specular shader with very very low specular values(which are not right according to most charts).

    While I agree we should have this effect but I think its too strong. Or atleast we need an option to tweak it. I would like to hear what you and Unity think and how we should proceed on making our materials.
     
    Garrettec likes this.
  17. Zomby138

    Zomby138

    Joined:
    Nov 3, 2009
    Posts:
    659
    @Garrettec Have you tried adding an occlusion map? Basically dark lines between the planks with white everywhere else etc. I think that would help make it look better.
     
    Garrettec and the_motionblur like this.
  18. the_motionblur

    the_motionblur

    Joined:
    Mar 4, 2008
    Posts:
    1,774
    This. You seem to have an AO pass beween the Wood planks but the planks themselves shin completely equal. Which should not be the case. Your normal map can't actually heighten and lower the fine roughness of rough wood so you shoud try to add a slight graduation in the AO as well. It's compareable to a flat specular map on the old shaders. And/Or you try variations on the wood roughness as well.
     
    Garrettec likes this.
  19. Garrettec

    Garrettec

    Joined:
    Nov 26, 2012
    Posts:
    98
    Thank you, Zomby, we haven't used occlusion maps yet, but it will look better (but will not solve the problem)
     
  20. Zylex

    Zylex

    Joined:
    Nov 25, 2008
    Posts:
    238
    This indeed helps but does not entirely solves the problem(My example already used strong AO). Also since terrain has no AO slot this is not an option for terrain atm.