Add node for directionally varying emission. #1262
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change list adds a new node to pbrlib:
generalized_schlick_edf
.This node can be used to create a directionally varying / Fresnel-like modulation to emission, using the generalized Schlick Fresnel curve. The main idea is to use this to approximate how emission is attenuated when placed under a coating, which is supported in shading models like Standard Surface.
Using the new node the graph implementation of Standard Surface is updated, to address this as reported in #1057.
Note that this is a simple solution that only account for the Fresnel effect. The roughness of the coat, or multiple scattering in the coat layer, is not considered. We are limited to what can be represented in all the shading languages that MaterialX needs to support. Directionally varying emission was not supported in MDL util recently, and this new node matches what can be expressed in MDL (from version 1.7).
Simple example to show the node result, here modulating a uniform white emission with yellow->red for facing->gracing angles:
Example to show the improved implementation of Standard Surface (top = old implementation, bottom = new implementation):