Bakes on Mesh is a feature to allow system avatar baked textures to be shown on mesh attachments.
If you use a standard system avatar, you can wear several texture layers to customize your skin and add tattoos and clothing layers. To save processing time and provide everyone on any system the same view of your appearance, those textures are "baked" by a server into a single combined texture. Previously if you wanted to use a custom mesh body part and do the same kind of customization, the body part would need its own texturing system. In addition, you would usually need to apply an "alpha" wearable to the underlying standard avatar body part to hide it so that it doesn't interfere with your mesh part. With bakes on mesh, you can apply any system skins and other layers to your avatar (you don't need or want the alpha layer), and then tell the viewer to apply the resulting baked texture to your mesh body part. The underlying system avatar part is hidden for you automatically so the alpha wearable is not required.
- Any face of a mesh object can be textured using any of the server baked textures.
- The corresponding region of the system avatar is hidden if any attached mesh is using a baked texture.
- New texture bake channels have been introduced to give more control over how meshes get textured.
- A new “universal wearable” is now provided with support for the new texture channels.
- Avoid the need for appliers, leading to an easier customization workflow.
- Avoid the need for onion avatars, leading to fewer meshes and fewer textures at display time.
- Avoid the need to sell full-perm meshes. The user can customize any mesh that’s set to use Bakes on Mesh by simply equipping the appropriate wearables, without needing to modify the mesh itself.
Avatar wearables have traditionally been baked into six different textures (BAKE_HEAD, BAKE_UPPER, BAKE_LOWER, BAKE_EYES, BAKE_SKIRT, BAKE_HAIR) by the baking service. These textures are derived by compositing the corresponding textures in the various wearable items on your avatar. For example, a shirt sets the UPPER texture, and multiple shirts layered together would contribute to the resulting BAKE_UPPER texture.
The Bakes on Mesh project added five new bake channels as well: LEFT_ARM_BAKED, LEFT_LEG_BAKED, AUX1_BAKED, AUX2_BAKED, AUX3_BAKED. Unlike the original textures, the system avatar does not use any of these textures. They are purely extensions to allow more control over mesh appearance.
- LEFT_ARM_BAKED and LEFT_LEG_BAKED are intended to help with making mesh avatars where the left and right limbs have different textures.
- The AUX channels are general purpose, and could be used for body regions not possessed by system avatars (such as wings) or for other purposes.
Altogether this gives 11 possible channels for wearables to use for textures, and for the baking service to produce.
New channels aren’t useful unless there is some way to wear items that use those channels To meet this need, a new wearable type called Universal has been added. The Universal wearable has slots corresponding to all 11 of the new and old bake channels. In layering order, universal wearables go between the tattoo and body layers.
You can now apply these textures to the diffuse textures of your avatar’s attachments:
- Right click on the attachment, and click edit and from the edit face menu select textures.
- Click the diffuse texture icon to open up the texture picker.
- The texture picker has an extra radio button mode called 'bake' for selecting server bakes. The 'bake' radio button mode has a dropdown for selecting server bake textures.
When an attachment is using a baked texture, the corresponding base mesh region of the system avatar is hidden.
If a mesh face is set to show a baked texture but is not attached to an avatar, you will see a default baked texture. If you are using an older viewer without Bakes on Mesh support, then faces set to show baked textures will also display as the default baked texture, and base mesh regions will not be hidden.
The “fallback” textures for the original bake channels. Viewers that don’t support Bakes on Mesh will show these images in place of the baked textures. You will also see these on any non-attachment objects that are set to use Bakes on Mesh. The new bake channels have similar fallback textures.
The new bake channels are handled a bit differently from the original six. With the original channels like upper body, there are several types of wearables that can affect the contents, and there is always a base layer of skin at the bottom of the texture stack. This means that unless you are using an alpha wearable, your bakes will always be opaque. For the new channels, the only textures are those supplied by any universal wearables you have on, so the resulting bakes can potentially be transparent. Note that this is currently the only way to make the new channels transparent, since there is no "Universal Alpha" wearable (we may add such a wearable in the future).
If you want a transparent bake in one of the new channels to be used to make your mesh partially transparent, you will need to set the alpha mode for that face to "Alpha Blending".
|For example, in this case there is one universal wearable with a transparent ring texture. The texture is applied to the upper body and left arm channels. The alpha mode is set to Alpha Blending. Results: The upper body and right arm are opaque, because there is an opaque skin layer at the bottom of everything. The left arm is transparent and the transparency is applied to making portions of the left arm see-through:|
|With the same outfit, but alpha mode set to None, you would see this. Note that now the left arm is opaque with a fallback color showing under the transparent regions:|
|If you add an additional universal wearable with a suitable opaque skin texture for the left arm channel, you would get this. Now both arms are opaque, regardless of whether alpha mode is set to None or to Alpha Blending:|
Animesh objects are treated somewhat differently when attached. Because they have their own skeletons, they are textured independently of the avatar they are attached to. An attached animesh object does not support Bakes on Mesh, and will display any Bakes on Mesh textures using the placeholder textures described above.
Bakes on Mesh works by defining special texture ids corresponding to each of the bake channels. There are corresponding LSL constants for each of the channels, so you can also write a script that enables Bakes on Mesh for a mesh face. The LSL constants are:
llSetLinkPrimitiveParamsFast(0, [PRIM_TEXTURE, 0, IMG_USE_BAKED_UPPER, <1.0, 1.0, 0.0>, ZERO_VECTOR, 0.0]);
would set the first face of a non-linked prim to use the upper body baked texture.
Here we will convert a system avatar into a simple mesh avatar that uses bakes on mesh:
|1. Log in using a Bakes on Mesh enabled viewer.|
|2. Enable the Develop menu. If not present, go to Me > Preferences, and in the Advanced tab click Show Develop Menu.|
|3. In the Develop menu, choose Develop > Avatar > Character Tests > Test Male. You will now see a standard system avatar.|
|4. You will need a mesh avatar to replace this system avatar. In a web browser, bring up https://jira.secondlife.com/browse/BUG-139234 and download the attached file "aditya_90.dae".|
|5. In the Second Life Viewer, choose Build > Upload > Model and choose the file "aditya_90.dae". In the upload options, check Include skin weight. Set the model name to "aditya_90".|
|6. Click calculate weights and fee, then upload. You should now have a mesh model in your inventory called "aditya_90". Attach this to yourself by double clicking it in your inventory.|
|7. At this point you have a mesh, shown with the white default texture, superimposed on your system avatar. Now we need to convert the mesh to use Bakes on Mesh. This will also hide the system avatar as we go.|
8. Right click your avatar and pick edit. In the edit dialog, pick “Select Face”. Click the avatar’s chest to select the upper body.
|9. In the Texture tab, click the white texture area.|
|10. Pick the “Bake” texture option and the “BAKED_UPPER” value in the pulldown. Then click OK.|
|11. Your avatar should now show the upper body correctly textured without excess white material. What you are seeing is the mesh surface textured with the upper body baked texture. The system avatar for the upper body is hidden.|
12. Now repeat the process for the other body regions.
|13. Getting all the faces selected and modified correctly is a bit tricky. If something gets messed up just try again with any face that gets messed up. At the end the avatar should look like this:|
|14. The hair looks wrong because it is an attachment that was not built for this mesh. You can get rid of it by right clicking and choosing Detach.|
|At this point, you have a mesh avatar that’s fully configured to use Bakes on Mesh. You can now customize it the same way you would with the system avatar. For example, take off an item of clothing:|
|Or customize something like eye color using the sliders:|
|If you want to return to the system avatar appearance, just detach the mesh:|
There is some example content to help creators who want to get started with Bakes on Mesh:
- https://jira.secondlife.com/browse/BUG-139234 attached file "Aditya_for_BOM.dae" is an uploadable model file with separate faces for the left arm and left foot, so it can be used with the new left arm and left leg channels.
- https://jira.secondlife.com/browse/BUG-139234 attached file "aditya_90.dae" is an uploadable model that has the original set of faces defined, corresponding to head, upper body, lower body and so on. Left limbs and right limbs will display using the same textures with this model.
The following known issues are present in the initial full release of Bakes on Mesh:
- BUG-225518 "The Bake texture on linked objects is shown with a delay of 5-7 seconds when linked objects are added from the ground". This is a lag in the update of appearance for a newly attached object using Bakes on Mesh textures.
- BUG-227532 "[BOM] some mesh objects render alphas incorrectly using BAKED_SKIRT when system skirt has a transparent texture in local edit modes". This is a transient graphics issue seen when in local edit mode, when customizing your avatar. Goes away when you leave local edit.
- BUG-227533 "[BoM] alpha layering errors in local edit mode". Some objects may show incorrect alpha masking behavior in local edit. Goes away when you leave local edit.
- BUG-227534 "[BoM] baked texture offset values on a sphere skew in local edit modes". Transient issues with texture offsets while in local edit, similar to issues seen in previous non-BOM releases. These issues resolve when you leave local edit.
- BUG-227535 "[BoM] Using the skirt channel in a universal wearable breaks the length of any existing system skirt". If your avatar has a system skirt (skirt wearable), and you are using a universal wearable with a skirt channel texture, then the length of the skirt will display incorrectly as maximum length. This is an issue with the baking service rather than the viewer itself.
- BUG-227537 "[BOM] When Alpha Wearable is applied, BoM attachments with Alpha mode: None turn red". If you make your avatar invisible using an alpha wearable, and then apply this invisible baked texture to an attachment using Bakes on Mesh, you get a solid color, red, shown on the attachment. Probably this should be the base color of the attachment instead.
- BUG-227536 "[BOM] Avatar does not cast accurate shadow if Alpha mode = Alpha blending". This is a pre-existing issue with alpha blended objects attached to avatars, but may be seen more often with Bakes on Mesh.
Edited by Jeremy Linden