-
Notifications
You must be signed in to change notification settings - Fork 95
feat(extended translucency): "scattering volume" material #1350
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
Open
ArcEarth
wants to merge
1
commit into
doodlum:dev
Choose a base branch
from
ArcEarth:extended_translucency_dev
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+17
−4
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -90,6 +90,7 @@ void ExtendedTranslucency::DrawSettings() | |
| "1 - Rim Edge", | ||
| "2 - Isotropic Fabric, Glass, ...", | ||
| "3 - Anisotropic Fabric", | ||
| "4 - Scattering Volume", | ||
| }; | ||
|
|
||
| static constexpr int AlphaModeSize = static_cast<int>(std::size(AlphaModeNames)); | ||
|
|
@@ -104,7 +105,8 @@ void ExtendedTranslucency::DrawSettings() | |
| " - Disabled: No anisotropic transluency, flat alpha.\n" | ||
| " - Rim Edge: Naive rim light effect with no physics model, the edge of the geometry is always opaque even its full transparent.\n" | ||
| " - Isotropic Fabric: Imaginary fabric weaved from threads in one direction, respect normal map, also works well for layer of glass panels.\n" | ||
| " - Anisotropic Fabric: Common fabric weaved from tangent and birnormal direction, ignores normal map.\n"); | ||
| " - Anisotropic Fabric: Common fabric weaved from tangent and birnormal direction, ignores normal map.\n" | ||
| " - Scattering Volume: A **volumn** (instead of a layer) of light scattering or absoring material, it fade the geometry out at its edge instead of strength them like other material.\n"); | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Spelling and grammar mistakes:
I suggest you put your texts through a spell checker or LLM |
||
| } | ||
| if (ImGui::Checkbox("Skinned Mesh Only", &settings.SkinnedOnly)) { | ||
| changed = true; | ||
|
|
@@ -160,7 +162,7 @@ std::pair<std::string, std::vector<std::string>> ExtendedTranslucency::GetFeatur | |
| return { | ||
| "Extended Translucency provides realistic rendering of thin fabric and other translucent materials.\n" | ||
| "This feature supports multiple material models for different types of translucent surfaces.", | ||
| { "Multiple translucency material models (rim edge, isotropic/anisotropic fabric)", | ||
| { "Multiple translucency material models (rim edge, isotropic/anisotropic fabric, scattering volume)", | ||
| "Realistic fabric translucency with directional light transmission", | ||
| "Per-material override support via NIF extra data", | ||
| "Configurable transparency and softness controls", | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The distance a ray of light traveled in a sphere is
2R*cos(theta), which scatters light atexp(k*2R*cos(theta))wherekis a absorbing factor.kcan be deduced from the input alpha, assuming its the transparency when viewing from its normal direction.And the math turns out to be this simple...