Announcement

Collapse
No announcement yet.

OSL and weird glossiness values for vray_cooktorrance()

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • OSL and weird glossiness values for vray_cooktorrance()

    Hi,

    I'm getting some weird results with high values of reflection glossiness with vray_cooktorrance().

    If you set the reflection glossiness to 0.996 you get sharp reflections which is great. But then if you use a glossiness value of 0.0997 or 0.998 a dark edge/ring starts to appear around the mesh (I'm looking at a shader ball). And finally, if you set the glossiness value to 0.999 or 1.0 the whole reflection disappears. Is this expected behavior?

    Right now, I feel I must clamp the value of the glossiness at around 0.996 to not create confusion.

    Here's my shader: https://raw.githubusercontent.com/fr...c_material.osl
    Please note you need to set the texture sliders manually because they all default to color(1.0) right now...
    Last edited by Fredrik Averpil; 16-06-2014, 11:58 PM.
    Best Regards,
    Fredrik

  • #2
    Well, when highlight/reflection glossiness values creep towards 1.0 some limit conditions occur, so in a way ... yes it is expected behavior.
    There are some options here:
    1. As you suggested clamp the input values to meaningful ranges.
    2. Replace the closure with pure specular reflection when some border value for glossiness is reached.

    Hope I helped here.

    Best regards,
    Ivan Mavrov

    Comment


    • #3
      Okay, great. That helps. Thank you for clarifying!
      I think your second option is the best one.
      Last edited by Fredrik Averpil; 19-06-2014, 01:04 AM.
      Best Regards,
      Fredrik

      Comment

      Working...
      X