In case you missed it amid last week's hoopla over Linden Lab's announcement that they are (finally) developing a native mobile for Second Life built on Unity, there already is a user-run project to bring Second Life to Unity.
It's called Crystal Frost, and it's still going full-guns.
pai
"It's not going to change," as lead dev Berry Bunny (Kallisti#2038 on Discord) tells me today. "Linden Lab is taking it in a different direction, and they're unlikely to use it for their desktop viewer. If anything it just means I won't have to worry about making a mobile version."
In other words, the era of Second Life on Unity is here.
Berry's original idea is to create a version of Second Life that's optimized to run in PCs and VR, and that remains the goal. Yes, Second Life in VR, with hands-on prim-based creation, a version of SL that can compete with VRChat.
"I'll have the 2D user interface pop up as a holographic display in front of you and can be pulled up with a customizable gesture," Berry explains. "If possible I will be tapping in to the puppetry system that Linden Lab is developing, and barring that I'll be using an LSL bridge to transmit IK targets for hand and full body tracking."
As for Linden Lab's SL on Unity/mobile project, Berry tells me from painful personal experience that they are going to hit some huge challenges:
"For starters," she explains, "the mobile version is most certainly not going to have the fancy graphics. It won't have water prims, interactive water, advanced rendering modes and shaders. People think their mobile devices are really powerful these days because they can play games with graphics levels that are comparable to what PCs were doing 20 years ago, but make no mistake, even the most advanced iPhone or Samsung Galaxy doesn't hold a candle to a PC's graphical capabilities."
Crystal Frost, I should say, is working in Second Life right now, albeit in a very Alpha form. But that's after much pain:
Above: Screenshot from Crystal Frost's latest version
"There are some very technical and major memory and performance problems related to using Unity for something that's 100% user generated dynamic content like this. CF is only just now starting to get these problems under control, and this is the second iteration of Crystal Frost, and the 5th attempt I've personally done at making a viewer in Unity. I could go into detail, but it'd just be a bunch of jargon most people won't understand." (But if you do understand that jargon, read below.)
While writing my book, I discussed a potential SL mobile viewer with Philip Rosedale, and he raised concerns over losing many features that makes Second Life unique, such as prim-based creation. Bunny doesn't agree there.
"Prims really aren't that hard to do, the main issue is just the settings. That said, Linden Lab has an uphill battle to fight for performance. There's a very good reason the vast majority of Unity projects have never gotten anywhere near as far as Crystal Frost has gotten."
Here's Crystal Frost's Patreon -- and the official Discord is here.
"Unity's internal classes, such as Texture2D and Mesh are not thread safe. So you can only build textures and meshes on the main thread. This in itself imposes an issue. Then there's the fact that code on the main thread does not run in dependently of the frame rate. What this means is that any time a texture or mesh is created, it can cause the viewer to stutter.
"In addition, building textures from downloaded bytes is extremely memory inefficient in Unity unless you're downloading them from a web server, and even then only TGA and PNG are supported.
"Most people upload textures as TGA and PNG, so many people might think, 'What's the problem? The textures are already TGA and PNG.' No, they're not. Second Life viewers convert all images to JPEG2000 before uploading them to the asset server, and the asset server rejects anything that isn't pre-converted to JPEG2000. Meanwhile JPEG2000 is not natively supported by Unity, which means that short of pulling some very advanced hacky and undocumented shenanigans, you are going to be eating many times more ram than should be necessary just to create the textures."
Crystal Frost pics courtesy Kallisti.
Or you can use addressables! I built our streaming engine for population one using them
Posted by: Greg | Wednesday, March 15, 2023 at 08:01 PM
Those problems are one of the big reasons using another engine gets to be a bit wonky. It really isn't as easy to do as some people seem to think ss it isn't a "pop in the assets" type of deal like it can be with some engine to engine deals.
Posted by: Jk | Thursday, March 16, 2023 at 06:08 AM
It seems to me that Unity's Addressables only really work with Unity's asset packs. That'd be great if building something from the ground up where you have full control over the architecture, but I'm afraid that Second Life's servers don't serve up Unity asset packs.
Posted by: Berry Bunny | Thursday, March 16, 2023 at 11:04 PM