Difference between revisions of "Primitive"

From Second Life Wiki
Jump to navigation Jump to search
m (add help header)
m (Minor design issues)
 
(32 intermediate revisions by 15 users not shown)
Line 3: Line 3:
|Avatar=
|Avatar=
|Object=
|Object=
|Land=
|LandSim=
|Community=
|Community=
|Viewer=
|Viewer=
Line 14: Line 14:
|Glossary=*
|Glossary=*
}}
}}
A '''Primitive''' or '''prim''' is a single part object. Multi-part objects will have multiple primitive parts ("prims").


In Second Life, virtual physical objects such as cars, houses, jewelry, and even less obvious things like hair are made out of one or more primitive parts called ''prims''.  Objects made from prims are usually created in-world using the built in object editing tool.  This tool is used for all sorts of 3D modeling in Second Life, playing the same role  as 3D Max, Maya, or Blender, but customized for the Second Life way of doing things.
{{Otheruses4‎|primitives|[[LSL]] related information|:Category:LSL Prim}}


A '''primitive''', or '''prim''', is a single-part [[object]]. Multi-part objects will have multiple parts ("prims").


Prims can be modified in various ways, such as size, twists, shearing, and cutting.  Also, images ([[textures]]) can be applied to each surface of a prim to change its appearance.
In [[Second Life]], virtual physical objects such as cars, houses, jewelry, and even less obvious things like [[hair]] and [[clothing]] are made out of one or more prims. Objects made from prims are usually created in-world using the built-in [[edit window|object editing tool]]. This tool is used for all sorts of 3D modeling in Second Life, playing the same role as 3D Max, Maya, or Blender, but customized for the Second Life way of doing things.
There are eight primitive types:
# box: all kinds of rectangular shapes
# cylinder: round tables, floors, long pipes
# prism: a box with one very small face
# sphere: can be used for ellipsoids of all shapes
# torus: most complex, can be modified in many exotic ways
# tube:  another form of hollow cylinder
# ring: another variant of torus
# sculpted: new as of 2007, used for highly variable organic shapes


Box, cylinder, prism and sphere can be made [[Flexible Objects|flexible]]. Flexible prims can not be physical and are automatically phantom.
Each prim is represented by a set of parameters, including shape/type, [[position]], [[scale]]/size, [[rotation]], [[cut]], [[hollow]], [[twist]], [[shear]], etc. These parameters are sent from a [[server]] to the [[viewer]] running on the [[resident]]'s desktop, where the local video card is used to render the visual appearance of everything. (Rendering on the server would probably create a much higher amount of network traffic.)


There are seven primitive material types:
The [[color]], [[texture]], [[bumpiness]], [[shininess]], and [[transparency]] of prims can also be adjusted, and images ([[textures]]) can be applied to each surface ([[face]]/side) of a prim to change its appearance. Box, cylinder, and prism prim shape types can also be made [[flexible]].
 
Prims can be linked together into [[link set]]s. They can also be attached to avatars, but this process is separate from (thought similar to) linking.
 
In the Viewer [[source code]], primitives are implemented in {{code|LLPrimitive}}, with vertex generation performed in {{code|LLVolume}} and rendering in {{code|LLVOVolume}}.
 
==Shape types==
There are eight primitive shape types ('''Building Block Type''' in the viewer's build tools).
 
===Box===
 
[[File:Prim-Box.jpg|50px|left]]
 
All kinds of rectangular shapes.
 
===Cylinder===
 
[[File:Prim-Cylinder.jpg|50px|left]]
 
Round tables, floors, long pipes.
 
===Prism===
 
[[File:Prim-Prism.jpg|50px|left]]
 
A box with one very small face if created with the object editing tool, otherwise a true, 5-sided solid if changed from another prim type.
 
=== Sphere ===
 
[[File:Prim-Sphere.jpg|50px|left]]
 
Can be used for ellipsoids of all shapes.
 
=== Torus ===
 
[[File:Prim-Torus.jpg|50px|left]]
 
Most complex among normal prims, can be modified in many exotic ways.
 
===Tube===
 
[[File:Prim-Tube.jpg|50px|left]]
 
Another form of hollow cylinder.
 
=== Ring ===
 
[[File:Prim-Ring.jpg|50px|left]]
 
Another variant of torus.
 
=== Sculpted ===
 
[[File:Prim-Sculpted.jpg|50px|left]]
 
[[Sculpt]]ed: new as of 2007, used for highly variable organic shapes.
 
==Properties==
 
==== Mass ====
 
The [[mass]] of a prim is a function of its volume, different prim shapes have different volumes thus different masses.
* [[Mass Lab]] demonstrates how different shapes have different masses.
 
==== Survival ====
 
The survival of properties depends upon the type of the property and what happens to the object.
 
{| {{Prettytable}}
|+ '''Property survival'''
|- {{Hl2}}
! Property
! Script Set Not Running
! Script Removal
! Take unscripted and re-rez
! Shift-drag-copy
|-
|| [[llSitTarget|Sit Target]] || Yes || Yes || Yes || ?
|-
|| [[llParticleSystem|Particles]] || Yes || Yes || Yes || ?
|-
|| [[llSetText|Floating Text]] || Yes || Yes || Yes || No
|-
|| [[llTargetOmega|Spin]] || Yes || No || ? || ?
|-
|| [[llCollisionSound|Collision Sound]] || Yes || Yes || ? || ?
|-
|| [[llLoopSound|Looped Sound]] || Yes || Yes || Yes || No
|-
|| [[llSetRemoteScriptAccessPin|Remote Script Access Pin]] || Yes || Yes || ? || ?
|-
|| [[PRIM_POINT_LIGHT|Light]] || Yes || Yes || Yes || Yes
|-
|| {{LSLGC|Status}} || Yes || Yes || Yes || Yes
|-
|| [[llSetBuoyancy|Buoyancy]]
|| ? || No || No || ?
|-
|| [[llSetTextureAnim|Texture Animation]]
|| Yes || Yes || Yes || No
|}
 
It should be noted that when a script (in an object) moves from one simulator into another while being set as "Not Running" (either by [[llSetScriptState]] or via the checkbox in the script editor) the script's state will be lost. See {{Jira|SVC-1853}} for details.
 
* {{Jira|SVC-3925}}
* {{Jira|VWR-640}}
* {{Jira|SVC-1242}}
 
==Materials==
There are seven primitive [[material]] types that determine things like friction and default [[llCollisionSound|collision sound]]:
# stone
# stone
# metal
# metal
Line 41: Line 141:
# rubber
# rubber


The color, texture, bumpiness, shininess, and transparency of prims can also be adjusted.
==Physics==
 
Each prim shape has an automatic physics shape, which is shown in the [[Primitive_Physics]] illustration.  The physics shape is the shape that the object makes for an avatar or pathfinding object interacting with it.  By the use of twisting and cutting, a simple prim may become quite a complex shape.
 
To remove the physics shape of an object use [[Physics Optimization]]; use of phantom makes an object shapeless to avatars but does not remove its physics shape.
 
==Help==
* [[Basic Prim Creation and Editing]]
 
==Scripting==
* [[:Category:LSL_Prim]]
 
==Video tutorials==
* [[Video Tutorial/What is a prim?]]
* [[Video Tutorial/Prim and mesh hair differences]]


===See also===
===See also===
* [[Invisiprim]]
* [[Mega Prim]]
* [[Object]]
* [[Prims]]
* [[Prims]]
* [[Sculpted Prims]]
* [[Prim and Object Hierarchy]]
* [[Sculpted Prims: FAQ]]
* [[Prim flicker]]
* {{LSLGC|Prim}} & {{LSLGC|Object}}
* [[Primfficiency]]
* [[Sculpted prim]]
 
==External links==
* {{Wikipedia|Geometric primitive|Wikipedia: Geometric primitive}}
 
[[Category:Assets]]

Latest revision as of 09:38, 4 September 2023

This article is about primitives. For LSL related information, see Category:LSL Prim.

A primitive, or prim, is a single-part object. Multi-part objects will have multiple parts ("prims").

In Second Life, virtual physical objects such as cars, houses, jewelry, and even less obvious things like hair and clothing are made out of one or more prims. Objects made from prims are usually created in-world using the built-in object editing tool. This tool is used for all sorts of 3D modeling in Second Life, playing the same role as 3D Max, Maya, or Blender, but customized for the Second Life way of doing things.

Each prim is represented by a set of parameters, including shape/type, position, scale/size, rotation, cut, hollow, twist, shear, etc. These parameters are sent from a server to the viewer running on the resident's desktop, where the local video card is used to render the visual appearance of everything. (Rendering on the server would probably create a much higher amount of network traffic.)

The color, texture, bumpiness, shininess, and transparency of prims can also be adjusted, and images (textures) can be applied to each surface (face/side) of a prim to change its appearance. Box, cylinder, and prism prim shape types can also be made flexible.

Prims can be linked together into link sets. They can also be attached to avatars, but this process is separate from (thought similar to) linking.

In the Viewer source code, primitives are implemented in LLPrimitive, with vertex generation performed in LLVolume and rendering in LLVOVolume.

Shape types

There are eight primitive shape types (Building Block Type in the viewer's build tools).

Box

Prim-Box.jpg

All kinds of rectangular shapes.

Cylinder

Prim-Cylinder.jpg

Round tables, floors, long pipes.

Prism

Prim-Prism.jpg

A box with one very small face if created with the object editing tool, otherwise a true, 5-sided solid if changed from another prim type.

Sphere

Prim-Sphere.jpg

Can be used for ellipsoids of all shapes.

Torus

Prim-Torus.jpg

Most complex among normal prims, can be modified in many exotic ways.

Tube

Prim-Tube.jpg

Another form of hollow cylinder.

Ring

Prim-Ring.jpg

Another variant of torus.

Sculpted

Prim-Sculpted.jpg

Sculpted: new as of 2007, used for highly variable organic shapes.

Properties

Mass

The mass of a prim is a function of its volume, different prim shapes have different volumes thus different masses.

  • Mass Lab demonstrates how different shapes have different masses.

Survival

The survival of properties depends upon the type of the property and what happens to the object.

Property survival
Property Script Set Not Running Script Removal Take unscripted and re-rez Shift-drag-copy
Sit Target Yes Yes Yes ?
Particles Yes Yes Yes ?
Floating Text Yes Yes Yes No
Spin Yes No ? ?
Collision Sound Yes Yes ? ?
Looped Sound Yes Yes Yes No
Remote Script Access Pin Yes Yes ? ?
Light Yes Yes Yes Yes
Status Yes Yes Yes Yes
Buoyancy ? No No ?
Texture Animation Yes Yes Yes No

It should be noted that when a script (in an object) moves from one simulator into another while being set as "Not Running" (either by llSetScriptState or via the checkbox in the script editor) the script's state will be lost. See SVC-1853 for details.

Materials

There are seven primitive material types that determine things like friction and default collision sound:

  1. stone
  2. metal
  3. glass
  4. wood
  5. flesh
  6. plastic
  7. rubber

Physics

Each prim shape has an automatic physics shape, which is shown in the Primitive_Physics illustration. The physics shape is the shape that the object makes for an avatar or pathfinding object interacting with it. By the use of twisting and cutting, a simple prim may become quite a complex shape.

To remove the physics shape of an object use Physics Optimization; use of phantom makes an object shapeless to avatars but does not remove its physics shape.

Help

Scripting

Video tutorials

See also

External links