Crystal Frost
Crystal Frost is the Firestorm viewer's code turned into a library. It runs a Second Life or OpenSim session the way Firestorm does, in Firestorm's own order and with Firestorm's own logic, and leaves the drawing to whatever renderer sits on top of it.
Crystal Frost is in development. The source is public on GitHub.
Why a library
Every Second Life viewer carries two jobs in one program: running the session (logging in, talking to the grid, keeping track of the world, inventory and chat) and drawing it. Firestorm does the first job very well, and it has years of fixes and features behind it. Crystal Frost keeps that work as it is and splits the drawing off, so a new renderer can be written on a modern engine without reimplementing the protocol, the viewer's behaviour or its features from scratch.
How it works
- The library is Firestorm's code, kept as close to upstream as possible so new Firestorm releases can be merged in. It logs in, talks to the grid, keeps the world, the avatars and the UI state, and runs on its own thread.
- The renderer is the host's. It reads what the library publishes (objects, avatars, the sky, the UI's draw lists and windows) and sends back input. It never has to wait on the library.
- The C# runtime package carries the parts of Firestorm's logic that run better beside a Unity renderer (the camera and animation at render rate, the UI layout), still under the same license.
What's inside
- A flat C API. Any language that can call a C library can drive it: C# through P/Invoke, C++, or an engine's own native plugin system.
- Firestorm's session code. Login (including two-factor authentication), the grid manager for Second Life and OpenSim, networking, regions and objects, avatars and animation, inventory, chat and IM, groups and RLVa.
- The viewer's UI logic. Every window's values are published under their Firestorm names, so a renderer can rebuild Firestorm's windows from its own layouts and leave the logic in the library.
- Shader ports. HLSL versions of Firestorm's sky, clouds, sun and moon, haze, lighting and particles, so the world looks the way its creators set it up.
- A lock-free design. The library runs on its own thread and hands data over without locks, so the renderer's frame rate never depends on network or library work.
Staying in step with Firestorm
The repository is a fork of Firestorm. Upstream files stay untouched and Crystal Frost's own code lives in its own folder, so new Firestorm releases merge in with few conflicts. Dependencies come from the same prebuilt packages the Firestorm viewer itself uses.
Building
Crystal Frost currently builds on Windows (64-bit) with Visual Studio 2022, CMake 3.21 or later and Python 3. See the repository's README for the steps.
Repository
libCrystalFrost
The library: Firestorm's viewer code (login and its secure store, the grid manager, networking, the world and objects, avatars and animation, inventory, chat and IM, RLVa, preferences, the UI logic) built as a native library with a C API. It also carries the C# runtime package for Unity and the HLSL ports of Firestorm's shaders (the WindLight/EEP sky, clouds, sun and moon, haze, lighting and particles). Renderers on other engines, such as Godot or Unreal, can use the library without either.
License
Crystal Frost is derived from Firestorm, which is licensed under the GNU Lesser General Public License, version 2.1, and Crystal Frost is under the same license. You may use, change and share it under that license; a program that uses the library must let its users replace the library with their own build of it.
Upstream
- Firestorm viewer (the Phoenix Firestorm Project)
- Second Life viewer (Linden Lab), which Firestorm is based on
Built on Crystal Frost
- Killer Frost, a Second Life and OpenSim viewer with a Unity HDRP renderer and ray tracing.