You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Copy file name to clipboardExpand all lines: documents/Specification/MaterialX.NPRSpec.md
+33-13Lines changed: 33 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,35 +36,55 @@ This document describes a number of MaterialX nodes primarily applicable to non-
36
36
37
37
<aid="node-viewdirection"> </a>
38
38
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.
40
41
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.
|`space`|The space of the view direction vector|string |world |model, object, world|
47
+
|`out`|Output: view direction |vector3|||
42
48
43
49
44
50
45
51
## NPR Utility Nodes
46
52
47
53
<aid="node-facingratio"> </a>
48
54
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.
|`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 ||
50
67
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.
55
68
56
69
57
70
58
71
## NPR Shading Nodes
59
72
60
73
<aid="node-gooch-shade"> </a>
61
74
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.
0 commit comments