Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for transmission_extra_roughness in Standard Surface #1079

Conversation

niklasharrysson
Copy link
Contributor

This change list adds support for parameter transmission_extra_roughness, that was previously unused in the MaterialX standard_surface implementation.

@niklasharrysson
Copy link
Contributor Author

specular_roughness = 0.15, transmission_extra_roughness = 0.0
specular_0 15_transmission_0 00

specular_roughness = 0.15, transmission_extra_roughness = -0.12 (removing most of the roughness from transmission)
specular_0 15_transmission_-0 12

specular_roughness = 0.15, transmission_extra_roughness = 0.05 (adding additional roughness to transmission)
specular_0 15_transmission_0 05

Copy link
Member

@jstone-lucasfilm jstone-lucasfilm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thanks @niklasharrysson!

@jstone-lucasfilm jstone-lucasfilm merged commit 9d40860 into AcademySoftwareFoundation:main Sep 15, 2022
@dbsmythe
Copy link
Contributor

I am thinking it might be better if this was implemented as a multiplier for the original roughness value, rather than being subtracted. In particular, if the original roughness value is texture mapped and contains a mix of very small and much larger values, then you couldn't subtract very much without roughness going negative. If implemented as a multipler this can never happen. I think that artistically, globally doubling or halving roughness on a texture-varying surface would look more natural as well.

@niklasharrysson
Copy link
Contributor Author

Thanks for the feedback @dbsmythe.
I see your point, but the way it is implemented now, being additive/subtractive, is how it is defined in the Standard Surface whitepaper: https://autodesk.github.io/standard-surface/
It's how it has been implemented in Arnold and other Autodesk products. So if we want to change that behavior I think that would have to be discussed with Autodesk and the authors of the whitepaper.

@Minianikum
Copy link

Minianikum commented Sep 16, 2022

I also see your point @dbsmythe, but I think that a multiplier would move away from the point of "transmission_extra_roughness".
The light passing through the material is scattered by the surface roughness, then it might also be additionally scattered by the medium itself - hence the "extra roughness" - that is not related to how rough the surface is, just added to it. If we were to use a multiplier the "blurriness" of the medium would always be proportional to the roughness of the surface, and there shouldn't be such a relation, they need to be separate things that are added together.
(they need to be capped to 0-1 of course)

@niklasharrysson niklasharrysson deleted the standard_surface_trans_roughness branch September 16, 2022 08:25
Michaelredaa pushed a commit to Michaelredaa/MaterialX that referenced this pull request Oct 21, 2023
…demySoftwareFoundation#1079)

This change list adds support for parameter transmission_extra_roughness, that was previously unused in the MaterialX standard_surface implementation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants