Skip to content

Commit c5166f6

Browse files
AOUSD formatting proposals for NPR Nodes (#2767)
This changelist contains an initial set of formatting proposals for the NPR Nodes specification, organized by the AOUSD Materials Working Group. The node signatures for the NPR Nodes have been aligned with the latest signatures for the Standard and PBR Nodes, and a few minor clarifications have been made to node descriptions.
1 parent 99cbc04 commit c5166f6

1 file changed

Lines changed: 33 additions & 13 deletions

File tree

documents/Specification/MaterialX.NPRSpec.md

Lines changed: 33 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -36,35 +36,55 @@ This document describes a number of MaterialX nodes primarily applicable to non-
3636

3737
<a id="node-viewdirection"> </a>
3838

39-
* **`viewdirection`**: the current scene view direction (e.g. from the viewing/camera position to the current shading position). If `viewdirection` is used in a PBR shading context, it should be noted that this would be the same as the incident ray direction for primary ("camera") rays but **not** for secondary/reflection rays. This node must be of type vector3.
39+
### `viewdirection`
40+
The current scene view direction, as defined by the shading environment.
4041

41-
* `space` (uniform string): the space in which to return the view vector direction, defaults to `world`.
42+
The view direction is a normalized vector from the viewer position to the current shading position. In a PBR shading context, it represents the incident direction for primary camera rays, independent of any secondary or reflection rays.
43+
44+
|Port |Description |Type |Default|Accepted Values |
45+
|-------|--------------------------------------|-------|-------|--------------------|
46+
|`space`|The space of the view direction vector|string |world |model, object, world|
47+
|`out` |Output: view direction |vector3| | |
4248

4349

4450

4551
## NPR Utility Nodes
4652

4753
<a id="node-facingratio"> </a>
4854

49-
* **`facingratio`**: returns the geometric facing ratio, computed as the dot product between the view direction and geometric normal. Output is a float between 0.0 and 1.0.
55+
### `facingratio`
56+
The geometric facing ratio of the view direction and surface normal.
57+
58+
Facing ratio is computed as the dot product between the view direction and surface normal.
59+
60+
|Port |Description |Type |Default |
61+
|---------------|--------------------------------------------------------------------------|-------|--------|
62+
|`viewdirection`|The input view direction vector |vector3|_Vworld_|
63+
|`normal` |The input surface normal vector |vector3|_Nworld_|
64+
|`faceforward` |Makes the output always positive, facing towards the view direction |boolean|true |
65+
|`invert` |Inverts the output values by multiplying them by -1 |boolean|false |
66+
|`out` |Output: the float representing the ratio between view direction and normal|float | |
5067

51-
* `viewdirection` (vector3): the viewing direction, defaults to the value of the "Vworld" (world space view direction) geometric property.
52-
* `normal` (vector3): the surface normal vector, defaults to the value of the "Nworld" (world space view direction) geometric property. This vector is expected to be prenormalized to length 1.0.
53-
* `faceforward` (boolean): description needed; default is false.
54-
* `invert` (boolean): description needed; default is false.
5568

5669

5770

5871
## NPR Shading Nodes
5972

6073
<a id="node-gooch-shade"> </a>
6174

62-
* **`gooch_shade`**: Computes the single-pass shading portion of the Gooch[^Gooch1998] lighting model. Output type `surfaceshader`.
63-
* `warm_color` (color3): the "warm" color for shading, defaults to (0.8, 0.8, 0.7) in the `lin_rec709` colorspace.
64-
* `cool_color` (color3): the "cool" color for shading, defaults to (0.3, 0.3, 0.8) in the `lin_rec709` colorspace.
65-
* `specular_intensity` (float): the intensity of the specular component. Defaults to 1.0.
66-
* `shininess` (float): the specular power typically ranging from 1 to 256, defaults to 64.
67-
* `light_direction` (vector3): the incoming predominant lighting direction in world space, defaults to (1.0, -0.5, -0.5).
75+
### `gooch_shade`
76+
Computes the color from single-pass shading portion of the Gooch[^Gooch1998] lighting model.
77+
78+
Gooch shade provides an illustrative shading effect by blending colors based on the angle between the surface normal and the light direction. It also provides a simple Phong specular highlight, on top of the warm and cool colors.
79+
80+
|Port |Description |Type |Default |
81+
|--------------------|---------------------------------------|-------|-------------|
82+
|`warm_color` |The color facing toward the light |color3 |0.8, 0.8, 0.7|
83+
|`cool_color` |The color facing away from the light |color3 |0.3, 0.3, 0.8|
84+
|`specular_intensity`|The intensity of the highlight |float |1 |
85+
|`shininess` |The size of the highlight |float |64 |
86+
|`light_direction` |The world-space direction of the light |vector3|1, -0.5, -0.5|
87+
|`out` |Output: the Gooch lighting model result|color3 | |
6888

6989
<br>
7090

0 commit comments

Comments
 (0)