Skip to content

Conversation

AntonPalmqvist
Copy link
Contributor

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)
image
Blood (after)
image

Coffee (before)
image
Coffee (after)
image

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)
image
Gasoline (after)
image

- Updated attenuationDistance so it uses the new "transmissionDepth" attribute from the API instead of "density"
@gkjohnson
Copy link
Owner

Amazing! Cool to see that the colors match more closely, now.

@gkjohnson gkjohnson merged commit 383bbdc into gkjohnson:main Sep 30, 2025
4 checks passed
@gkjohnson gkjohnson added this to the v0.0.24 milestone Sep 30, 2025
@AntonPalmqvist AntonPalmqvist deleted the materialDatabase-update branch October 1, 2025 16:51
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.

2 participants