Difference between revisions of "Bakes on Mesh"

From Second Life Wiki
Jump to navigation Jump to search
Line 79: Line 79:
# You will need a mesh avatar to replace this system avatar. In a web browser, bring up [https://jira.secondlife.com/browse/BUG-139234 https://jira.secondlife.com/browse/BUG-139234] and download the attached file <code>'''aditya_90.dae'''</code>.
# You will need a mesh avatar to replace this system avatar. In a web browser, bring up [https://jira.secondlife.com/browse/BUG-139234 https://jira.secondlife.com/browse/BUG-139234] and download the attached file <code>'''aditya_90.dae'''</code>.
# In the Second Life viewer, go to build->upload->model and pick the aditya_90.dae file. In upload options, check include skin weight. Set the model name to aditya_90.
# In the Second Life viewer, go to build->upload->model and pick the aditya_90.dae file. In upload options, check include skin weight. Set the model name to aditya_90.
#* [[File:BOM_Upload_aditya_90.png|64px|none]]
#* [[File:BOM_Upload_aditya90.png|64px|none]]
# 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 inventory.
# 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 inventory.
#* [[File:BOM_Mesh_Superimposed.png|64px|none]]
#* [[File:BOM_Mesh_Superimposed.png|64px|none]]

Revision as of 16:45, 12 December 2018

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. Previously if you wanted to use a custom mesh body part and do the same kind of customization, it would need its own texturing system to allow that. In addition, you would usually need to apply an "alpha" texture to the underlying standard avatar body part to hide it so that it doesn't interfere with your custom 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.

Major Features

  • Any face of a mesh object can be textured using one of the server baked textures.
  • The corresponding region of the system avatar is hidden if any attached mesh is using a baked texture.
  • Additional texture bake channels have been introduced to give more control over how meshes get textures.
  • A new “universal wearable” is now supported to allow setting of 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.

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

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.

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.

BOM Fallback Head.png
BOM Fallback Upper.png
BOM Fallback Lower.png
BOM Fallback Eyes.png
BOM Fallback Skirt.png
BOM Fallback Hair.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 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.


A 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, pick Develop -> Avatar -> Character Tests -> Test Male. You will now see a standard system avatar.
    • BOM Standard System Avatar.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, go to build->upload->model and pick the aditya_90.dae file. In upload options, check include skin weight. Set the model name to aditya_90.
    • BOM Upload aditya90.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 inventory.
    • BOM Mesh Superimposed.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.
    • BOM Texture Tab.png
  10. Pick the “Bake” texture option and the “BAKED_UPPER” value in the pulldown. Then click OK.
    • BOM Baked Upper Texture.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:
    • BOM Hair Wrong.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.
    • BOM Hair Detached.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:

BOM Remove Clothing.png

Or customize something like eye color using the sliders:

BOM Eye Color.png

If you want to return to the system avatar appearance, just detach the mesh:

BOM Detach Mesh.png


To return to system avatar appearance:

BOM System Avatar Appearance.png