Difference between revisions of "Prims"

From Second Life Wiki
Jump to navigation Jump to search
(New page: Primitives in Second Life are constructed by starting with a basic two dimensional shape, modifying it, and extruding it in to the third dimension along a path while applying modifications...)
 
Line 1: Line 1:
==Introduction==
Primitives in Second Life are constructed by starting with a basic two dimensional shape, modifying it, and extruding it in to the third dimension along a path while applying modifications to the extrusion. The most basic example is a cube which starts out as a 2D square and extrudes along a linear path with no modifications to make a cube. A cylinder starts out as as circle and extrudes along the same linear path. If the circle was extruded along a circular path you would create a ring, and if a half-circle is extruded along another type of circular path you create a sphere.
Primitives in Second Life are constructed by starting with a basic two dimensional shape, modifying it, and extruding it in to the third dimension along a path while applying modifications to the extrusion. The most basic example is a cube which starts out as a 2D square and extrudes along a linear path with no modifications to make a cube. A cylinder starts out as as circle and extrudes along the same linear path. If the circle was extruded along a circular path you would create a ring, and if a half-circle is extruded along another type of circular path you create a sphere.


Line 4: Line 6:


* ProfileCurve
* ProfileCurve
** A bitflag, the smaller bits define the outer profile shape and the higher bits define the type of hole if ProfileHollow is non-zero
<pre>
Circle = 0x00
Square = 0x01
Isometric Triangle = 0x02
Equal Triangle = 0x03
Right Triangle = 0x04
Half Circle = 0x05
</pre>
<pre>
Same = 0x00
Circle = 0x10
Square = 0x20
Triangle = 0x30
</pre>


===2D Shape (Profile) Modifications===
===2D Shape (Profile) Modifications===


* ProfileBegin
* ProfileBegin
** Where the cut (if any) in the profile begins
* ProfileEnd
* ProfileEnd
** Where the cut (if any) in the profile ends
* ProfileHollow
* ProfileHollow
** How much of the profile is hollowed out, as a percent of the original bounding box. If non-zero this creates a hole using the shape defined in the higher bits of ProfileCurve


==Extrusion (Path)==
==Extrusion (Path)==


* PathCurve
* PathCurve
** The extrusion path. For whatever reason only the upper bits are used in this field
<pre>
Line = 0x10
Circle = 0x20
Circle2 = 0x30
Test = 0x40 // ???
Flexible = 0x80
</pre>


===Extrusion (Path) Modifications===
===Extrusion (Path) Modifications===

Revision as of 00:38, 1 July 2007

Introduction

Primitives in Second Life are constructed by starting with a basic two dimensional shape, modifying it, and extruding it in to the third dimension along a path while applying modifications to the extrusion. The most basic example is a cube which starts out as a 2D square and extrudes along a linear path with no modifications to make a cube. A cylinder starts out as as circle and extrudes along the same linear path. If the circle was extruded along a circular path you would create a ring, and if a half-circle is extruded along another type of circular path you create a sphere.

2D Shape (Profile)

  • ProfileCurve
    • A bitflag, the smaller bits define the outer profile shape and the higher bits define the type of hole if ProfileHollow is non-zero
Circle = 0x00
Square = 0x01
Isometric Triangle = 0x02
Equal Triangle = 0x03
Right Triangle = 0x04
Half Circle = 0x05
Same = 0x00
Circle = 0x10
Square = 0x20
Triangle = 0x30

2D Shape (Profile) Modifications

  • ProfileBegin
    • Where the cut (if any) in the profile begins
  • ProfileEnd
    • Where the cut (if any) in the profile ends
  • ProfileHollow
    • How much of the profile is hollowed out, as a percent of the original bounding box. If non-zero this creates a hole using the shape defined in the higher bits of ProfileCurve

Extrusion (Path)

  • PathCurve
    • The extrusion path. For whatever reason only the upper bits are used in this field
Line = 0x10
Circle = 0x20
Circle2 = 0x30
Test = 0x40 // ???
Flexible = 0x80

Extrusion (Path) Modifications

  • PathBegin
  • PathEnd
  • PathScaleX
  • PathScaleY
  • PathShearX
  • PathShearY
  • PathTwistBegin
  • PathTwist
  • PathRadiusOffset
  • PathTaperX
  • PathTaperY
  • PathRevolutions
  • PathSkew