informa
7 min read
article

Updating Failure's Graphics

This blog post is taken from our Weekly posts found over at www,dreamharvest.co.uk - this week Sven explains the process that he went through to update the graphics for our game, Failure as we shifted from Cross platform development to PC/Mac/Linux dev.

Hi everyone,

Last week I talked a bit about our vision for the Audio for Failure, the experience that we’re trying to create with our game from an auditory perspective. This week we’re going to be talking about visuals, specifically how the visuals have changed and how Sven managed to accomplish this. When we first started this project we were planning a cross platform release targeted at PC/Mac/Linux/iOS/Android. As time has gone on we’ve realised that by concentrating on such a wide variety of platforms the PC/Mac/Linux versions of the game would suffer. For this reason we are now focusing development purely towards these core platforms.This is Sven’s journey as he takes the original look of the game up to a whole new level:

Until now we used a completely custom shaders and lighting (unity didn’t even know about our lights). With the decision of not caring about mobile at all it makes sense for us to drop that and switch to deferred rendering and make use of the PBR that was introduced with Unity 5.

In case you’ve no idea what I’ve just talked about I recommend you to take a look at Unity 5 – Lighting and Rendering (talk about good timing, this was released after I’d started writing this).

This is a log of the changes I’m doing. I’ll write this while I work on the changes and post it when it’s done. I was considering to actually update it live, but as some possible changes could take some time I don’t think it would be very interesting.

This is NOT a tutorial, how-to or anything like that. It’s just what I’ve done in the order I’ve done it, without much of an explanation as most of it is pretty basic stuff or would require too much explaining of how we have done stuff in the past. If you’ve any questions about something, feel free to ask them.

When you see text in italic it’s something I’ve added afterwards.

The goals

  • switch to a deferred rendering.
  • use HDR rendering.
  • possibly replace our current glow with a bloom effect.
  • improve some models textures.
  • add a lot of lights everywhere.
  • get rid of out custom lighting system and shaders to simplify everything.
  • get rid of the ‘fake’ shadows on the units.
  • … and make everything look awesome.

The price

  • no hardware anti-aliasing.
  • less control over the glow.
  • less performance.

First steps

1. Set up a test scene that can be used to compare the changes.
2. Write a small script that automatically takes a screenshot when the scene is started.

If everything works well here should be a screenshot.

graphicsupdate1
The beginning. Doesn’t look very nice, as this isn’t a camera perspective you see in the game.

Getting started

Time to switch to deferred rendering and HDR.
As expected not much of a difference here. I had to remove our glow as it isn’t compatible with the deferred rendering, also the antialiasing is missing now as it’s simply not possible when deferred rendering is used.It looks like this broke the batching, but I hope that is just an issue because of our shaders which weren’t written with deferred shading in mind.
 
graphicsupdate2
 
Now it’s time to remove our custom lighting and shaders.On the units it’s pretty obvious I can’t simply use the standard shaders as they use vertex colors instead of textures.
graphicsupdate3
Will write a new surface shader as a replacement for the old shader. Now it looks like it should again. Also that has fixed the batching issue as expected.
graphicsupdate4
Time to add a bloom shader. I’m using the default Unity one for now, but will probably replace that with a custom one later
 
It looks different from the old glow, but I like it.graphicsupdate5
Let’s remove the fake shadow on the units and add a ‘real’ shadow.
Shadows on the units and base are broken a bit. Will have to figure out whats going wrong there, but I’ll leave that for later.
graphicsupdate6Let’s take care of the glowing part of the base
 
Took some time to tweak it, but looks good now. To make it work I also had to addtonemapping. Forgot to write down the settings, but as I’m going to change it later it isn’t really important.graphicsupdate7
The hexes look a bit too flat so I’m adding some randomization and a detail texture to them.
 
Fine for now, but I’ll revisit the hexes later as I’ve some improvements planned for them. As there is a bit more to write about what I’ve done there this will be in another blog post.
graphicsupdate8
Time to add a light to the units.
 
As you might notice everything got a bit darker as I tweaked the tonemapping(technique Photographic with an exposure of 1).
graphicsupdate9
Time to modify the lighting a bit. In our custom lighting we used a different falloff formula so I’m going to slightly modify the deferred rendering.
 
Also figured out my shadow issues were caused by the normal bias setting of the light. To finish it off I also added an antialiasing post processing effect to make it look a bit nicer. The used technique is “FXAA1 Preset B”. Made a mistake and lost ambient lighting. Can’t redo that screenshot now as I’ve moved on quite a bit.
graphicsupdate10

There are still more shaders to be replaced and a lot of tweaking to be done, but there isn’t anything worth writing about left. Was slightly wrong there, tehre is actually something worth writing about, but it’s something that deserves a dedicated blog post.

 

For now let’s have a look at how it looks when looked at a camera perspective that is more in line with what is actually used while playing failure.

graphicsupdate11

 

The result

Time to compare how it looked before to how it looks now.

oldvsnew

Looks quite a bit different, but I’m happy with it for now.

In overall everything I planned went pretty smooth without any big issues. This is somehow sad as I was hoping to have some more interesting stuff to write about 😉

What I’ve missed

With all this setting up, rewriting all the shaders I forgot one little setting when I started. I forgot to switch the color space from gamma space to linear space. As changing it will require to tweak a lot of settings again I’m leaving that for later.

What is left to do

Could write a really long list here, but I’ll limit it to stuff that are related to the switch to deferred rendering.

I’m not happy with the Unity Bloom effect and will replace that with my own one soon. Also I want to have a look at the antialiasing as there are a few situation where it doesn’t work very well.

There’s still a way to go until we’re completely happy with the look of the game – ideally we could do with an artist / artists to come on board and give the game, it’s world and the models the final polish that we’re looking for. Although Sven decided not to go into technical detail in the above, if you would like to know how he accomplished the look that we’ve got with the game come and join us over on our SubReddit where we’ll be happy to answer any questions about the visuals, audio, programming, design or just to have a chat about games development in general.

I hope you’ve found this post interesting, and as usual feel free to leave us a comment or two.

Until next Week

Justin & Sven

Latest Jobs

Treyarch

Playa Vista, California
6.20.22
Audio Engineer

Digital Extremes

London, Ontario, Canada
6.20.22
Communications Director

High Moon Studios

Carlsbad, California
6.20.22
Senior Producer

Build a Rocket Boy Games

Edinburgh, Scotland
6.20.22
Lead UI Programmer
More Jobs   

CONNECT WITH US

Register for a
Subscribe to
Follow us

Game Developer Account

Game Developer Newsletter

@gamedevdotcom

Register for a

Game Developer Account

Gain full access to resources (events, white paper, webinars, reports, etc)
Single sign-on to all Informa products

Register
Subscribe to

Game Developer Newsletter

Get daily Game Developer top stories every morning straight into your inbox

Subscribe
Follow us

@gamedevdotcom

Follow us @gamedevdotcom to stay up-to-date with the latest news & insider information about events & more