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

Transmission_color logic #4

Open
Da-Krunch opened this issue Jun 14, 2019 · 2 comments
Open

Transmission_color logic #4

Da-Krunch opened this issue Jun 14, 2019 · 2 comments

Comments

@Da-Krunch
Copy link

Hello,

I am finding what looks like a conflict in the documentation for transmission_color.

  1. in the graph definition we see a coefficient to transmission:
    transmission_sheen_mix = transmission * transmission_color * specular_btdf(...) + (1 - transmission) * sheen_layer;
    That implies a constant (or textured) color plugged straight as a multiplier.

  2. transmission_color: tint due to absorption
    transmission_depth: the distance travelled inside the material by white light before its color becomes exactly transmission_color by Beer's law
    This implies a depth-based effect. In this case texturing it is not recommendable as it would be a volume effect.

Which one should it be?

@Da-Krunch
Copy link
Author

Assuming (as I do...) that in a path tracer implementation we'd go for option 2, should we have some standard to define what units is depth supposed to be working in? this would be helpful for exchanging materials.

@iliyang
Copy link
Contributor

iliyang commented Jul 15, 2019

Thanks for reporting this! Both behaviors can be obtained, in fact. But the specular transmission description was confusing. I've expanded it to explain that transmission_color scales the specular_btdf() closure only when transmission_depth == 0 (which is the default). This results in fixed transmission tinting. When transmission_depth > 0, transmission_color doesn't scale the closure and instead an interior medium is defined where the tinting is governed by Beer's law.

Note that the OSL implementation currently doesn't handle medium absorption (i.e. ignores the transmission_depth parameter), so it always scales the specular_btdf() closure by transmission_color.

Regarding the unit of transmission_depth, it's expected to be specified in meters, as it is used to determine the medium extinction coefficient whose unit is 1/meter.

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