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

Adding textured roughness to the roughplastic material #391

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

belcour
Copy link
Contributor

@belcour belcour commented Mar 5, 2021

Adding textured roughness to the roughplastic plugin.
This is done similarly to the roughconductor plugin.

@Speierers
Copy link
Member

Hi @belcour ,

Thanks for opening this PR and looking into this.

IIRC the reason for not supporting textured roughness in this plugin is that the precompute tables m_external_transmittance and m_internal_transmittance depend on the alpha and would therefore need to be spacially varying as well.

We currently do not have a good way to deal with this problem, and are open to suggestions!

@belcour
Copy link
Contributor Author

belcour commented Mar 5, 2021

Hi @Speierers,

I see your point. Right now, my way of handling it is to feed the mean value of the roughness texture to the preintegrated transmittance and reflectance. Visually, the dieletric coating's roughness is the most important cue.

Mitsuba 0.6 did precompute the tabulated versions using 3D data tables. Anything preventing to use the 'old' method?

A more proper way would be to stochastically evaluate the rough refractions and diffuse bounce in the BSDF. Given that the outcoming importance will be angularly very low frequency, that shouldn't be too much of an issue with respect to increasing variance in the integrator.

@Speierers
Copy link
Member

Hi @belcour,

Those are indeed viable solutions. We orgininally thought of fitting polynomials to this high dimentional table that could then be evaluated analytically. This would be more elegant than precomputing a table and more accurate than the solution you proposed here.

Any interest in giving this a shot?

@belcour
Copy link
Contributor Author

belcour commented Mar 16, 2021

Hi @Speierers,

Sure, I can take a lot at that (might take a while though). Still, the polynomial might not be the most efficient way to handle this given the dimensionality of the data.

@waytobehigh
Copy link

Hi @Speierers!

Is there a way to compute m_external_transmittance and m_internal_transmittance on the fly without pre-calculation? Non-painful way is preferred :)

@wjakob
Copy link
Member

wjakob commented Dec 6, 2021

It would be nice if there was. Do let us know if you can think of something @waytobehigh ;-). A student at EPFL is also currently looking into this, we'll see..

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