Bossa Studios Talks Lighting Challenges in Worlds Adrift and How it Has Overcome Them; New Video Released

Bossa Studios Talks Lighting Challenges in Worlds Adrift and How it Has Overcome Them; New Video Released

Today, developer/publisher Bossa Studios released a new video for its open world persistent sandbox game Worlds Adrift, which is scheduled to release via Early Access on PC sometime in Q1 2017.

In the video’s description, Bossa talks about how because of the design of Worlds Adrift, and the limitations of the Unity engine, lighting in the game has been “very challenging.”

Upon launch the game’s world will feature 1,000 plus islands — which will increase over time as player numbers increase — and each of these islands can be up to 1 kilometre in each axis. Therefore, traditional lightmapping would create data assets that would add far too many gigabytes to the client.

The game also has dynamic lighting, and a nonstatic world which have caused numerous lighting issues. And the fact that a lot of the game’s islands have some unpredictable use of assets, due to said islands being created by the community with the game’s free editor, hasn’t helped either.

So, what is the solution? Well according to Bossa Studios, the solution is something they refer to as “Faking Global Illumination.”

Here’s a rundown from the developer on what it did:

What we do is create a probe set automatically for each island using an algorithm that uses the terrain and objects to determine where to position probes. Bake ‘only’ ambient lighting into the probes (which makes them something like a visibility spherical harmonic multiplied by our ambient tri-light, rather than full lighting information).

Next, instead of baking traditional lightmaps we bake the indirect information interpolated from the probe set for every vertex of every asset into a custom texture. This creates some interesting looking textures that I would call visibility maps rather than lightmaps. Then at runtime we set the lightmap index and start position of each asset and use the Vertex_ID semantic inside shaders to determine the correct pixel of the lightmap per vertex. The majority of islands have 1 – 2 million vertices meaning the average islands lightmaps will be a few 1024×1024 textures at most. Really not much data at all. As for bake times, we are using a preview alpha build of Unities progressive light mapper for baking, and only baking probes with this version can bake 20,000 probes in under a minute.

As you are flying through the sky the ‘nearest’ island to you is centered around the origin of the scene and the probe and visibility maps for that island are loaded. (This means further away islands will not have any GI data, but that isn’t too much of an issue due to the relative distances between them)

Finally the spherical harmonics for the probes and a global shader variable that modulates the ambient intensity of the visibility maps are altered depending on the time of day every few seconds. This is probably quick enough to perform every frame but is unnecessary due to the speed of our in game time.

It’s not very often developers give such detailed and transparent insight into a game’s development, especially obstacles they faced. So, it’s nice to see Bossa Studios taking some time out of its development schedule to dish out some informational and interesting behind-the-curtain looks at the game.

You can see the game’s Fake Global Illumination in work via the video below: