Skip to content

Commit 1c00ccd

Browse files
Add specification proposal for maxcomponent and mincomponent nodes (#2876)
## Summary Add specification proposal for `maxcomponent` and `mincomponent` nodes to the Math Nodes section of the Specification Proposals document. Closes #2802 ## Description Per the discussion in #2802 with @jstone-lucasfilm : - These nodes support **all vectorN and colorN types** (`vector2`, `vector3`, `vector4`, `color3`, `color4`) - Output type is **float** The proposal format follows existing nodes such as `magnitude` and `dotproduct` in the Standard Nodes document. ### Use Cases As mentioned in the issue, two places in the MaterialX data libraries currently use verbose 5-node patterns (3 `extract` + 2 `max`/`min`) that these nodes would simplify to a single node: 1. **Sheen intensity for glTF PBR** (`libraries/bxdf/gltf_pbr.mtlx`) — uses `maxcomponent` pattern 2. **Absorption coefficient for OpenPBR Surface** (`libraries/bxdf/open_pbr_surface.mtlx`) — uses `mincomponent` pattern ### Scope This PR addresses the specification proposal only. I can work on the follow-up implementation via graph definitions as a separate PR once the proposal is reviewed and merged.
1 parent cb99ac9 commit 1c00ccd

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

documents/Specification/MaterialX.Proposals.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,25 @@ If adopted, the existing `triplanarprojection` node would be reimplemented as a
290290
|`filtertype`|The type of texture filtering to use |string |linear |closest, linear, cubic|
291291
|`out` |Output: the blended value |Same as `inx` |__zero__ | |
292292

293+
<a id="node-maxcomponent"> </a>
294+
295+
### `maxcomponent`
296+
Output the maximum of all components of the incoming vectorN or colorN stream as a float value.
297+
298+
|Port |Description |Type |Default |
299+
|-----|-------------------------------------|----------------|---------|
300+
|`in` |The input value |vectorN, colorN |__zero__ |
301+
|`out`|Output: maximum component of `in` |float |0.0 |
302+
303+
<a id="node-mincomponent"> </a>
304+
305+
### `mincomponent`
306+
Output the minimum of all components of the incoming vectorN or colorN stream as a float value.
307+
308+
|Port |Description |Type |Default |
309+
|-----|-------------------------------------|----------------|---------|
310+
|`in` |The input value |vectorN, colorN |__zero__ |
311+
|`out`|Output: minimum component of `in` |float |0.0 |
293312

294313

295314
### Adjustment Nodes

0 commit comments

Comments
 (0)