Lacuna Passage - Devlog #53 - Adjusting for Rendering Differences, Updating the Datapad, and Ludum Dare 33

Rendering Differences Between Color Modes

In our last few devlogs we have featured some updates to our art pipeline that have come with the transition to Unity 5's Standard Shader. In making this transition we have changed Unity's color mode from Gamma to Linear. This is a fairly technical aspect of rendering in a game engine, but I'll do my best to walk through our process (and problem solving). You can see the difference between the different color modes below.

Gamma Mode

Gamma Mode

Linear Mode

Linear Mode

You will notice that Linear color mode has much tighter highlights and generally makes metal materials look much more natural. The math behind it is all quite complex, but thankfully Unity takes care of it for us with a simple checkbox setting. We demonstrated how this new rendering mode looks a few weeks ago with our new Bridge environment assets.

Looks great, right? Well, unfortunately we were soon met with a few complications while trying to incorporate this new Linear color mode into our full project. Let's look at one specific example. Below you will see how this new color mode affected our fog blending with the skybox. (You can click to enlarge all images).

Our Mars time-of-day system was originally designed with Unity Gamma color mode. This is the exact start moment of "Dawn" in our old system where no color lerping (blending/gradation) is happening.

In this example we have switched to Linear color mode. You can see that the fog color is still blended properly with the background skybox, but that is to be expected since no lerping is happening at this moment.

Back in Gamma mode our time-of-day progresses from "Dawn" to "Midday" smoothing with a color lerp that is precise to match the blended skybox in the background. Looking good!

Now we can start to see the issue in Linear mode (you may need to click the image to enlarge it). The color lerp for the fog is no longer matched perfectly to the background skybox (notice the hard line at the horizon). Nothing else has changed from the previous screenshot other than the color mode. You can see problems with the sun shafts and lens flare as well; however, those are less of an issue because they can be tuned appropriately to compensate. The fog color lerp cannot be compensated. The start and end colors of the lerp are correct (see the Dawn example), but the colors in between are incorrect.

This simple problem caused us a huge headache. The beginning and ending points of our time-of-day transitions still matched the skybox perfectly, but every point in between was too dark and made our horizon line stick out like a sore thumb. So what was going on in Linear mode that was different from Gamma mode?

We had no idea. After scouring the web I came up empty handed. So I ended up resorting to posting for help on the /r/Unity3D subreddit. Lo and behold we were presented with a potential solution in less than an afternoon. And surprisingly, the solution came from real-world light physics and not from a Unity-specific error. As it turns out, Linear mode in Unity does not properly calculate the blending of two colors, but we can do that ourselves if we apply math! The video below led us to our final equation.

Mathf.Sqrt( Mathf.Pow(color1.r, 2) * (1.0f - t) + Mathf.Pow(color2.r, 2) * t )

This equation can be applied to our fog instead of using a Lerp. This transitions from color1 to color2 where t is the decimal percent of transition (just like t in a normal Lerp). We have to do this for each channel (r, g, b, and a) and use those values to build a new Color that reflects the proper values in Linear mode.

Now our fog blends perfectly with our skybox once again. There were a few other issues that we had to overcome in the transition to Linear mode, but we have finally gotten to a point where we are happy with the result. Due to the improvements with the Standard Shader in Linear mode, we think the game looks better than ever.

Updating the Datapad

We have also been working on updating the Datapad with the new Unity GUI features. Before we were using a plugin called NGUI, but this was becoming difficult to manage and we wanted to transition to using as many built-in Unity features as possible. One of the benefits of this new system is that it can automatically map the navigations between buttons.

You can see that we are making some general design changes to the Datapad as well, but we will have more details about that in a later devlog. Beyond that, we have made improvements to the shader for the Datapad screen so that colors appear more accurate to what you would see on an LCD screen. Before, the entire screen was illuminated equally, which led to blown out bright colors and washed out dark colors (shown below).

Old Datapad screen shader

Now we have a new shader for the screen that illuminates the brighter colors with more vibrancy while still preserving the dark colors.

New Datapad screen shader

Ludum Dare 33 - "The Monster Inside"

It was a pretty busy month, but our artist Spencer did manage to break away for a four day weekend vacation. So during that weekend I decided to participate in another Ludum Dare game jam without him. This time the theme was "You Are The Monster". The result was a collaboration with our composer, Clark Aboud, and a new contributing artist named Doug Auerbach.

We created a short audio-visual novella called "The Monster Inside". It is a text based game that explores a fantasy-infused film noir world. It covers some adult themes, so player-be-warned, but you can play it directly in your browser or download it from our Itch.io page below. Check it out and let us know what you think!

Thanks for following our devlog and we will be back soon with more art updates in a couple weeks!

Lacuna Passage - Devlog #52 - The Bridge Art Progress 3

The Bridge is complete and fully integrated with Unity 5. We have been working hard to update our assets to the new Unity standard shader, and we really think it has paid off. Our workflow is more streamlined than ever with the use of physically based rendering (PBR) and real-world material properties. We have always utilized the Quixel Suite to tweak our normal maps and create base textures, but only recently were we able to make use of Quixel’s built in PBR map generation thanks to this new shader in Unity 5.

We start by creating a base model and high poly for normal mapping. Then we transition to Quixel’s nDo for normal map tweaking. This allows us to make normal map changes within Photoshop using custom shapes and selections.

Once we have our normal map complete, we create a color map, or ID map, that separates the different material sections for our final textures. Quixel has a color swatch dedicated to each of their base materials, so we simply find the material we want using our own custom material previewer in Unity and apply the proper swatch to that area of the color map.

Next is where the magic happens. Quixel's dDo then takes all the information from our normal map and color map to generate base diffuse, specular, and gloss maps accurate to their real-world counterparts.

From there we simply tweak the maps to suit our needs and place the assets into Unity. The end result is a scene with physically accurate materials made to react with light as they would in the real world. Here is a comparison of the importance texturing and lighting brings to a scene:

But, just showing off screenshots doesn't fully capture the look and feel of walking through the Bridge, so this time we decided a video walkthrough would be appropriate. Here’s a quick look at the Bridge of Foundation Base:

If you're wondering what the Bridge will look like from the exterior, check out the last art devlog post here.

Lacuna Passage - Devlog #51 - Keeping up with the times (Unity 5 and Steam Early Access)

Since this is our first true non art-related development update since TIMEframe was released, I felt it fitting to reveal some pretty big news. Most immediately important is that we are updating Lacuna Passage to Unity 5. Some of you following us from the very beginning might remember that the original prototype of Lacuna Passage actually started in Unity 3. We moved to Unity 4 to take advantage of some of its new features, and we’re doing it again with the switch to Unity 5.

So how will the game benefit from the upgrade? If you are a developer, or just really interested in the nitty-gritty details, you can check out the full Unity change list here. Many of the updates made to the engine we will benefit from passively without any additional work on our part. These include things like multi-threading performance improvements, loading improvements, physics calculation improvements, a 64 bit editor (finally!), and much much more. We are already impressed with how well the game is running in Unity 5 and how quick it was to upgrade.

Making progress on our material previewer with Unity 5's new physically-based rendering

Making progress on our material previewer with Unity 5's new physically-based rendering

However, the most exciting change for us will be switching to Unity’s new physically based rendering model. Since the beginning of Lacuna Passage we have been utilizing our own shaders which were designed with Shader Forge. Now, with the introduction of the new Standard Shader in Unity 5 we will be able to simplify our art pipeline while also drastically improving the rendering quality of the final game. Before, where we were using custom shaders, it was very difficult to get our texture previews in our art applications to match the way that the textures would be displayed in-engine after being imported. This meant hours of tweaking, re-importing, and fiddling with settings until we were satisfied with the result. We were trying to manually approximate real-world materials like aluminum, steel, and plastic. But with the new physically based rendering system we can simply select real-world material presets as a starting point and see exactly how the textures will be rendered before we even import them into the game. It will take some time to adjust to the new art workflow using the new versions of industry standard applications like Quixel’s DDO, but we are confident that it will have a huge affect on our development efficiency and quality over the long haul.

That being said, the move to Unity 5 is not the only big development change that we are currently undergoing. Since our Kickstarter campaign we have kept a close eye on Steam’s new “Early Access” sales model. This option allows developers to sell access to games that are still in active development. We never really considered that Lacuna Passage would be a good fit for this option, since our plan for the game was heavily driven by a narrative experience. It’s difficult to sell people early access to a game with a story if the story isn’t fully implemented yet. We didn’t want people to run into half completed story lines, or story lines that might change completely before the game was finished. Over the last few months we have been watching other Early Access games like The Long Dark very closely, and we think we may be able to adopt their approach.

Taking inspiration from other sandbox survival games like The Long Dark

Taking inspiration from other sandbox survival games like The Long Dark

Now, before I explain further, I want to make it clear that this should not be cause for alarm. We would never consider Early Access purely as a way to squeeze money out of the game before it is finished. We simply feel that we have failed our backers in the sense that we have already far overshot our original release estimate, so we wanted to investigate any option we could that would allow people to play the game sooner rather than later. Our consideration of Early Access is a compromise. A way to let people see some parts of the game sooner while we finish all the features we originally promised.

So, what would an Early Access version of Lacuna Passage look like? The example I gave earlier of a game called The Long Dark is something we are looking to model after. The Long Dark is a post-apocalyptic survival game which will eventually have a story mode. In Early Access they are focused almost entirely on the root survival mechanics of the game and art development. We think that this could work well for Lacuna Passage. Our thought right now is that we will put all story development on hold in an attempt to put out a sandbox survival mode on Steam Early Access. We don’t have a date for when that will be, but the important thing is that you will get to play Lacuna Passage sooner and be part of an active community contributing to the development of the final game.

Players of The Long Dark will find familiar systems in a future Early Access version of Lacuna Passage

Players of The Long Dark will find familiar systems in a future Early Access version of Lacuna Passage

We may have originally underestimated the power of a purely survival-driven game mode. After playing games like The Long Dark we feel that a survival sandbox could stand on its own and enable us to make better design decisions for the final game based on the feedback that our backers and Early Access players will provide. Obviously there are still a lot of things we will need to work out before this happens, but we want to be completely transparent with all aspects of development. In the coming months we will outline our plans for what you can expect to see in an Early Access release. We want to hear your thoughts and suggestions as well. If this is something that our backers overwhelmingly disagree with then we will seriously reconsider, but we think it will be a win-win for everyone. Thanks for reading, and we will have more details soon.