Category:LSL Face

From Second Life Wiki
Revision as of 16:10, 28 February 2007 by BamBam Sachertorte (talk | contribs) (initial version, still more to do)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

A prim has one or more faces depending on its basic shape and its shape parameters. Each face of a prim can have its own texture properties, color, alpha, and attributes (shiny, full-bright, and bump-map). The texture properties that each face can have are: texture, texture map (standard or planar), scale, offset, and rotation. The properties of a prim face can be changed individually by using its face number or all of the prim faces can be modified at once using the ALL_SIDES face number.

Prims are formed by moving a circle, triangle, or square through a path in 3D space. For boxes, prisms, and cylinders the path is a line. For tori, rings, and tubed the path is a circle. For a sphere the path is rotation around a point. A circle defines one face along its path, a triangle defines three faces along its path, and a square defines four faces along its path.

Using the Face List Table

The following table lists all of the possible faces for the seven different prim types. A given prim will have some subset of this list depending on the shape parameters. The face number of a prim face is determined by its position in the face list after non-existent faces have been removed. The first face in the list that exists will be face zero, the next existing face will be face one, and so on. The following rules determine whether a face exists and has a face number:

  • The outside face always exists on circle derived prims (sphere, cylinder, and torus).
  • The path cut faces exist if path cut begin > 0 or path cut end < 1
  • The path cut faces exist on ring path prims (torus, ring, and tube) if the ring path is broken: path cut, skewed, begin twist ≠ end twist mod 360, radius delta, revolutions > 1, tapered.
  • The sphere dimple begin face exists only if dimple begin > 0
  • The sphere dimple end face exists only if dimple end > 1
  • The hollow face only exists if hollow > 0
  • The profile cut faces exist if profile cut begin > 0 or profile cut end < 1
  • If the path cut of a prism or box completely eliminates a face then that face doesn't exist
  • If the profile cut of a ring or tube completely eliminates a face then that face doesn't exist
  • A face 'still exists' even if it is shrunk all the way to a line or a point by taper x or taper y
Sphere
  • path cut end
  • outside
  • hollow
  • path cut begin
  • dimple begin
  • dimple end
Cylinder
  • top (+z)
  • outside
  • hollow
  • bottom (-z)
  • path cut begin
  • path cut end
Torus
  • path cut end
  • outside
  • hollow
  • path cut begin
  • profile cut begin
  • profile cut end
Prism
  • top (+z)
  • +y
  • -x
  • -y
  • hollow
  • bottom (-z)
  • path cut begin
  • path cut end
Ring
  • path cut end
  • inside face
  • +x
  • outside face
  • hollow
  • path cut begin
  • profile cut begin
  • profile cut end
Box
  • top (+z)
  • -y
  • +x
  • +y
  • -x
  • hollow
  • bottom (-z)
  • path cut begin
  • path cut end
Tube
  • path cut end
  • outside face
  • -x
  • inside face
  • +x
  • hollow
  • path cut begin
  • profile cut begin
  • profile cut end