ScriptSpot

Script

Average Normals

By zOffTy · 2010-08-14

Version
v2
Version requirement
3ds Max 9 - 2015
Date updated
2010-08-14
Votes
69
Download
Download
Description

Average Normals is a MAXScript that averages all the vertex normals for each selected faces, so they all point the same direction.

 

Additional Info

To use the script, you have to select all faces on which you want to flatten the normals and run the script V2 with a simplified version of my script with the code of Barigazy

Tags: flatten, Average, Normals, Edit Normals

Comments (10)

x_OL · 2018-03-12

Not work in max 2015
Simplified version too

max 2016

Luos_83 · 2016-05-01

Not sure if I am doing it right, but I select all polygons, apply the tool.
Nothing changes when looking at edit normals, everything stays exactly as it was.
(max 2016)

What might I do wrong?

nameveiof · 2016-03-30

My PC hangs when i use this script.
It's strange.

max x64 2014
amd phenom x6
win7 x64
16 gb ram

max 2011 x64

injez · 2011-03-12

script not works :(

barigazy · 2013-12-13

Simplified version. Select faces of object and run this code

if selection.count != 0 do
(
obj = selection[1]
_faces = if obj.modifiers.count == 0 then getFaceSelection obj else
(
if matchPattern obj.modifiers[1].name pattern:"*Mesh*" or \
matchPattern obj.modifiers[1].name pattern:"*Poly*" do getFaceSelection obj obj.modifiers[1]
)
if not _faces.isEmpty do
(
mody = EditNormals name:"AverageNormals" selectBy:3
addModifier obj mody
with redraw off for _f in _faces do
(
_normals = #{}
mody.ConvertFaceSelection #{_f} _normals
mody.Reset selection:_normals node:obj
mody.SetSelection _normals
mody.Average selection:_normals node:obj
)
) ; collapseStack obj
)

How to use?

nelu · 2011-02-17

Hi, could someone tell me how to use this script please?

Anubis · 2010-08-15

Sounds good, but (am sorry to say that)... its not working for me, nothing changed... is this happen only to me? (Max2009)

nm, I have no time right now to check out the code, I'll post my version too.

[EDIT] opss, I think I found the problem (in my usage). If I select all faces - I end with nothing. Nice script though, thanks! I uploaded my version here anyway.

Regards,
Anubis

kony · 2010-08-14

very nice
thanks zoffty

djboulette · 2010-08-14

The simple is the best!
Nice script, work well as described!
Good Work mate.