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…

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 nearly 5 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. Firestorm 6.3.9 and later protects such early grids when users try to Hypergrid to them when wearing extended BoM capable wearables.

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

Firestorm viewer source is available at https://vcs.firestormviewer.org/phoenix-firestorm [ previously at https://hg.firestormviewer.org/phoenix-firestorm-lgpl/].

Firestorm Viewer – protection for older grids: Beq Janus commit r58280:865008ca5b01 10-Dec-2019 – FIRE-29204 BoM fallback safety measures to protect legacy OpenSim. Limits bakes sent to the server depending on detected BOM capability.

Extend Bakes on Mesh application to allow texturing of in world objects to allow for easier attachment creation:

A list of OpenSim related Firestorm JIRA issues is available at:

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.

3 Responses to Bakes on Mesh – Resources

  1. bat says:

    Second Life Maitreya Lara Mesh Body – Bakes on Mesh – Information and HUD to apply BoM to body as at Q4 2019….

    https://sl-maitreya.blogspot.com/2019/09/bakes-on-mesh.html

    https://marketplace.secondlife.com/p/Maitreya-Bakes-on-Mesh-Relay-HUD/17978540

  2. bat says:

    The Fire and Ice grid (https://fireandicegrid.net/) has test areas for BoM testing… see
    https://blog.fireandicegrid.net/index.php/2020/01/03/bakes-on-mesh-testing/

    To help our own testing (and anyone else who wishes to use it) we have set 4 clusters of testing sims. Each cluster has 4 regions, each of which is on a different version of OpenSimulator. …. hypergrid in… you can map TP using the URI: http://fireandicegrid.net:8002

    Once on the fire and ice grid, open up the map and put “Testing” into the search box. You will be presented with a list of 16 sims all of which end in two numbers. The first number relates to the size of the region. The second number relates to the version of OpenSimulator that region is running on.

  3. bat says:

    Virtual Bloke blog post on 3-Apr-2020 on Tutorial: Activating Bakes on Mesh on your mesh head and body… shows BoM activation on the various mesh body HUDs and provides a useful quick summary of the HUD design and GUI choices made by the various mesh body providers…

    http://www.virtualbloke.com/archives/3634

Comments are closed.