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

Proposal/Request: Decouple coat roughness from transmission/refraction #197

Closed
sharktacos opened this issue May 15, 2024 · 4 comments
Closed

Comments

@sharktacos
Copy link

Is there a means to decouple specular roughness from affecting transmission/refraction? In the Standard Surface, this could be accomplished with coat roughness which did not affect the transmission roughness. In Open PBR the coat roughness appears to affect the transmission, as does the specular roughness. I would wish that the coat did not affect the transmission so for example one could create scratches on a transparent surface without making the underlying substrate into (expensive to render) frosted glass.

@sharktacos sharktacos changed the title Decouple coat roughness from transmission/refraction Proposal/Request: Decouple coat roughness from transmission/refraction May 16, 2024
@portsmouth
Copy link
Contributor

portsmouth commented May 28, 2024

Do you mean that for example you want a thin pane of glass, which appears rough/frosted viewed from one side, but clear/smooth on the other side?

That's a bit problematic for OpenPBR since it would be explicitly unphysical (at least, I can't think of any physical way of achieving that). But even with OpenPBR it could be done I assume with some shader hacks, e.g. making the roughness depend on the view direction, which I think might be a better approach than baking such a non-physical effect into the model.

@sharktacos
Copy link
Author

@portsmouth, I'm thinking primarily of scratched and weathered glass, or even of a layer of dust and grime on glass. Like the windshield of an old pickup truck. As this is only on the surface, as another material layer (grime) over the other material (glass) I would not expect that to affect the refraction, but just the specular. In general, it's nice to be able to use the coat as a second specular lobe to layer specular like this. It's also worth mentioning that the calculation is much quicker to render cleanly.

@portsmouth
Copy link
Contributor

portsmouth commented May 29, 2024

If you model the grime as the fuzz layer, then it would behave something like what you describe, as currently we assume the fuzz does not roughen the transmission. I think that could make sense physically, since e.g. if the fuzz is just absorbing the incident light without scattering, it would not affect the transmission roughness. (Though technically, the fuzz model we currently use does not explicitly model absorption, so it's not ideal).

For the coat, we do assume it explicitly roughens the transmission (if the coat is rough), since physically it must as the rough microfacet surface will roughen both the reflection and transmission. In the case of a real pane of glass, I think it must be the case also that if it is scratched up to the point that it looks frosted from the outside, the transmission (seen from the inside) must appear frosted too. So if one wants to avoid that, some hack is needed like just turning off the roughness if the camera is inside.

@sharktacos
Copy link
Author

Ah yes, that makes sense. Thanks very much for explaining that workflow. Always good for us artists to learn how to do things in a physically correct way, especially with a shader with PBR in its name!

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

No branches or pull requests

2 participants