Difference between revisions of "Reference:Smooth Triangle"
Jholsenback (talk | contribs) m (1 revision: Initial Load (TF)) |
Jholsenback (talk | contribs) m (1 revision: Reference Migration Initial Load) |
(No difference)
|
Latest revision as of 19:08, 15 March 2012
The smooth_triangle
primitive is used for just such purposes.
The smooth triangles use a formula called Phong normal interpolation to
calculate the surface normal for any point on the triangle based on normal
vectors which you define for the three corners. This makes the triangle
appear to be a smooth curved surface. A smooth triangle is defined by
SMOOTH_TRIANGLE: smooth_triangle { <Corner_1>, <Normal_1>, <Corner_2>, <Normal_2>, <Corner_3>, <Normal_3> [OBJECT_MODIFIER...] }
where the corners are defined as in regular triangles and
<Normal_n>
is a vector describing the direction of the
surface normal at each corner.
These normal vectors are prohibitively difficult to compute by hand. Therefore smooth triangles are almost always generated by utility programs. To achieve smooth results, any triangles which share a common vertex should have the same normal vector at that vertex. Generally the smoothed normal should be the average of all the actual normals of the triangles which share that point.
The mesh
object is a way to combine many triangle
and smooth_triangle
objects together in a very efficient way.
See Mesh for details.