-
Couldn't load subscription status.
- Fork 408
Initial AOUSD formatting proposals #2520
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
base: main
Are you sure you want to change the base?
Initial AOUSD formatting proposals #2520
Conversation
This changelist contains an initial set of formatting proposals for the Standard Nodes specification, organized by the AOUSD Materials Working Group.
|
Generally speaking, I really like this new proposal: it's quite a bit easier to read, and the increased consistency of formatting and the use of the tables for inputs improves the ease of finding specific information. A few notes:
Some things we can discuss:
I would also suggest that while we're in this transition period, we should keep the original-format version around e.g. "MaterialX.StandardNodes.legacyformat.md" or something like that; once we're happy with the new format and are certain that no information from the legacy document is lost, the legacy-formatted version could be removed in a separate PR. |
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.
I've made some good progress on the automatic generation of this doc.
The comments below are the outstanding differences. Mainly either minor formatting changes, or places that look like small errors introduced in the human refactoring.
| * `amplitude` (float or vector<em>N</em>): the center-to-peak amplitude of the noise (peak-to-peak amplitude is 2x this value). Default is 1.0. | ||
| * `pivot` (float): the center value of the output noise; effectively, this value is added to the result after the Perlin noise is multiplied by `amplitude`. Default is 0.0. | ||
| * `texcoord` (vector2): the 2D texture coordinate at which the noise is evaluated. Default is to use the first set of texture coordinates. | ||
| ### `noise2d` |
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.
This table is missing the following nod definitions
- ND_noise2d_color3
- ND_noise2d_color4
- ND_noise2d_color3FA
- ND_noise2d_color4FA
- ND_noise2d_vector2FA
- ND_noise2d_vector3FA
- ND_noise2d_vector4FA
The corresponding node definitions are also missing from noise3d and fractal3d
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.
Data library fix - will take a while to merge
| * `jitter` (float): amount to jitter the cell center position, with smaller values creating a more regular pattern. Default is 1.0. | ||
| * `style` (integer): the output style, one of "distance" (distance to the cell center), or "solid" (constant value for each cell). | ||
| * `texcoord` (vector2): the 2D position at which the noise is evaluated. Default is to use the first set of texture coordinates. | ||
| ### `worleynoise2d` |
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.
Missing "Accepted Values" derived from the enum values for style.
Also for worleynoise3d.
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.
Should be there
| |`diminish` |The rate at which noise amplitude is diminished for each octave |float |0.5 | | ||
| |`type` |The type of noise function to use. One of 0 (Perlin), 1 (Cell), 2 (Worley), or 3 (Fractal)|integer|0 | | ||
| |`style` |The output style |integer|0 | | ||
| |`out` |Output: the computed noise value |float |0.0 | |
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 default value specified here is not actual defined in the data library - this may be in a bug in the data library that we should fix separately, but currently this specification statement does not accurately reflect the data library as it stands.
Similarly for unifiednoise3d
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.
Data library fix
| |Port |Description |Type |Default| | ||
| |-----|----------------------------------|----------------------|-------| | ||
| |`in1`|The primary input stream |matrixNN |__one__| | ||
| |`in2`|The stream to multiply `in1` by |Same as `in1` or float|__one__| |
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.
There is no ND_multiply_matrix33FA or ND_multiply_matrix44FA.
This looks like a copy/paste bug to include the "or float" here.
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.
Include
| |Port |Description |Type |Default | | ||
| |-----|---------------------------------|--------------------|--------| | ||
| |`in` |Vector to be transformed |vector3 |__zero__| | ||
| |`mat`|Matrix to transform `in` by |matrix33 or matrix44|__one__ | |
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.
should be "matrixNN"
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.
Do this
| |`uvoffset` |The offset for the given image along the U and V axes |vector2 |0.0, 0.0 | | | ||
| |`realworldimagesize`|The real-world size represented by the file image |vector2 |1.0, 1.0 | | | ||
| |`realworldtilesize` |The real-world size of a single square 0-1 UV tile |vector2 |1.0, 1.0 | | | ||
| |`filtertype` |The type of texture filtering to use |string |linear |closest,linear,cubic | |
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.
suggest "closest, linear, cubic" instead of "closest,linear,cubic"
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.
Go with spaces everywhere
| |`normal` |A spatially-varying input specifying the 3D normal vector used for blending |vector3 |_Nobject_| | | ||
| |`upaxis` |Which axis is considered to be 'up', either 0 for X, 1 for Y, or 2 for Z |integer |2 |0, 1, 2 | | ||
| |`blend` |Weighting factor for blending samples using the geometric normal, with higher values giving softer blending |float |1.0 | | | ||
| |`filtertype` |The type of texture filtering to use |string |linear |closest,linear,cubic | |
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.
suggest "closest, linear, cubic" instead of "closest,linear,cubic"
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.
Go with spaces everywhere
| ### `divide` | ||
| Divide one value by another. Scalar and vector types divide component-wise, while for matrices `in1` is multiplied with the inverse of `in2`. | ||
|
|
||
| |Port |Description |Type |Default | |
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.
suggest removing additional spaces in table.
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.
Do this
| ### `power` | ||
| Raise incoming float/color values to the specified exponent, commonly used for "gamma" adjustment. | ||
|
|
||
| |Port |Description |Type |Default | |
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.
suggest removing additional spaces in table.
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.
Do this
| ### `safepower` | ||
| Raise incoming float/color values to the specified exponent. Negative "in1" values will result in negative output values. | ||
|
|
||
| |Port |Description |Type |Default | |
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.
suggest removing additional spaces in table.
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.
Do this
|
@dbsmythe regarding your questions:
For Accepted Values, we tried with it always there and it was pretty ugly, so we're inclined to keep it optional. We can try again if we manage to figure out a way of getting the table widths to always be 100% as maybe that will be less distracting . There normative description does indeed use equations to unambiguously define the operations of the nodes. In the cases where that would be onerous (e.g. fractals) we'll probbaly use pseudo-code. It sounds like you might be asking to include the normative descriptions in the MaterialX spec as well? |
|
@anderslanglands Responses to your responses: Re: accepted values optional vs always: as long as "accepted values" are shown wherever they make an important difference, I'm okay with leaving "accepted values" empty if any value of the type for that input is acceptable, and removing that column if all ports for a node can accept any value. Re: indicating nodegraph vs native implementations: I agree this is generally an implementation detail, though I thought it would be useful to those implementing new targets to know which nodes they'd need to implement explicitly for the target and which "come for free" via a nodegraph implementation. But I'll defer to the community if this detail isn't worth the added clutter to the tables. Re: adding equations/pseudocode descriptions to the Spec: I think this would worthwhile in some instances where there could be confusion, but would just be added clutter in most cases. If the normative descriptions become part of (or are tightly linked to) the Spec, then no additional equations/pseudocode descriptions would be necessary. |
|
@dbsmythe - Firstly thanks for all the feedback - I know you're super busy with production. Regarding annotating the nodegraphs - I would pose that anyone who is implementing a new target would also be required to investigate the actual data library files themselves, and so would "hopefully" have the expertise to understand which nodegraph elements they could choose adopt "for free". I'll note that implementors are free to choose to reimplemented, existing nodegraphs themselves as well. The specification is complete enough to stand alone, without any dependence on the data library. |
Add definition of "ports" to MaterialX Specification in the "Nodes" section, per discussion in PR AcademySoftwareFoundation#2520 to align with AOUSD terminology
Add definition of "ports" to MaterialX Specification in the "Nodes" section, per discussion in PR #2520 to align with AOUSD terminology
This changelist contains an initial set of formatting proposals for the Standard Nodes specification, organized by the AOUSD Materials Working Group.