Bakes on Mesh – Resources

This is a blog post to collect together resources related to the Bakes on Mesh [BoM] feature for Second Life and OpenSim. Bakes on Mesh facilities allow mesh avatars to be used with standard avatar skins, tattoos, alpha masks and tight to skin wearables which is useful for undergarments, etc. It can help avoid the need for “appliers” used to apply textures onto mesh avatars, and “onion skin” outer meshes to give layers for clothing.

11 bakes “channels” are available to apply to regions of an avatar mesh or attachments:

  • 6 basic bakes channels (HEAD, UPPER, LOWER, EYES, SKIRT, HAIR).
  • 5 added bakes channels (LEFTARM, LEFTLEG, AUX1, AUX2, AUX3).
  • A “Universal” wearable type to which all 11 bakes can be applied.

If a viewer is used which does not support BoM, fall back coloured textures are applied to the BoM faces.

Viewers for Bakes on Mesh

Viewers with support for Bakes on Mesh in Second Life and OpenSim are available…

  • Cool VL Viewer
  • Firestorm VR Mod
  • Singularity Viewer
  •  
  • The current Firestorm viewer compatible with OpenSim is version 6.0.2.56680 which does not support BoM. Hence users will see the fall back coloured textures when seeing avatars that do use BoM. Firestorm Viewer release 6.3.2.58052 supports Bakes on mesh in Second Life, but has not yet released a version for OpenSim due to concerns that direct logins to older OpenSim 0.8.*-based grids when using extended BoM facilities might cause issues.

If you use extended BoM features please don’t use these viewers to log DIRECTLY into grids/regions known to run on older 0.8.* server code (now 4 years out of date). Up to date OpenSim grids/regions will protect older grids by preventing Hypergrid teleports for users when wearing incompatible items and warning them to simplify their outfit.

Bakes on Mesh in Second Life

Bakes on Mesh has been in testing for some time by Linden Lab in Second Life, and the official Linden Lab viewer release 6.3.0.530115 dated August 26, 2019 as well as all Second Life regions supports this from that date. More detail in these articles…

The bakes textures can also be up to 1024×1024 in size (versus the previous avatar bakes texture limit of 512×512). The baking service is done server side in Second Life, versus the previous viewer side bakes support.

Bakes on Mesh in OpenSim

Bakes on Mesh (BoM) support for all 11 bakes textures and the new Universal wearable is available in OpenSimulator 0.9.1.0 released on 28th October 2019. The basic 6 bakes textures will work with all OpenSim versions.

Bakes in OpenSim are done using viewer side code and are a maximum of 512×512.

Bakes on Mesh Resources and Issues

https://jira.secondlife.com/browse/BUG-227553
https://jira.firestormviewer.org/browse/FIRE-24333

BAKES Texture Constant Names and Associated UUIDs

IMG_USE_BAKED_HEAD 5a9f4a74-30f2-821c-b88d-70499d3e7183
IMG_USE_BAKED_UPPER ae2de45c-d252-50b8-5c6e-19f39ce79317
IMG_USE_BAKED_LOWER 24daea5f-0539-cfcf-047f-fbc40b2786ba
IMG_USE_BAKED_EYES 52cc6bb6-2ee5-e632-d3ad-50197b1dcb8a
IMG_USE_BAKED_SKIRT 43529ce8-7faa-ad92-165a-bc4078371687
IMG_USE_BAKED_HAIR 09aac1fb-6bce-0bee-7d44-caac6dbb6c63
IMG_USE_BAKED_LEFTARM ff62763f-d60a-9855-890b-0c96f8f8cd98
IMG_USE_BAKED_LEFTLEG 8e915e25-31d1-cc95-ae08-d58a47488251
IMG_USE_BAKED_AUX1 9742065b-19b5-297c-858a-29711d539043
IMG_USE_BAKED_AUX2 03642e83-2bd1-4eb9-34b4-4c47ed586d2d
IMG_USE_BAKED_AUX3 edd51b77-fc10-ce7a-4b3d-011dfc349e4f

Bakes Fallback images for OpenSim have a solid colour 32×32 and are saved as JPEG2000 (.j2c) with “JPEG2000 Codestream Only” selected as save options (JPEG2000 J2C stream format). They also have “Lossless” (no compression) selected though that may not be important.

Scripts to Apply Bakes Textures to a Mesh

A mesh body can be edited and textured manually with “Bake” textures when worn and edited, or a script of the following form could be used to set up the faces. the face numbers can be inspected via the Build Tool -> Select Face.

Script below thanks to Ubit Umarov. The face numbers in this example are for the Aditya_for_BOM.dae Collada sample avatar mesh file provided by Linden Lab which can be found via the Bakes on Mesh Knowledge Base Article on the Linden Lab BUG-139234.

state_entry()
    {
        llSay(0, "Applying Bakes Textures to Mesh...");
        llSetTexture(IMG_USE_BAKED_HEAD,2);
        llSetTexture(IMG_USE_BAKED_UPPER,4);
        llSetTexture(IMG_USE_BAKED_LOWER,3);
        llSetTexture(IMG_USE_BAKED_EYES,0);
        llSetTexture(IMG_USE_BAKED_EYES,1);
    }

Ruth 2.0 and Roth 2.0 Mesh Bodies with BoM

Open source resources in action… OpenSim virtual world server, Firestorm Viewer (experimental build) and Ruth 2.0/Roth 2.0 low poly mesh avatars…


Ruth 2.0 RC#3 and Roth 2.0 RC#1 Mesh Bodies with BoM on OSGrid RuthAndRoth region using Dev Master code as at 28-Aug-2019.

Textures – Alpha Blending and Alpha Masking

When a mesh body (or head, hands and feet, etc) uses textures (Bakes on Mesh or otherwise) that are set to use “Alpha Blending” then any worn item or attachment that has partially transparent textures – such as for example the lace on the hem of a skirt (Hyacinth Greynmoon – Luv Brocade Dress for example) then the partially transparent bit makes the legs and hands that are behind it disappear completely. See left hand image below.

It is best to leave the body parts as “Alpha Blending” as that is common on mesh bodies and allows alpha layers to be worn and work with Bakes on Mesh. But, if you have modify permissions on the clothing or attachment, then if the render type on the worn attachment is set to “Alpha Masking” things works as expected. See right hand image below.

Unfortunately using Alpha Masking means that any worn alpha mask item does not work, whereas it does with Alpha Blending. Depending on what the user want to wear using one or other of the alpha rendering types might need changing.

For more advice on this see the Second Life Knowledge Base Article on Bakes on Mesh – Working with the new channels


A previous version of this blog post described early experimentation with Bakes on Mesh. For anyone interested, that version of the blog post is archived here.

This entry was posted in OpenSim, Virtual World and tagged , , . Bookmark the permalink.