Texture
A
texture is an image that can be applied ("texture-mapped") onto an
object's surface,
particle, or
avatar. Images saved in
JPEG,
TGA, and
BMP format may be uploaded to
Second Life as textures. These
formats are converted to a variant of the
JPEG2000 format (using the
Kakadu library) and sent to the Second Life
asset server when uploaded. There is a
$L10 fee for each upload.
Note: Uploading textures less than 8x8 pixels may give an
error: "KDU throwing an exception" for
BMPs/
TGAs and "LLImageJ2C uninitialized" for
JPGs.
Textures are indexed in the
user's inventory and can be used in a variety of ways in the viewer and editor modes of the
client and via
LSL. Dragging them onto a specific object
face will place a texture on that face. Shift-dragging a texture from the inventory to a
prim will apply it to all faces.
Because all uploaded images are decoded and converted to JPEG2000, it is inadvisable to convert textures into the JPEG format prior to uploading. JPEG is a lossy format and using it will potentially introduce unnecessary additional loss and distortion to the final uploaded texture. Uploading images in the TGA format is recommended.
A list of texture
UUIDs used in the Second Life client (such as the
ground textures) can be found
here.
Note:
llGetPrimitiveParams and
llSetPrimitiveParams are capable of performing every function described above with the exception of
llSetLinkAlpha,
llSetLinkColor, and
llSetTextureAnim.
Q: How do I determine which side of an object I apply a texture to?
A: See side.
Q: Can I set the texture of another prim in my linked object?
A: No. When it comes to other prims, you're limited to setting alpha (transparency) or color only. If you want to change the texture of another prim in your linkset, you'll need to actually give it its own script. Use llMessageLinked to coordinate them.
Q: Can I set the texture of an object that's not linked to the one containing my script?
A: No. You can link it, if it's within range, but that's it. You can't change its scale, texture, nothing.
Q: How do I get the dimensions/aspect ratio of a texture?
A: You can get it from the texture picker. When images are uploaded they are resized down to the closest power of two (x & y are rounded down individually; they can be different).
Functions |
Inventory