glTF comes to Local Mesh
It's been a couple of years since Local Mesh support was added to Firestorm, but with the move away from Collada (DAE) in both Blender and SL, it was time to give it an overhaul.
Grab the latest Firestorm preview, and you'll find that local mesh now supports glTF/glb file loading. I've updated the existing Collada-only support to make it easier to add other formats in the future if it makes sense.
OMG, but I use the "XYZ-tool" to create meshes and it doesn't support glTF
Don't panic, Collada support is not going away. Irrespective of the longer term plans of the Second Life platform (and for that matter of Blender) I am very aware that there are lots of tools that people use today that export/import Collada and I expect to keep legacy mesh import/export working for as long as it remains viable. I have rewritten (and hopefully improved) parts of the Collada local mesh support, but please let me know through the Firestorm JIRA if I've inadvertently broken anything.
New-feature - auto-reload.
The updated Local Mesh feature includes an auto-reload function. Ticking the "auto-reload" option will cause the viewer to scan all loaded Local Mesh assets (assigned or not). The scan period setting lets you adjust how often the viewer checks for changes. This defaults to 3 seconds at the moment, but I may tweak that later if it proves too short.
Reloading was discussed when Vaalith created the Local Mesh feature, but concerns about the potential to reload a "half-written" file or a bad mesh led us to choose not to include it. I've restructured how things are loaded so that if a load fails we can (hopefully) restore the last good version and carry on (I've had limited time to test that so far - feedback would be most welcome). That should deal with the case where the file is only partially written by Blender at the moment we try to reload, it does not deal with the possibility that the mesh itself is poorly formed, or unsuitable for SL so there's still potential to crash things, but I feel that the upside outwietghs the downside.
A bonus extra for Blender users
As an optional bonus for Blender users, I have two Blender add-ons/extensions to help with glTF exports.
Slender v0.2
Firstly, I have completely overhauled and updated my SLender addon to be Blender 4+ compatible.
For those that have never heard of it. SLender is an addon that I created many years ago (in the days when I had actual hours in a day to make things). It add SL specific services into Blender. SLender allows you to manage multiple LODs of a mesh, hiding the LODs that you are not working on, and providing some feedback on the likely Land impact and other SL specific data.
The overhaul has pretty much rewritten the addon so that it conforms to the latest Blender coding practices. I've changed the way that LODs are managed and, of course, made glTF the default export format (DAE is still there - if your version of Blender still has Collada support).
I realise that SLender imposes a workflow that I find useful but which will not appeal to everyone (perhaps anyone) else, which is why I chose to create the new stand-alone quick-exporter.
Blender-glTF-quick-export v0.1
Ignoring SL specifics, the most annoying thing I find when working with glTF (and DAE for that matter) is that exporting is a multi-step process with no key-bindings. So I'm providing a very simple "gltf-quick-export" extension that does pretty much what you'd expect, given the name.
You assign a file to export to, and with a single click, the selected objects or the entire scene are written out to that file. In a similar vein to the Local Mesh importer I have added auto-export and a timer. Be very careful here though as this was constantly write out your meshes and the chances of an overlapping write/read between Blender and the viewer is increased.
Both of these can be found free and open source on my github, the links here download the latest (at the time of writing). Once you've downlaoded then use preferences->addons->local Zip file to install them.
No comments:
Post a Comment