View Full Version : MAXSCRIPT: read/write direction of a vertex/surface-normal?!?
Flinch 07-13-2002, 11:28 PM does anyone know if it's possible to get the normal of a vertex or polygon and give custom normals to a vertex or polygon?
--Flinch
|
|
Originally posted by Flinch
does anyone know if it's possible to get the normal of a vertex or polygon and give custom normals to a vertex or polygon?
--Flinch
You can read the normals but cannot effectively write them back - max will recalculate the normals when rendering, and your values will be lost immediately. Note that the vertex normals are recalculated based on the face normals and the smoothing groups of the faces using the vertex.
See
getNormal
setNormal
getFaceNormal
setFaceNormal
in the MXS Help.
AFAIK from the in 3ds max 5 Pre-Release info, you will be able to set the Normals of a PolyObject for viewport display (but not rendering) using a new EditNormals modifier. This could be useful for realtime 3D and game development.
Nahaz
07-15-2002, 01:51 AM
UVW to XYZ script by Chuggnut seems to alter the normals for rendering.
It flattens the XYZ object into it's UVW co-ords, but keeps the XYZ normals. So a flat surface renders as though it has bumps.
There's also "Normal Splayer", which appears to alter the normals, but i havn't managed to get hold of this.
Distorting normals is great for trees in games, helps reduce the flat look.
CGTalk Moderation
01-13-2006, 11:00 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.