Cycles Roughness & the Principled BSDF are incompatible #51895

Closed
opened 2017-06-25 21:21:43 +02:00 by Andy Davies · 13 comments

Hey all,

I'm concerned with the naming convention of the "Roughness" parameter in the new principled BSDF as it is incompatible with the "Roughness" parameter in the default (current) Cycles shader.

Cycles currently uses academic surface roughness ([Rdq ]]) in the default shader, whereas the Principled BSDF from the [ https:*disney-animation.s3.amazonaws.com/library/s2012_pbs_disney_brdf_notes_v2.pdf | Disney paper uses "Perceptual Roughness", that is a re-parametrization of Rdq (roughness^2) for a more perceptually linear distribution of blur strength in order to make it easier to work with for artists.

This essentially means that a user will have to manually convert the values between the two standards if they wish to get identical results (assuming they know the conversion formula). A roughness value of 0.5 in Rdq is equivalent to 0.7071 in the Principled BSDF.

In the images below you can see the differences between the two standards in practice.

perceptual_vs_rdq_plot.png

roughness_vs_roughness_squared.jpg

In the image above I have used decreasing roughness values of 1.0, 0.8, 0.6, 0.4, 0.2 & 0.0. True Surface Roughness (Rdq) (top) shows a perceptually non-linear decrease in roughness from left to right when using the same values per sphere as the perceptual roughness (bottom), which shows a more artist friendly perceptually linear distribution.

I suggest that the Roughness parameter in the new Principled BSDF is renamed to "Smoothness", which is simply perceptual roughness inverted (1-). Giving the parameter a new name removes the potential for diluting the two standards together, allows them to live side by side & also avoids the confusion and incompatibility between them. A roughness value of 0.5 in Rdq is equivalent to 0.7071 in the Principled BSDF & 0.2929 in Smoothness.

Frostbite engine (DICE), Unity, CryEngine & Knald use the Smoothness convention so it already has support within the industry. While Unreal Engine 4 uses the term "Roughness" for "Perceptual Roughness", it should be noted that they only have to support one roughness standard so the issue with diluting the two terms or confusing users is non-existent within the UE4 ecosystem.

Hey all, I'm concerned with the naming convention of the "Roughness" parameter in the new principled BSDF as it is incompatible with the "Roughness" parameter in the default (current) Cycles shader. Cycles currently uses academic surface roughness ([Rdq ]]) in the default shader, whereas the Principled BSDF from the [[ https:*disney-animation.s3.amazonaws.com/library/s2012_pbs_disney_brdf_notes_v2.pdf | Disney paper ](https:*en.wikipedia.org/wiki/Surface_roughness) uses "Perceptual Roughness", that is a re-parametrization of Rdq (roughness^2) for a more perceptually linear distribution of blur strength in order to make it easier to work with for artists. This essentially means that a user will have to manually convert the values between the two standards if they wish to get identical results (assuming they know the conversion formula). A roughness value of 0.5 in Rdq is equivalent to 0.7071 in the Principled BSDF. In the images below you can see the differences between the two standards in practice. ![perceptual_vs_rdq_plot.png](https://archive.blender.org/developer/F642591/perceptual_vs_rdq_plot.png) ![roughness_vs_roughness_squared.jpg](https://archive.blender.org/developer/F642593/roughness_vs_roughness_squared.jpg) In the image above I have used decreasing roughness values of 1.0, 0.8, 0.6, 0.4, 0.2 & 0.0. True Surface Roughness (Rdq) (top) shows a perceptually non-linear decrease in roughness from left to right when using the same values per sphere as the perceptual roughness (bottom), which shows a more artist friendly perceptually linear distribution. I suggest that the Roughness parameter in the new Principled BSDF is renamed to "Smoothness", which is simply perceptual roughness inverted (1-). Giving the parameter a new name removes the potential for diluting the two standards together, allows them to live side by side & also avoids the confusion and incompatibility between them. A roughness value of 0.5 in Rdq is equivalent to 0.7071 in the Principled BSDF & 0.2929 in Smoothness. Frostbite engine (DICE), Unity, CryEngine & Knald use the Smoothness convention so it already has support within the industry. While Unreal Engine 4 uses the term "Roughness" for "Perceptual Roughness", it should be noted that they only have to support one roughness standard so the issue with diluting the two terms or confusing users is non-existent within the UE4 ecosystem.
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @AndyDavies-3

Added subscriber: @AndyDavies-3
Andy Davies changed title from Cycles Roughness & the Prinicpled BSDF are incompatible to Cycles Roughness & the Principled BSDF are incompatible 2017-06-25 21:22:08 +02:00

Added subscriber: @brecht

Added subscriber: @brecht

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Brecht Van Lommel self-assigned this 2017-06-26 05:04:14 +02:00

My plan is to convert all the other nodes to squared roughness in Blender 2.8 (automatically inserting an extra conversion node if the parameter is linked). For Blender 2.79 there will be some inconsistency, but I don't think it's that big a deal.

If we introduce Smoothness users will have to find the conversion formula as well, there will be new terminology to learn, and it's not a naming typically used in physically based raytracers. So I think that would be the more disruptive change.

My plan is to convert all the other nodes to squared roughness in Blender 2.8 (automatically inserting an extra conversion node if the parameter is linked). For Blender 2.79 there will be some inconsistency, but I don't think it's that big a deal. If we introduce Smoothness users will have to find the conversion formula as well, there will be new terminology to learn, and it's not a naming typically used in physically based raytracers. So I think that would be the more disruptive change.
Brecht Van Lommel was unassigned by Andy Davies 2017-06-26 05:08:30 +02:00
Author

Changed status from 'Archived' to: 'Open'

Changed status from 'Archived' to: 'Open'
Member

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Aaron Carlisle self-assigned this 2017-06-26 05:31:31 +02:00
Author

Thanks for the reply, Brecht.

I think it would be a great shame to remove the Rdq if I'm honest. It's the defacto academic standard and shouldn't be changed simply for a shader that is principled only. Disney made a mistake using the term "Roughness" in the first place when there was a current standard already in place and should have been more mindful when naming it.

I also have disagree that changing the name to smoothness with force users to find a conversion formula, as for all intents and purposes it would be an entirely new parameter for which users would expect a difference. As such a conversion would be expected, but not forced as the issue was that we had 2 parameters with identical names but different results. Users would naturally assume that these parameters would be identical and there is where the problem arises.

Also by changing the current shader to squared roughness we have a problem with regression where all shaders using the current roughness will break. It's got to be much less disruptive to just change the name to smoothness and circumvent the issue entirely. There would be zero regression as current files would continue to work and the new shader would function independently.

Thanks for the reply, Brecht. I think it would be a great shame to remove the Rdq if I'm honest. It's the defacto academic standard and shouldn't be changed simply for a shader that is principled only. Disney made a mistake using the term "Roughness" in the first place when there was a current standard already in place and should have been more mindful when naming it. I also have disagree that changing the name to smoothness with force users to find a conversion formula, as for all intents and purposes it would be an entirely new parameter for which users would expect a difference. As such a conversion would be expected, but not forced as the issue was that we had 2 parameters with identical names but different results. Users would naturally assume that these parameters would be identical and there is where the problem arises. Also by changing the current shader to squared roughness we have a problem with regression where all shaders using the current roughness will break. It's got to be much less disruptive to just change the name to smoothness and circumvent the issue entirely. There would be zero regression as current files would continue to work and the new shader would function independently.
Author

@brecht

Is it possible to at least get a checkbox to use Rdq so users can pick their choice of roughness standard? I use Rdq on a regular basis in situations where roughness squared is not usable without conversion.
Thanks :)

@brecht Is it possible to at least get a checkbox to use Rdq so users can pick their choice of roughness standard? I use Rdq on a regular basis in situations where roughness squared is not usable without conversion. Thanks :)

There isn't really one academic defined unit named roughness, it's all just convention in renderers. For example Arnold has used squared roughness for a long time, before Cycles even existed, and calls it roughness. We chose to make the Principled BSDF compatible with the Disney BRDF / UE4 / Substance Painter, and that comes with a specific naming and squaring.

In 2.8 we can convert old files in a backwards compatible way, I rather not add options since those kinds of legacy things accumulate.

There isn't really one academic defined unit named roughness, it's all just convention in renderers. For example Arnold has used squared roughness for a long time, before Cycles even existed, and calls it roughness. We chose to make the Principled BSDF compatible with the Disney BRDF / UE4 / Substance Painter, and that comes with a specific naming and squaring. In 2.8 we can convert old files in a backwards compatible way, I rather not add options since those kinds of legacy things accumulate.
Author

Thanks for the reply @brecht

I'm not sure that statement is entirely correct. Disney are using perceptual roughness, which is the square root of academic roughness. The whole reason [Beckmann ]] was introduced in the [ http:*inst.cs.berkeley.edu/~cs294-13/fa09/lectures/cookpaper.pdf | Cook-Torrance BRDF (page 6) , was to finally get a parameter that was based on something from physics/academics.

In all of the facet Slope distribution functions, the spread of the specular component depends on the root mean square (rms) slope m.

The fact that it's an academic parameter is why it was used in the first place when the Cook-Torrance model was introduced was so you could use physical measuring instruments to tune the BRDF.

Roughness is also mentioned frequently in the Beckmann book (BECKMANN, P. AND SPIZZICHINO, A. The Scattering of Electromagnetic Waves from Rough
Surfaces. MacMillan, New York, 1963, pp. 1-33, 70-98).

In addition we also have Rdq too.

Unfortunately perceptual roughness is pretty useless for scientific use without conversion, and it would be a great shame to see it dropped. Using the two types of roughness interchangeably without prior knowledge of the re-parametrization can make large differences to expected results, with problems such as the same roughness values mapping to different Specular Powers because of the different scales used becoming very evident. Unless we have a clear way for the user to know which type of roughness we are using then it is likely to cause problems.

Another thing worth mentioning is that as Beckmann uses academic roughness, is it reasonable that people would expect Beckmann within Blender to use academic roughness as it's stated in the paper?

Thanks for the reply @brecht I'm not sure that statement is entirely correct. Disney are using perceptual roughness, which is the square root of academic roughness. The whole reason [Beckmann ]] was introduced in the [[ http:*inst.cs.berkeley.edu/~cs294-13/fa09/lectures/cookpaper.pdf | Cook-Torrance BRDF (page 6) ](https:*en.wikipedia.org/wiki/Specular_highlight#Beckmann_distribution), was to finally get a parameter that was based on something from physics/academics. > In all of the facet Slope distribution functions, the spread of the specular component depends on the root mean square (rms) slope m. The fact that it's an academic parameter is why it was used in the first place when the Cook-Torrance model was introduced was so you could use physical measuring instruments to tune the BRDF. Roughness is also mentioned frequently in the Beckmann book (BECKMANN, P. AND SPIZZICHINO, A. The Scattering of Electromagnetic Waves from Rough Surfaces. MacMillan, New York, 1963, pp. 1-33, 70-98). In addition we also have [Rdq ](https://en.wikipedia.org/wiki/Surface_roughness) too. Unfortunately perceptual roughness is pretty useless for scientific use without conversion, and it would be a great shame to see it dropped. Using the two types of roughness interchangeably without prior knowledge of the re-parametrization can make large differences to expected results, with problems such as the same roughness values mapping to different Specular Powers because of the different scales used becoming very evident. Unless we have a clear way for the user to know which type of roughness we are using then it is likely to cause problems. Another thing worth mentioning is that as Beckmann uses academic roughness, is it reasonable that people would expect Beckmann within Blender to use academic roughness as it's stated in the paper?

For the Beckmann case, squaring the roughness is like using the standard deviation instead of variance, it's just as physically based and the choice is a matter of convention. We will document the precise meaning of the roughness parameter when we change it. The 1% of users that care about this kind of thing should be smart enough not to assume a parameter corresponds to their best guess, and read the docs or code.

For the Beckmann case, squaring the roughness is like using the standard deviation instead of variance, it's just as physically based and the choice is a matter of convention. We will document the precise meaning of the roughness parameter when we change it. The 1% of users that care about this kind of thing should be smart enough not to assume a parameter corresponds to their best guess, and read the docs or code.

Added subscriber: @Sparazza

Added subscriber: @Sparazza
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#51895
No description provided.