Weighted Normals 3DSMAX MaxScript Plugin


Note

I have removed my GitHub account following the aquisition by Microsoft, due to their unacceptable privacy practices, persistent and agressive consumer rights abuses, consistent and continued subversive interaction with the open-source community, and altogether poor human rights record.

This script (and future versions) will from now on be safely hosted here.


Quick Download

Latest version: wnormals100.ms (3.8 kb)

Introduction

This MaxScript generates Weighted Vertex Normals for any arbitrary geometry.

It should be compatible with 3DSMAX 9 and up. No dependecies on this script are added to scene files, so your scenes can be shared with users who don't have this script installed without issues.

'Weighting' of vertex normals means that each face normal contribution is scaled by a property of the triangle. This script uses the triangle surface area and corner angle as influences. The result of this is that a small triangle will have less influence on shading of its larger neighbor. Likewise, the neighbor will have larger influence on the shading of the smaller neighbor.

See this illustration:

This effect is typically most visible on chamfered boxes, but enhances all types of geometry. All geometry with proper weighted vertex normals is mathematically guaranteed to produce more aesthetically appealing shading than the default 3dsmax generated vertex normals.

An article with a detailed explanation can be found here.

Note

Using this script on the 3DSMAX teapot primitive will result in some artifacts, mainly at the bottom. This is not a problem with this script but a longstanding problem in 3dsmax. The 3dsmax teapot has degenerate triangles at the top and bottom poles, and thus needs some manual cleanup.


Usage

1) Run the script (menu MaxScript > Run Script).
2) Select one or more objects.
3) Click "Generate".
4) An Edit Normals modifier will be added to selection named "Weighted Normals".

To update the normals after changing the mesh geometry, select the object, and click "Generate".

If you have another Edit Normals modifier with manually tweaked normals on top of a "Weighted Normals" modifier, a new "Weighted Normals" modifier will be added at the top of the stack, to prevent overwriting your work. Only the topmost Edit Normals modifier can be accessed due to a 3DSMAX bug.