Linden Lab is in the process of adding glTF 3D model support to Second Life, starting initially with PBR materials and moving on to full mesh and scene import. As part of this effort a test viewer is available that lets you locally load a glTF mesh or scene (multiple meshes). The contents are visible only to yourself and not saved. @davep (Runtai Linden) has stated that the eventual aim is to be able to import anything as it shows in the Khronos glTF Model Viewer or in Adobe Substance.
The tests following were carried out on Second Life Test 7.1.6.8639241871. Remember this is early days and it will be some time before this capability makes it way into normal use in Second Life (and possibly at some stage OpenSim).
glTF Mesh Loading Method
Though the method by which glTF meshes are loaded will change, for test purposes the following procedure should be used.
- Create a simple prim, such as a cube and scale it to 1.0m. The scale is used to set the scale of the mesh that will be imported. So 0.5m would be 50% scale. 1.0m would be 100% scale.
- Edit the cube to select it as the target to attach the glTF mesh.
- Use Develop -> Render Tests -> glTF Scene Preview to select a .gltf or .glb file containing your model.
- Rotate or move the object as necessary. Also scale as you wish. It seems that the root prim needs to be rotated X=90° to display imported models correctly.
- Make the root prim be 100% transparency to hide it.
- You can link other prims or mesh objects to the newly loaded mesh if you wish (e.g. to add scripted seats to a vehicle).
A short video by @davep (Runtai Linden) shows the process [Video (MPEG4) via Discord]
Potted Plants Meshes
Sketchfab – Optimized Potter Plants by by Nicholas-3D (@Nicholas01)
Suggested by @davep (Runtai Linden) as a free test mesh.
https://sketchfab.com/3d-models/optimized-potted-plants-967b4bf23fac4098993776fcfc2d3318
Ready Player Me glb Avatars
Ready Player Me (https://readyplayer.me) avatars are made available as .glb meshes, ready rigged (with Mixamo comparuble skeletons) and PBR materials. They appear to load fine in the test viewer. Of course the rigging is not operational at this stage.
This avatar is available in .glb format via
https://models.readyplayer.me/6619152aaaa958d48f2143ee.glb
Supercar Mesh
I tested with my usual Gerry Anderson’s Supercar detailed mesh (around 250K triangles) which in its .glTF or .glb format works fine in the Khronos glTF Model Viewer. In the Khronos glTF Model Validator it gives a warning that the texture images are not set at a power of 2 for each side.
- The textures initially did not load, but when converted to a power of 2 for each side they did load fine.
- Textures are not a power of 2 and do not load. A set of replacement textures that are Power of 2 are provided. These can be replace the textures created on glTF export from Blender.
- Each side has 9 yellow cooling vanes, some did not show in early tests.
- There is a chrome fuel filler cap on the rear fuselage top. Only the left side showed in early tests.
- The nose spike and ball are showing near the center of the model in early tests.
- Parts of the wing structure and its spike do no show in early tests.
- The rear fuselage aerial is out of position in early tests.
- The black seal at the front of the canopy is out of position in early tests.
- A large cylinder appears in the middle of the model in early tests.
- Many parts are grey. The canopy and loghts transparency is not retained. Most of the simple colouring and alpha applied to parts that do not have textures is not showing in early tests.
The Supercar model as it appears in the Khronos glTF Model Viewer is as follows:
The large cylinders that appear in the imported model appear to come from parts added late to the model, and which were created at the top level of the model parts list. They were then reparented to a relevant parent part. It could be that some sort of modifier application was not done in a uniform way. For the core Supercar model they were the end stops for the lower fuselage piping and the seven Hidem bands on the front seat. For some of the addon parts lie the rocket gun and magnetic grabs some parts also appear as large cylinders or large boxes. Applying all modifiers to some part (like the lower fuselage piping end stops) fixed some of these issues, but not all. Setting the part origins to the their geometry centre does not seem to be a fix.
Update 18-Apr-2024 – Second Life Test 7.1.6.8728758920 on Aditi Beta Grid Rumpus Room 2024
The update to Second Life Test 7.1.6.8728758920 has improved the preview loading of glTF meshes with most objects correctly rendering in position and scaled properly (just a few items that seem to not have “All Transforms” applied or parenting issues remain). But the main advances is that now all textures and colours are correctly applied.
Update: 19-Apr-2024 – Second Life Test 7.1.6.8757430447 – glTF Mesh Element Editing
Version Second Life Test 7.1.6.8757430447 starts to provide an ability to edit separate parts of a glTF model.. Movement of parts is possible, but not yet separate rotation or scaling.
Black Rock Lab Mesh and Mike Mercury Statue Meshes
The Black Rock Lab (BRL) glTF meshes exported from the Blender models for exterior and interior and the Mike Mercury Statue also import and preview reasonably well after applying all transforms to the parts. Textures are largely missing as they will not (yet) be power of 2.