Jump to content
  • Bakes on Mesh


     

    Bakes on Mesh is a feature to allow system avatar baked textures to be shown on mesh attachments.

    What is a baked texture and why would I want it on mesh?

    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.

    image.png

    Before Bakes on Mesh, the only option for custom mesh bodies and body parts to have multiple layers of textures on the same body was to use scripted texture application systems and multiple physical layers. This allows for some interesting effects, including being able to have an asymmetrical tattoo on one arm or leg and not the other.  

    However, there are some drawbacks to this 'onion skin' approach to texture layering. Having more unique layers and unique textures to display on a mesh object uses more system resources than a single textured mesh; there are also typically fewer layers available, making it difficult to stack customizations after the first few layers are occupied.

    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 "poke through" or interfere with your mesh body or body part.

    With bakes on mesh, you can apply system skins and other texture wearables to your avatar directly by simply clicking Wear or Add. The viewer then applies the resulting baked texture to your Bakes on Mesh-enabled mesh body part. The underlying system avatar part is hidden for you automatically so the alpha wearable is not required.

    You can use different texture wearables with greater flexibility, mixing and matching components to get just the appearance you want. Swap your eyeliner out with ease, add a set of dimples or a splash of freckles, or pop on that cool scar that gives your avatar that extra bit of flare. Any mesh body part that supports Bakes on Mesh will reflect your choices simply by wearing the texture wearable from your inventory.

    Major Features

    • 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.

    Benefits

    • 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.

    Creating content that supports Bakes on Mesh 

    Wearable and Bake Channels

    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.

    Universal Wearables & Asymmetrical Designs

    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 above the skin and tattoo wearables, and below all other types of clothing.

    Asymmetrical Designs

    The default Second Life UV layer uses a single area for the arm texture which is copied to both the left and right arm. Designers have requested the ability to create content for only one arm for quite some time, and the universal wearables object is designed to make this possible. 

    For example, if you wish to create a tattoo design which only appears on the left arm, you can create a design using the Upper Torso UV map as the basis for your texture. Add your design to the arm area, as usual, but instead of creating a New Tattoo object in the Inventory window, create a New Universal wearable instead. You'll see multiple channels (boxes) to use for your texture. Simply add your design texture to the Left Arm Tattoo channel and your content will be applied only to the left arm of the Baked on Mesh texture when worn. 

    Setting a mesh to use baked textures

    You can now apply these textures to the diffuse textures of your avatar’s attachments:

    1. Right click on the attachment, and click edit and from the edit face menu select textures.
    2. Click the diffuse texture icon to open up the texture picker.
    3. 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.

    image9.png image4.png image14.png
    image16.png image6.png image5.png

    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.

    Working with the new channels

    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: bom_transparent_universal_alpha_mode_blending.JPG.6b354ce21d0aa8c17d76f9edcb469cb1.JPG
    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: bom_transparent_universal_alpha_mode_none.JPG.1d90f83f8654be190e7faa172bea7956.JPG
    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: bom_transparent_universal_over_opaque_universal.JPG.026cd5cce638c292296ff828c9f68af0.JPG

    Working with Animesh

    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.

    Script Support

    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:

    • IMG_USE_BAKED_HEAD
    • IMG_USE_BAKED_UPPER
    • IMG_USE_BAKED_LOWER
    • IMG_USE_BAKED_EYES
    • IMG_USE_BAKED_SKIRT
    • IMG_USE_BAKED_HAIR
    • IMG_USE_BAKED_LEFTARM
    • IMG_USE_BAKED_LEFTLEG
    • IMG_USE_BAKED_AUX1
    • IMG_USE_BAKED_AUX2
    • IMG_USE_BAKED_AUX3

    These can be used in commands like llSetLinkTexture() or llSetLinkPrimitiveParamsFast() For example:

    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.

    Step-By-Step Example

    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.  image11.png
    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". image15.png
    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. image12.png
    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. image17.png
    10. Pick the “Bake” texture option and the “BAKED_UPPER” value in the pulldown. Then click OK. image10.png
    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.

    • Select face on the head area and set it to used BAKED_HEAD
    • Select face for each of the eyes and set them to use BAKED_EYES
    • Select face for the lower body and set it to use BAKED_LOWER
     
    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: image13.png
    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. image3.png
    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: image2.png
    Or customize something like eye color using the sliders: image7.png
    If you want to return to the system avatar appearance, just detach the mesh: image1.png

    Test Content

    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.

    Known Issues

    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-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.

     




    User Feedback


    There are no comments to display.


×
×
  • Create New...