Physical Material Database example update #694
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.
Updated attenuationDistance so it uses the new transmissionDepth attribute from the API instead of density.
Density is not really useful for shading and is only meant to be used for physics simulations.
I've recently added transmissionDepth to the database for a few materials and it gives much more accurate results.
The affected materials (only Blood and Coffee so far) now look quite dark but is expected as the shader ball is quite big (4 cm grid size) and these materials have very strong absorption.
Examples:
Blood (before)


Blood (after)
Coffee (before)


Coffee (after)
Gasoline should in reality be unaffected as it doesn't have transmission depth, but a slight difference can be seen as it was previously using 1000 / density which is now set to 1.0 for materials without the transmissionDepth attribute. This should however be more accurate.
Gasoline (before)


Gasoline (after)