Quantcast
Channel: Second Life – Austin Tate's Blog
Viewing all articles
Browse latest Browse all 281

Bakes on Mesh – Early Days

$
0
0

Update: 28-Nov-2019: This is an archive of the original “Bakes on Mesh – Resources” post.. which has now been updated to reflect the up to date position. New post here.

Update: 28-Nov-2019: Viewers with support for Bakes on Mesh in Second Life and OpenSim have started to appear… Cool VL Viewer, the Singularity Viewer and Firestorm VR Mod. 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.

Update 28-Oct-2019: basic 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. However, a viewer capable of using the facilities is still under development.

This is a blog post to collect together resources related to the Bakes on Mesh [BoM] feature for Second Life and OpenSim. This has been in testing for some time by Linden Lab on 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. More detail in these articles…

https://community.secondlife.com/knowledgebase/english/bakes-on-mesh-r1512/
https://modemworld.me/2019/08/27/bakes-on-mesh-a-basic-primer/

Firestorm view code is currently under development to merge in the changes to support BoM and development versions of Firestorm 6.3.1 are being tested for this.

Bakes on Mesh facilities allow mesh avatars to be used with standard avatar skins, tattoos 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.

OpenSim and Bakes on Mesh

OpenSim dev master code as at OpenSim 0.9.1 1079 0e33014 (2019-08-28 04:54) can support some parts of BoM (thanks to Ubit Umarov) and using a test build of Firestorm 6.3.1 (thanks to the Firestorm team and Bill Blight for the test build – autobuild configure -c ReleaseFS_open – with map search patch and a couple of other tweaks):

  • The 6 basic bakes channels work for BoM (HEAD, UPPER, LOWER, EYES, SKIRT, HAIR) on all versions of OpenSim.
  • The 5 added bakes channels were not supported for BoM (LEFTARM, LEFTLEG, AUX1, AUX2, AUX3) until OpenSim 0.9.1.0.
  • The new “Universal” wearable type was not supported until OpenSim 0.9.1.0.
  • Bakes are done using viewer side code and are a maximum of 512×512.  

Ruth 2.0 and Roth 2.0 Mesh Bodies with BoM

Open source resources in action… OpenSim virtual world server, Firestorm Viewer 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.

Example Simple Mesh Body and BoM

The Aditya_for_BOM.dae Collada sample avatar mesh file provided by Linden Lab can be found via the Bakes on Mesh Knowledge Base Article at https://jira.secondlife.com/browse/BUG-139234. Note its a very simple mesh body and a lot of the usual avatar shape adjustment sliders will not work on it (e.g. it has very large feet that cannot be changed).

This can be edited and textured manually with “Bake” textures when worn and edited, or this script could be used to set up the faces of the sample Aditya_90 avatar for BoM… thanks to Ubit Umarov…

state_entry()
    {
        llSay(0, "Script running");
        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);
    }

Simple HUD to Show Bakes In Use

NOTE: A HUD that may have parts BoM textured when attached to a HUD position will locally make the relevant parts of the underlying classic avatar transparent in the view of the avatar that attached such a HUD, but that does NOT show to other users. Its probably a viewer bug to have this difference in behaviour?

For testing… but see note above… a simple HUD can attached set up to show all 11 BoM textures that can be applied to a worn attachment. As shown in the following image, when using a viewer that supports BoM (such as the forthcoming Firestorm 6.3.1, test build 57811 pictured) the “basic” bakes channels already supported by OpenSim dev master code at 28-Aug-2019 (head, upper, lower, eyes, skirt, hair) are instantiated (skirt and hair are transparent in this example) whereas the new bakes textures (leftarm, leftleg, aux1, aux2, aux3) are not.

If a viewer that is not updated to support Bakes on Mesh is used, a set of coloured “fallback” textures will be displayed. These same fallback back images are used on any object face that is BoM textured when it is displayed in world, rather than attached to an avatar.

As a comparison, the same setup in Second Life with a BoM capable viewer looks like this…when a BoM textured object is rezzed in world it shows the coloured “fallback” textures…

Bakes on Mesh Resources and Issues

OpenSim Source Code – Dev Master –
http://opensimulator.org/viewgit/?a=shortlog&p=opensim

Firestorm Viewer Source Code – http://hg.phoenixviewer.com/

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.

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.


Viewing all articles
Browse latest Browse all 281

Trending Articles