Using Ready Player Me Avatars in Second Life and OpenSim

This blog post is replaced by a later one here since developments have taken place in Ready Player me and the Bento Buddy plugin for Blender. This blog post provides resources and information for a route to take Ready Player Me avatars through Blender into Second Life and OpenSim to travel across the Hypergrid.

  • Tested in Blender 3.2.0 and 3.3.0
    Check the glTF Import/Export and FBX Import/Export Addins are enabled (they usually are by default or tick them in Edit -> Preferences -> Add-ons).
  • Tested in Bento Buddy – bentobuddy_v3_0_5_blender_2_8x_to_3x_fix1.zip (Paid Add-on)
  • Tested in Second Life Viewer 6.6.3 and Firestorm Viewer OS 6.6.3

Convert the Ready Player Me avatar from the native .glb format initially to .fbx for further processing in Mixamo using the instructions at
https://support.readyplayer.me/hc/en-us/articles/360020740897-How-do-I-use-a-GLB-model-in-Unity-. I.e.

  1. Create and download your avatar from https://readyplayer.me/
  2. Import your file into Blender – File/Import/gITF 2.0 (.glb/gltf)
  3. Go to Blender’s “Texture Paint” tab and select “View” in the top left of the Image Editor panel
  4. Select each texture from the drop-down at the top
  5. At the top left, click Image/Save As… (or Shift + Alt + S) and select your destination
  6. Export your model as an FBX – File/Export/FBX (.fbx)

The settings for “Add Leaf Bones” box and the “Bake Animation” box for FBX Export appear not to matter, so defaults are fine.

Unity – This FBX avatar and its textures can be inserted into a Unity project’s assets directly (for example). For Unity I suggest uploading the textures to a folder first, accepting any recommendation to “Fix” the normal map images. Then add the FBX model to ensure that the materials all are correctly setup with bumpiness normals.

But for Second Life and OpenSim the avatar should be set to the “T-Pose” before being exported to Collada (.dae). This can be done using Mixamo…

Upload the exported .fbx avatar into Mixamo and download again from Mixamo as .fbx with the T-Pose option set. Then Load the T-Pose .fbx back into Blender. Ensure that the “Animation” box is ticked to ensure the T-Pose is maintained (should be on by default).
https://www.youtube.com/watch?v=gTRb-SwmBZw
https://www.mixamo.com/

In Blender, use the Bento Buddy “Character Converter” tab to load the mixamo_no_prefix.bbm (28K) map (the readyplayerme.bbm map (2K) available up to 30-Sep-2022 did not include hand bones so the hands would not be animated. the readyplayerme.bbm (28K) available after 1-Oct-2022 is a copy of the mixamo_no_prefix.bbm (28K) map and should work). Then click “Convert”. Diagnostics during the conversion process are available in the Blender System Console. You can show this via Windows -> Toggle System Window.

Export Avatar to Collada and Import to Second Life or Openim

[May not be necessary: Set “Project full Rig” on in the Converted Mesh Export options.] Leave “Process Volume Bones” and “Rotate for SL” on. Use “Export Mesh for SL/OpenSim” to create the Collada .dae version.

Load the mesh into Second Life or OpenSim via Build -> Upload -> Mesh Model.
Set the Lowest Level of Detail to 0. Select Physics as “Lowest”.
Include skin weights and Include joint positions must both ticked. If you leave out Include joint positions, the avatar may look spindly.

You can attach the mesh to the avatar, e.g. attach to “Avatar Center”.

Change the Description field of the avatar mesh to include the licence information:
CC BY-NC 4.0 https://readyplayer.me

As with any mesh avatar in Second Life or OpenSim, you will need to add an “Alpha Mask” to make sure the underlying standard avatar does not show through the mesh. This should make all parts transparent (Lower, Upper, Head, Eye and Hair).

Texture the Avatar in Second Life or OpenSim

Texture and add bumpiness “normal” textures to the mesh inworld. You might want to experiment with whether to include the Metallic/Roughness/Shininess (PBR) where that is provided for a face.

To texture the teeth you may need to Disable the Camera Constraints (Preferences -> Advanced) to be able to swing the camera inside the mesh head to select that mesh part.

The hair colour is a simple coloured image. You can alternatively change the hair colour using the “Blank” texture and setting a colour.

Image Mapping to Avatar Mesh Faces

Ready Player Me Avatars will have a certain number of associated textures depending on the parts they have. A typical setup is shown below, though if parts such as hats, glasses and weapons are attached there could be more. They usually occur in the alphabetic order of the named part.

Blender version 3.3.* and later maintains useful names for the textures. Earlier versions such as 3.2.0 simply name the images as “Image_N”.

Avatars with 3 textures

Avatar .glb that are downloaded may have a single face with three textures that represent the texture (diffuse), normal map and metallic/shininess, or maybe have multiple faces for hair, face, skin, top and bottom. The single face format does not allow hiding of the hair, glasses, etc for in world customisation as described below.

BASE_COLOR_TEXTURE_OPAQUE.png
NORMAL_TEXTURE_OPAQUE.png
METALLIC_ROUGHNESS_TEXTURE_OPAQUE.png

Avatar Outfits with Top and Bottom (16 textures)

Image_0 is the eye texture
Image_1 is the body normal map
Image_2 (small coloured square) is the body texture

Glasses texture, normal map and metallic/roughness/shininess (PBR Materials) image could be included here if 19 textures

Image_3 is the hair normal map
Image_4 (medium coloured square) is the hair texture
Image_5 is the face texture
Image_6 is the outfit bottom normal map
Image_7 is the outfit bottom texture
Image_8 (yellow, pink, etc.) (bottom PBR Materials)
Image_9 is the outfit footwear normal map
Image_10 is the outfit footwear texture
Image_11 (red and orange?) (footwear PBR Materials)
Image_12 is the outfit top normal map
Image_13 is the outfit top texture
Image_14 (yellow and pink?) (top PBR Materials)
Image_15 is the teeth texture.

Avatar Outfits with Top Only (e.g. a Dress) (13 textures)

Image_0 is the eye texture
Image_1 is the body normal map
Image_2 (small coloured square) is the body texture
Image_3 is the hair normal map
Image_4 (medium coloured square) is the hair texture
Image_5 is the face texture
Image_6 is the outfit footwear normal map
Image_7 is the outfit footwear texture
Image_8 (red and orange?) (footwear hPBR Materials)
Image_9 is the outfit top normal map
Image_10 is the outfit top texture
Image_11 (yellow and pink?) (PBR Materials)
Image_12 is the teeth texture.

In-world Customisation

A number (but not all) the “Edit Shape” sliders work on Ready Player Me avatars to adjust the general shape.

Some parts such as the hair, accessories such as glasses, etc can be set to 100% transparent and the underlying avatar shows through (such as setting a bald head). This can allow some measure of in-world customisation. It also allows standard avatar attachments such as mesh and flexi hair to be added on without initially uploading a bald headed Ready Player Me avatar.

The head and body parts and textures cannot be altered. Facial hair, eyebrow details, make-up, etc are all baked onto the skin textures which have a unique mapping for Ready Player Me avatars. Hence tattoos and other elements that can be applied to skins in Second Life or OpenSim will not work.

The eye texture can be changed, even to a Bakes on Mesh (BoM) Eye (ensure you use an underlying avatar mask that allows the eye to show in that case). The normal eye texture iris image is slightly larger than the standard Ready Player Me one, so you may wish to adjust the image horizontal and vertical scale to (say) 1.1.

Hand Relax Background Pose

To “relax” the hands when not in a pose you could use the RuthAndRoth “bentohandrelax” script and “bentohandrelaxP1” animation. These are available in the Ruth2 v4 and Roth2 v2 distributions in Second Life and OpenSim or via the RuthAndRoth “Ruth2” GitHub repository. See, for example, https://blog.inf.ed.ac.uk/atate/2020/08/30/ruth2-v4/

Other Resources

Licence Details


Original Workflow via Mixamo

  1. Download Ready Player Me avatar .glb
  2. Start Blender and delete the default camera and light
  3. Import .glb to Blender
  4. Extract textures via Texture Paint tab
  5. Save the selected avatar as .fbx
  6. Upload the .fbx to Mixamo and download again as .fbx in T-Pose
  7. Import the T-Pose .fbx to Blender
  8. Under Bento Buddy Character Converter, load the mixamo_no_prefix map and click Convert
  9. Use Bento Buddy to export for Second Life/OpenSim (select all three options including Project Full Rig)
  10. Import to Second Life/OpenSim ticking “Include Skin Weights” and “Include Joint Positions”
  11. Attach the uploaded mesh avatar (e.g. to Avatar Center)
  12. Texture the mesh faces using the Diffuse texture and Normal Map (for bumpiness). The shininess/metallic textures don’t work well and could be omitted

Simplified Workflow via Ready Player Me Avatar using Multiple Faces and in T-Pose

  1. Obtain Ready Player Me avatar .glb URL
  2. Download avatar URL with ?textureAtlas=none&pose=T on the end
  3. Start Blender and delete the default camera and light
  4. Import .glb to Blender and check avatar is in T-Pose
  5. Extract textures via Texture Paint tab
  6. To fix the issue of the fingers being deformed in a relaxed pose, the steps in the bullets below should be undertaken BEFORE doing the character conversion. Missing out these steps will still give a reasonable avatar but leave the fingers deformed.
    • Add (temporarily) the Bento Buddy Rig Creation Safe Rig which have splayed fingers as expected in Second Life and OpenSim) to act as a comparison to the Ready Player me T-Pose which has the fingers straight.
    • Enter Blender Pose Mode. It is also useful to set skeleton to be in front in Viewport Display.
    • Rotate the avatar finger and thumb bones to closely match the reference rig. Its best not to scale or move them to avoid bad hand positions.
    • Select the avatar “Armature” and under Bento Buddy Rig Tools click the “Rebind associated mesh” button.
    • Check that the Pose and Rest Pose for the mesh are now identical (with splayed fingers).
    • Remove the temporary Bento Buddy reference safe rig.
  7. Under Bento Buddy Character Converter, load the mixamo_no_prefix map (Ready Player Me avatars have a Mixamo compatible skeleton) and click Convert
  8. Use Bento Buddy to export for Second Life/OpenSim (select all three options including Project Full Rig)
  9. Import to Second Life/OpenSim ticking both “Include Skin Weights” and “Include Joint Positions”
  10. Attach the uploaded mesh avatar (e.g. to Avatar Center)
  11. Texture the mesh faces using the Diffuse textures and Normal Maps (for bumpiness). The shininess/metallic textures don’t work well and may be omitted
  12. Optionally make some parts transparent (such as hair and glasses, hats, etc) to allow use of in world attachments for those parts
  13. Try the Avatar Shape sliders as many will work
  14. You could add a hand relax low priority pose into the mesh

Issues – Animations and Poses

Hand animations appear to work with these conversions, but facial animations do not. That needs more investigation as Ready Player Me avatars do have facial animation capability, but it is provided via “Blend Shapes” rather than avatar skeleton bones.

  1. The fingers on the avatar may appear a bit wonky unless you properly set the avatar into the T-Pose with fingers and thumbs splayed. See this comment.
  2. Facial animations do not work on the avatar in Second Life or OpenSim.

Ready Player Me Avatar API

Initial Release 28-Sep-2022.
https://docs.readyplayer.me/ready-player-me/avatar-api/

This entry was posted in OpenSim, Second Life, Virtual World and tagged , , , , . Bookmark the permalink.

12 Responses to Using Ready Player Me Avatars in Second Life and OpenSim

  1. bat says:

    Mal Burns covered this blog post in his “Inworld Review” podcast on 1th September 2022 (starts at t=200 secs)…

    https://youtu.be/koCCyZCPaWM?t=200
    https://twitter.com/metaworldnews

  2. bat says:

    If the avatar’s fingers look crooked after import to Second Life or OpenSim… Cotton Candy offered this advice on the Bento Buddy Discord channel on 19-Sep-2022…

    “The issue you have with your fingers comes from a difference in rotation in your rig’s fingers and the rotations SL expects, rotate your rig’s fingers, you should have the same rotations as the SL Safe Rig has.”

  3. bat says:

    YouTube video tutorial on the basics of rigging, weight painting and animating a mesh avatar by Remington Creative… https://www.youtube.com/watch?v=mhQY2_gVoVg

  4. bat says:

    https://nixart.wordpress.com/2013/03/28/modifying-the-rest-pose-in-blender/

    Modifying the Rest Pose in Blender – to change the rest pose after editing a pose, e.g. to improve the hand position:

    Select mesh (only) (e.g. Wolf3D_Avatar down triangle icon)
    Select the spanner icon for Modifiers
    Add a modifier of type “Armature”
    Move modifier to top of Modifiers stack (so it will be the first)
    Select the “Object” box and click on it to select a value for the field (Armature)
    If not you will get a message that the modifier is disabled at next step
    Click the Apply button (via down chevron)
    Go to Pose mode and select Pose as rest pose

    Note that when using Bento Buddy in Blender these steps are automatically performed for you when you click the “Rebind associated mesh” button under Rig Tools.

  5. bat says:

    There are other ways to get the Ready Player me avatar in T-Pose, but since it appears that its necessary to go via the FBX in and out as T-Pose procedure anyway, they are just noted here for interest.

    https://blog.inf.ed.ac.uk/atate/files/2022/09/RPM-Avatar-API-Download-Link.jpg
    Image: Ready Player Me – Obtain Avatar API URL

    You can download a Ready Player Me avatar set to T-Pose, rather than the default A-Pose. Use the Ready Player Me “Home” page when logged in and click the download icon and via that you can obtain the “Avatar API” URL. Copy that and add “?pose=T” on the end.

    Adjust the skeleton to the T-Pose directly in Blender (see https://download.blender.org/documentation/htmlI/ch16s05.html – Pose Mode Documentation) with the Bento Buddy add-on: Place the rig into T-Pose, and possibly adjust the fingers, then rebind using the “Rig Tools/Rebind associated mesh” feature. A video showing the process can be found here (https://www.youtube.com/watch?v=Ir1i6Xth94A – Bin Bash – YouTube Video – Bento Buddy – Remapping the Ready Player Me Characters for use in Second Life).

  6. bat says:

    Bin Bash YouTube Video – Bento Buddy – Mixamo to Second Life and Opensim
    https://www.youtube.com/watch?v=mBqoX7tv2PE

  7. bat says:

    To obtain any Avatar API download URL

    https://blog.inf.ed.ac.uk/atate/files/2022/09/RPM-Avatars-Image-Internet-Edge-Inspect.jpg
    Internet Edge Browser Developer Tool to Inspect Image

    The Avatar API easily available (as at 28-Sep-2022) is via the download icon on the “Home” page for your selected Main Identity. However, you can also obtain the code to use for any avatar in your avatar list without setting it to be the main identity using common browser developer tools. In a browser such as Internet Edge right click over the avatar image and select “Inspect” to open the browser Developer Tools. In the “elements” tab of the developer tools the HTML element will be highlighted. You can right click that and Copy -> Copy Element. Within that element is the Avatar API URL for the avatar image in a form such as https://api.readyplayer.me/v1/avatars/620fc83aec0af83e4383a9b1.png. The hex number in there is the Avatar API code to use for the Pose specific downloads of the avatar .glb.

  8. bat says:

    Useful Blender Viewing Options

    It may be useful to show the avatar armature in front of the mesh. This can be done via the small stick figure tool -> Viewport Display and tick “In Front”. A reference skeleton for Second Life can be added via Bento Buddy -> Rig Creation -> Add Safe Rig. This can be toggled on and off via the visibility (eye) icon in the scene collection hierarchy. This safe rig skeleton n can be helpful to compare the avatar being prepared and ensure it is a close match to the expected skeleton in Second Life or OpenSim.

    https://blog.inf.ed.ac.uk/atate/files/2022/09/Blender-Add-SL-Safe-Rig-and-Show-Rig-in-Front.jpg
    Blender – Show Armature in Front

  9. bat says:

    Bin Bash provided a new Bento Buddy tutorial video which shows a way to retain the splayed hand T-Pose when converting a Ready Player Me avatar… https://youtu.be/6fB9OSVeMis

    Also, the readyplayerme.bbm conversion map in the extended content for Bento Buddy from 30-Sep-2022 is identical to the mixamo_no_prefix.bbm map (28KB in size).

  10. bat says:

    Bin Bash offered this advice on the compatibility of in world animations:

    Any rig that was not made for the animations that you are using in-world will never work correctly. Any rig, that can be defined as being different than the one used when making the animation that you’re attempting to use, will fail in some way, sometimes imperceptibly so. However, almost NEVER does a rig match the one made for the animation you’re using, you just don’t see the difference until it’s dramatic enough.

  11. bat says:

    Bin Bash offered a video to explain how to set a pose (such as the finger splayed T-Pose used in OpenSim and Second Life) and create a “map” for it with Bento Buddy for reuse.

    https://youtu.be/6fB9OSVeMis

    You will have to make your own reference pose, adjusting the finger bones to be a closer orientation match to the default rig in SL, which is called the “Safe Rig” in Bento Buddy, which you can use as a reference. The Bento Buddy mappers (see via Bento Buddy “Template Creator/Editor”) can hold a pose. You make a reference pose on the first frame of the animation, set it with the associated tool in Bento Buddy and this will be the baked in rest pose when converting your character using the Character Converter. If you are not using an animation, and thus there will be nothing to hold the reference pose with, you can bake the pose in before conversion but this is probably not necessary, though to do that you’ll use the “Rebind Associated Mesh” in mesh tools, which is an alternative to creating a reference pose. Note that this “rebind” is destructive so make sure it’s correct and reload the file every time the pose is wrong in SL and start from a known good source.

    Just to be clear, the map/mapper/bbm/ccm are not responsible for fixing your material, and neither is Bento Buddy in general. You really have to do the work and understand what’s going on. There are plenty of videos on my channel that suggest the painstaking process of adjusting fingers for use with existing in-world animations.

    To save you some work in the future, and have a much easier time testing, do not convert the avatar that is in Blender until the last moment. Map the avatar as needed, if the supplied bbm does not work properly, and adjust the pose using that same rig, not the converted one. That way you can make adjustments on the original and never damage it, testing the export and going back for more adjustments. In the Character Converter tool you’ll see “Make Copy” which does just that, it will make a copy of your set and convert that one. The result will have all necessary mesh, and rig, selected and ready to export right there in that tool. After that just hit the delete key and you’re clean again.

    The splayed fingers do not represent a standard in the industry, this is a Second Life issue. It’s because we do not have the ability to upload a rig.

    Yes, the fingers must be splayed but only because you wish to use existing in-world animations and the bones need to be in the same orientation as the ones that were in the original rig when the animation was made, using that rig.

    The Bento Buddy “Safe Rig” is a floating point exact representation of the default rig in-world. I want to discourage you from attempting to use the Avastar rig as an example of what is right, it is not right, it is wrong.

Comments are closed.