How to display Hologram Texture Above a Prim

How creating a hologram image above a prim is a very easy thing to do and doesn’t require a timer event….

  1. Rez a prim
  2. Create an LSL script inside the prim
  3. Edit the script and past the following code
  4. Compile / Save the script
  5. Place a texture into the prim

The script will use the texture and display it above the prim as a hologram. Why use a hologram? A hologram texture above a prim will allow it to be seen by other avatars from any angle.

LSL is the Linden Labs SecondLife scripting language and can be used on Opensim grids, Osgrid and Kitely grids.

// OFFSET is distance above / below object generating Hologram
// Adjust this to suit
float OFFSET = 1;

// The width of the hologram :)
// If a square image you will have to set Width and Height same value
// because there is no method in LSL to get dimensions of an image
// to do automatically at this time

float Width = .55;
// The Height of the Hologram
float Height = 1.85;
/*
There are 2 ways to display the texture for the Hologram
1) Place the texture inside of the object
2) Obtain the UUID of the texture from you inventory
If choosing UUID method it can be seen only within your grid.
*/

// If you know the UUID and for this grid only
// string Texture = "69064cf6-155d-4a46-9c3a-c01f58639238";

// Replace TEXTURE NAME with the name of texture inside the prim
string Texture = "TEXTURE NAME";

DISPLAY_HOLOGRAM(){
integer Count;

// Will auto get name of 1st texture if in the object
// IF you didn't set the texture name from default
if (Texture == "TEXTURE NAME" ){
llSetText("",<1,1,1>,0);
Count = llGetInventoryNumber(INVENTORY_TEXTURE);
if(Count > 0) Texture = llGetInventoryName(INVENTORY_TEXTURE,0); else {
llSetText("No Texture inside me",<1,1,1>,1);
}
}
llParticleSystem([
PSYS_PART_FLAGS,PSYS_PART_INTERP_COLOR_MASK,
PSYS_SRC_PATTERN, 4,
PSYS_PART_START_ALPHA, 0.50,
PSYS_PART_END_ALPHA, 0.50,
PSYS_PART_START_COLOR, <1.0,1.0,1.0>,
PSYS_PART_END_COLOR, <1.0,1.0,1.0>,
PSYS_PART_START_SCALE, <Width ,Height,0.00>,
PSYS_PART_END_SCALE, <Width,Height,0.00>,
PSYS_PART_MAX_AGE, 1.20,
PSYS_SRC_MAX_AGE, 0.00,
PSYS_SRC_ACCEL, <0.0,0.0,0.0>,
PSYS_SRC_ANGLE_BEGIN, 0.00,
PSYS_SRC_ANGLE_END, 0.00,
PSYS_SRC_BURST_PART_COUNT, 4,
PSYS_SRC_BURST_RADIUS, OFFSET,
PSYS_SRC_BURST_RATE, 0.10,
PSYS_SRC_BURST_SPEED_MIN, 0.00,
PSYS_SRC_BURST_SPEED_MAX, 0.00,
PSYS_SRC_OMEGA, <0.00,0.00,0.00>,
PSYS_SRC_TEXTURE, Texture]);
}

default
{
changed(integer change){
// This will update hologram image when you
// add or remove an image
if(change & CHANGED_INVENTORY) DISPLAY_HOLOGRAM();
}
on_rez(integer i){
// When object rezzed it will display it
DISPLAY_HOLOGRAM();
}

state_entry()
{

// when you compile the script will display it
DISPLAY_HOLOGRAM();
}
}