[SOLVED] ShaderFX - Stingray Viewport PBS Not Rendering Correctly

polycounter lvl 8
Offline / Send Message
eCstatic polycounter lvl 8
For a while now I've been trying to figure out a way to get a PBR shader working inside my Max viewport. Whenever I use the ShaderFX Stingray shader however, my roughness map always becomes splotchy and pixelated.

 I've read that the stingray shader doesn't support grayscale roughness maps so I've went with the ORM (Occlusion, Roughness, Metallic) packed map approach but I'm still getting similar results. All my maps are set to linear encoding, and my gamma/lut is turned off in the viewport. Is this even fixable?





What is causing my roughness map to be rendered this way, and how can I remedy this?

Replies

  • bitinn
    Offline / Send Message
    bitinn triangle
    Like I said, post your BaseColor/Normal/RMA texture node settings.

    For example, Normal map should definitely not use Linear, you should use Normal map encoding.

    And to avoid any doubts on textures, post them as well.

    (I am using Maya so I can only make suggestion in terms of ShaderFX)
  • eCstatic
    Offline / Send Message
    eCstatic polycounter lvl 8
    Thanks for helping me look into this I've played around with it some more and I still cant get it to work. I'm starting to think it might be inherently broken.





  • eCstatic
    Offline / Send Message
    eCstatic polycounter lvl 8
    The effect is even more apparent when using the default cubemap



  • bitinn
    Offline / Send Message
    bitinn triangle
    The maps you uploaded are different from the one you are showing.

    But I think you should try changing the Standard Base's Normal to "Tangent Space". At least I managed to produce a similar weird rendering using "World Space"

    Good luck.

    World Space



    Tangent Space




  • eCstatic
    Offline / Send Message
    eCstatic polycounter lvl 8
    Whoops, I uploaded the wrong maps here are the correct ones with the teapot fbx also.

    I tried tangent space it just flips the environment map, the roughness is still as pixely and splotchy as ever.


  • poopipe
    Offline / Send Message
    poopipe greentooth
    StingrayPBS is not the same as Substance in terms of specular calculations and also has some sort of curve applied that affects output  values.
      
    What I see in your initial images is consistent with what I've seen myself during testing. 

    It's not broken as such, just different. 


  • bitinn
    Offline / Send Message
    bitinn triangle
    @poopipe I think @eCstatic could have done better. This is it in my Maya viewport. Using the same airport environment we created at my thread.



  • bitinn
    Offline / Send Message
    bitinn triangle
    I don't see any obvious mistakes in your material so I am suggesting you remove all other control nodes. And create just the base node like in my old thread.

    That way you have a lot less variable and can tune each node one parameter at a time to figure out what might be wrong.

    EDIT: a few things I would try after creating the base nodes.

    - BaseColor: sRGB Map encoding.
    - Standard Base: IBL encoding use Linear (to match Substance).
    - If all else fails, you might want to open a support ticket to Autodesk (I figure out mine with their support).
  • poopipe
    Offline / Send Message
    poopipe greentooth
    You're absolutely right - I was attempting to add to what you'd already said but I'd only been awake ten minutes so I phrased it badly. 


  • eCstatic
    Offline / Send Message
    eCstatic polycounter lvl 8
    Ok, can't get more basic than this



    The result is messy still. @poopipe I don't think this is normal consistent behavior for the shader because I can see much better and different results in bittin's examples


    Someone had a similar issue to mine and the answer reply from an Autodesk employee was that the issue was in the material code.
    http://polycount.com/discussion/comment/2379869#Comment_2379869
  • poopipe
    Offline / Send Message
    poopipe greentooth
    I've just checked out what happens in max 2017 and maya 2018 using this graph setup (identical in maya)

    My material is in world space because i use the tangent to world node - mainly out of habit.  i didn't change any settings etc.

    max 2017 first: (had to make a new teapot as it didnt like your FBX for some reason)

    and maya 2018


    This is what happens if you tell it the ORM texture is srgb - you get the same thing in Maya:



    That does look suspiciously like what you're getting in your viewport .  

    This should get you to where bitinn is - it doesn't resolve the differences between stingray and substance. 

    If you're not getting this then something is broken. 

    you could try adding a power node (0.45) to un-gamma correct the image if you think there's an issue with encoding
  • marks
    Offline / Send Message
    marks polycounter lvl 10
    why people are using linear textures in games. Facepalm. This isn't vfx industry. You're not helping yourselves here.
  • poopipe
    Offline / Send Message
    poopipe greentooth
    Because they're a far better representation of actual values than srgb( ie 0.5 is actually 0.5) and you don't get crushing of values at either end of the spectrum
  • marks
    Offline / Send Message
    marks polycounter lvl 10
    That's pretty misleading - there's a lot more to it than that, I wrote a ton of info about this in an old thread in this forum about linear vs srgb textures and I've just spent 20mins looking for it, but I can't find it. Sorry. 
  • eCstatic
    Offline / Send Message
    eCstatic polycounter lvl 8

    poopipe said:

    max 2017 first: (had to make a new teapot as it didnt like your FBX for some reason)



    Thanks for the suggestions, they didnt fix my issue unfortunately. In this screenshot you posted, it looks like you are getting the same issue as me with your roughness map being drawn pixelated and splotchy as if its being mip mapped. I'm not seeing it in your Maya screengrab which makes me think that this issue is exclusive to Max.
  • poopipe
    Offline / Send Message
    poopipe greentooth
    Substance doesn't mip so that may contribute, also the brdf is completely different from what's used in stingray and tends to be more contrasty.  What I saw looked about as close as I think you'll get without building a Shader of your own.

    I'd publish mine but I built it at work so I wouldn't be allowed. 


    marks said:
    That's pretty misleading - there's a lot more to it than that, I wrote a ton of info about this in an old thread in this forum about linear vs srgb textures and I've just spent 20mins looking for it, but I can't find it. Sorry. 

    It's a gross simplification I'll grant but it's not untrue. 

    To answer the original question in practical terms - it's what the shaders expect and it's what the authoring tools produce (WRT the grayscale "maths" images at least . 

    Why is it a good idea?
    You'll know this but... if your image is stored with a gamma curve on it then information is squashed at the ends and basically lost. If it's stored as linear then that information can be converted to gamma space without loss.
    Working linear also makes all the maths in your shader cheaper. 

    Overall, it's higher quality and cheaper..


  • eCstatic
    Offline / Send Message
    eCstatic polycounter lvl 8
    poopipe said:
    Substance doesn't mip so that may contribute, also the brdf is completely different from what's used in stingray and tends to be more contrasty.  What I saw looked about as close as I think you'll get without building a Shader of your own.

    I'd publish mine but I built it at work so I wouldn't be allowed. 

    You got it! Thanks! The BRDF was at fault here, the one I'm using now makes my material looks 100 times more cleaner thanks again.

    This is the BRDF map I'm using if anyone is curious, it works great.






    Max and UE4 comparison


  • shaderfx
    Offline / Send Message
    shaderfx polycounter lvl 9
    nice work @eCstatic
    I've linked your solution on shaderfx.com
Sign In or Register to comment.