View Single Post
Old 31st January 2005, 06:39 AM   #2
Andy
Administrator
Professional user
 
Andy's Avatar
 
Join Date: Jun 2003
Posts: 4,564
Default

The flag on SURF indicate is a surface should be flat or smooth shaded:

Code:
SURF %d
The start of a surface.  The parameter specifies the surface type and flags.
The first 4 bits (flags & 0xF) is the type (0 = polygon, 1 = closedline,
2 = line).  The next four bits (flags >> 4) specify the shading and 
backface.  bit1 = shaded surface bit2 = twosided.
For rendering in AC3D, it calculates the vertex normals by averaging the attached surface normals (using the crease angle too). Any surfaces that are set to be 'smooth' will be drawn using the vertex normals; vertices of a 'flat' surface will get the surface normal.

Andy
Andy is offline   Reply With Quote