From Rezzer to Holodeck

Because both Second Life and OpenSim grids have prim limits, one of the things I taught myself to construct very early on in my inworld builds were rezzers; at their most basic a method of rezzing objects inworld from another object’s Content area (or in scripting terms the object’s inventory). They served various functions; in some cases to cause objects to rez only when people were in a certain area, at other times to give people options of different scenes, as in this fully functioning holodeck from the SLENZ Foundation Studies build (see the following YouTube video).

In most cases the rezzers were designed to lower the number of prims on a sim or parcel when the objects or scenes were not in use and at the same time give users more choices in an area than were permitted within the prim limits, albiet not all at once.

Holodeck scripts can be quite complex but their base rezzing functions are actually relatively simple. Throughout this and one or two subsequent posts I will guide you through some of the script variations that will allow you to construct your own rezzer and add different levels of complexity to build it up to a fully functioning holodeck.

In terms of rezzing an object from the Content area of another there are two choices as far as functions go; llRezObject and llRezAtRoot. To demonstrate the difference I have constructed a 4 prim, linked object called rezTest, with an orange prim set as the root prim. The centre of the object is a point between the orange and blue prims (as shown). This object is taken into Inventory.

Note: The object to be rezzed must have copy permissions to enable multiple rezzings. If the land the rezzer is on restricts building to the land group the rezzer must be set to group.

The two rezzing functions in LSL have the same parameters, as follows:

llRezObject(string inventory, vector position, vector velocity, rotation rot, integer param);

llRezAtRoot(string inventory, vector position, vector velocity, rotation rot, integer param);

The first, inventory, is the name of the stored object in the rezzing object’s inventory (or Content area). Next is position, the position in region coordinates where the object will be rezzed. Then velocity, the speed that the rezzed object is moving at when rezzed, rot, the rezzed object’s rotation and param, a value that can be returned in the rezzed object using the function llGetStartParameter.

Note: The position value has a limit of 10 metres from the rezzing object’s coordinates.

As mentioned the object rezTest must be stored in the rezzing object’s inventory. This is achieved by opening the Content tab of the rezzing object, opening Inventory, then clicking and dragging rezTest from there onto the Content area and releasing the mouse button. The object rezTest will display in the Content area as shown.

The first demonstrated script uses llRezObject as the rezzing function and touch_start to activate it, so that touching the box will rez the rezTest object. It uses llGetPos(), the position of the box, as the position that rezTest will be rezzed at and has zero velocity, zero rotation and the value 0 as the start parameter.


touch_start(integer total_number)
llRezObject(“rezTest“, llGetPos(), <0.0, 0.0, 0.0>, <0.0, 0.0, 0.0, 1.0>, 0);

The second script uses exactly the same parameter values except that the llRezAtRoot function is used instead.

llRezAtRoot(“rezTest“, llGetPos(), <0.0, 0.0, 0.0>, <0.0, 0.0, 0.0, 1.0>, 0);

The resulting rez positions are as shown below. Whereas llRezObject places the centre of the object at the position coordinates (i.e. at llGetPos(), the coordinates of the rezzer), with llRezAtRoot the centre of the root prim is placed at the position coordinates.

For myself the preferred function to use is llRezAtRoot as the coordinates of the root prim correspond to the coordinates of the actual object as shown in the Build window. This facilitates finding the required position parameters for objects that will later on be rezzed as a scene. llRezObject is more likely to be used in a shop system that rezzes samples of objects from a vendor for viewing before purchasing. In this case one would probably want the centre of the sample to be at the same position each time an object is displayed.

In the next post for this series I’ll start to add a little more complexity to this simple rezzing script. Till then enjoy!

Next in this Series: Rez Object Rotations


10 thoughts on “From Rezzer to Holodeck

  1. Hi Aaron. This is great. Keep ’em coming! Do you do in-world training on this and other (basic) builds, etc.?

    • Hi Frederick… thanks for the comment.

      Re in-world training if there were say a group from the VWWG or somesuch who wanted some basic build and/or scripting training I’d be happy to run a few sessions. Because I already lecture on the technical aspects of SL and OpenSim for NMIT’s paper on Multiuser Virtual Environments I do have some prepared materials at hand so really it would be a case of finding out who and about what and I’d be up for setting something in motion.

    • Dudley

      The script as shown works so I can only speculate at what may be occurring for you.

      If no “hand” icon appears when you hold your mouse pointer over the rezzing prim the script may not be running; check that Running is ticked in the script window.

      If there is a hand icon then check that the land you are on allows scripts to run (World/About Land/Options tab). If it only allows Run Scripts: Group, then make sure your rezzing prim is set to the group that owns the land (General tab of the Build window). If you don’t belong to the group or scripts aren’t allowed to run then you will need to test the script somewhere where you have permissions to run it.

      If this doesn’t solve your problem then I’ll be happy to meet inworld and help you out.


      • Thanks – that was the problem.
        But my object is rezzing in a different orientation than what I thought/built (90 degrees on its side).

      • Dudley

        When you take something into Inventory then rez it from there it retains the rotation it was taken with. With a rezzing script however the script sets the rotation and the rotation in the above example is set to zero. Setting up a rotation is discussed in this post.

        I will be covering the rotations with respect to the rezzing scripts in more depth in the next post in the series so look out for it. If you follow the blog (see sidebar) then you will be notified when it is posted.


  2. Pingback: Rez Object Rotations « F/Xual Education Services

  3. Pingback: Setting a Rezzed Object Timer « F/Xual Education Services

  4. Pingback: Assembling the Holodeck « F/Xual Education Services

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s