MAXTOA-2033: bind volume shaders on step-size meshes#2705
Open
ZapAndersson wants to merge 2 commits into
Open
Conversation
A polymesh with step_size > 0 renders as an implicit volume, but the writer only routed shaders to the material's volume terminal for native volume nodes, so a mesh-volume's standard_volume landed on the surface terminal. On read-back the shape is treated as a volume and the surface-bound shader is dropped (falling back to _fallbackVolume), rendering black. - Writer: treat a polymesh with step_size > 0 as a volume (matching the reader's IsVolume) so its shader is written to the volume terminal. - Reader: for volume shapes, resolve the volume terminal with priority over the surface terminal, so a universal/preview surface (e.g. a UsdPreviewSurface from MaxUSD) can't shadow it. - Add writer (test_17642.1) and reader (test_17642.2) regression tests. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
63d0456 to
1aaa763
Compare
… IT SOMEWHERE ELSE?)
Contributor
Author
|
MAXTOA-2033 — volume shader renders black (handoff) Symptom: a standard_volume on a step-size polymesh (mesh-as-volume) renders black. Root cause — a volume shape's shader ends up on the wrong material terminal, and a competing surface terminal shadows it. Three code paths, all affected differently:
Commits on the branch: writer (IsVolumeShape + volume terminal + surface-strip in prim_writer.cpp), reader (GetMaterialTargets volume-preference in utils.cpp/.h), tests test_17642.1 (writer) and test_17642.2 (reader/translator). Open decisions for Seb:
|
Collaborator
|
✅ CI passed (build 6). |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
A polymesh with step_size > 0 renders as an implicit volume, but the writer only routed shaders to the material's volume terminal for native volume nodes, so a mesh-volume's standard_volume landed on the surface terminal. On read-back the shape is treated as a volume and the surface-bound shader is dropped (falling back to _fallbackVolume), rendering black.
Writer: treat a polymesh with step_size > 0 as a volume (matching the reader's IsVolume) so its shader is written to the volume terminal.
Reader: for volume shapes, resolve the volume terminal with priority over the surface terminal, so a universal/preview surface (e.g. a UsdPreviewSurface from MaxUSD) can't shadow it.
Add writer (test_17642.1) and reader (test_17642.2) regression tests.
Issues fixed in this pull request
Fixes MAXTOA-2033: FlowRender: Differences in Volume Rendering
Additional context
Add any other context or screenshots about the pull request here.