Create nodes and save them as a group:
- Right-click and choose Hw Shader Nodes
Math
Multiply, Hw Shader Nodes
Values
Color, and Hw Shader Nodes
Values
Float to create a MulOp, a Color and a Val node, respectively.
- Connect the nodes as follows:
- Connect the RGB attribute of the Color node to the first Value attribute of Multiply.
- Connect the Float attribute of the Float node to the second Value attribute of Multiply.
- Connect the Result attribute of Multiply to the Diffuse Color attribute of TraditionalGameSurfaceShader.
- Select the three newly created nodes, and then choose Group menu
Create Group to create a group.
- On the new Group node, click the
icon to enter group view.
- Click the group node at the left to select it, and on the Properties panel enter the following information:
- Class name: MyColorFunction
- Category name: MyNodes
- Sub menu name: Math
- Choose Group menu
Save Group To Disk.
- In the upper-left corner of the work area, click Exit Group to return to the full shader graph.
Now when you work in the shader tree, you can choose MyNodes Math
MyColorFunction to create a new instance of the custom group node.

Note: ShaderFX saves a group as a GRP file in the folder
/users/<username>/my documents/3dsmax/shaderfx/groupnodes/.