Sci-Fi Space in Unity: Tips and Tricks

Sci-Fi Space in Unity: Tips and Tricks

3d artist Kenneth McMorran showed the workflow, behind the creation of effects-rich environment in Unity.

3d artist Kenneth McMorran showed the workflow, behind the creation of rich and effects-full 3d environment in Unity.

Hello, my name is Kenneth McMorran and I currently live in the city of Glasgow, UK. I am a freelance 3D Artist specialising primarily in environments. I’ve worked with 3D in some form or another for around 10 years, all the way back to my undergraduate years in interdisciplinary design. I spent my postgraduate years studying game art and animation and subsequently went on to work professionally for 4 years in the fantasy mobile MMO genre. Science fiction has always been my main inspiration and motivator and throughout the years I’ve tried to communicate that passion through my personal artwork. Recently, I had the privilege of working with an immersive theatre company called Punchdrunk on a project which would see me build the virtual representation of their latest, soon to be announced, production.

I began work on The Lab initially as a freelance project. Unfortunately the project didn’t make it out of pre-production, so instead of shelving the preliminary ground work, I considered it an opportunity to research and implement some techniques in Unity 5 that I thought were exciting and relevant but that I had not yet explored by myself. I knew that these techniques had the potential to strengthen and reinforce the narrative of an environment so I re-built the scene from the ground up with these 4 main areas of interest in mind:

  • Volumetric fog and lighting

  • Deferred decals

  • Face weighted normals

  • Animated lights

  • In terms of building the environment – specifically for an interior scene like The Lab – I think it’s quite important to think of the construction in terms of modularity. For me personally, this helps to break down what might seem like quite an overwhelming task at first.

    There are some amazing tutorials out there and if you would like an excellent introduction to the planning and construction of modular environments then there really is no better place to start than with:

    Philip Klevastav

    Working with Modular Sets

    Thiago Klafke

    Creating Modular Environments in UDK

    Modular geometry and materials

    In terms of modeling the environment, I’ve been using Modo more and more recently. Personally, I believe it to be one of the more progressive packages in terms of tool functionality and reliability. Also, there are many artists that I find inspirational using Modo which has contributed to my confidence in the software.

    Below are the basic building blocks of the scene which utilise a modular texture approach. With a good base texture it’s amazing just how many different modules you can produce. In terms of tri-count they are fairly low by today’s standards, the only exception being that the bevelling required to support a face weighted approach to smoothing can start to bump up the tri-count quickly. In terms of performance and optimisation, a modular approach like this has some great benefits; using one material across all of your modules contributes significantly to static batching, meaning lower draw calls and less usage of available memory bandwidth. The challenge here lies in making the most out of very little.

    Modular environment design

    Modeling with face weight normals (FWN)

    This is probably as good a time as any to bring up the subject of face weighted normals:

    Face weighted normals (FWN) is a technique to improve shading for 3d models. Shading can be improved by adding bevels and altering the vertex normals to be perpendicular on the larger flat polygons. This forces the shading to be blended across the smaller bevel faces, rather than across the entire model.

    However, the added bevels will often create long thin triangles, which can significantly reduce rendering performance.”

    For this production methodology, I took a lot of inspiration from Alien: Isolation and Star Citizen, particularly the way in which a lot of the environment detail is modeled and supplemented with decals. This approach appeals to me because the focus on geometry provides objects with a lot more depth and weight. As a result, ambient occlusion, shadow and light help to reinforce the form.

    Without FWN With FWN

    Every modeling package that I have used features some form of Face Weighted Normals tool and in Modo (version 11) you can find it under the Game Tools layout > Vertex Map > Pop Out Vertex Tools. In most cases it’s as simple as selecting your mesh and pushing a button; there is no real need to manually tweak vertex normals, so all in all the process is very quick. In terms of implementation in Unity, all you need to do is import the FBX; the normals are stored in the file.

    Materials and Baking

    I’ve been a huge fan of the Allegorithmic Substance suite for some years, especially since PBR became the industry standard for high quality materials and textures. The things I appreciate the most are the reliability and ease of use, including the way in which Allegorithmic have managed to package the resources and tools necessary into a stand-alone platform. Don’t get me wrong, I think that the Quixel SUITE has a lot of potential and power too, but I’ve always found it to be held back by it’s integration/reliance with Photoshop. Many argue that this is precisely why Quixel is so powerful but I think it just comes down to personal preference. Both systems are excellent and I recommend trying both.

    Substance Painter materials

    In terms of base materials, I currently use Substance Source and GameTextures to find and experiment with materials that I imagine the environment to be built from. I have always worked with the metal/roughness workflow. In the case of The Lab, for example, this included, in some for or another: aluminium, clearcoat and painted steel. The first thing I usually do is apply a layer of dirt to the materials as I find this helps to break up the surface metal/roughness, giving a more worn and believable appearance.

    Unity supports the procedural substance format SBSAR which allows you to import materials with predefined variables that you can play around with. This can be extremely useful for ideating within Unity e.g. trying out different paint colours or varying the degrees of damage and age. It gives you the opportunity to make huge changes to the look and feel of your scene without having to constantly export new texture maps.

    Having chosen to use face weighted normals, I didn’t necessarily need to bake normal maps in order to improve surface shading but I did want to have them in order to get more of the procedural material effects in Painter. This being said, I took the model with FWN applied into Substance Painter and chose the option to bake using the low poly mesh as the high poly mesh. The resulting maps allowed me to take advantage of the great procedural material effects like edge wear and dirt without providing a separate high poly mesh. Also, because the normal shading is so clean you pretty much avoid gradients in the normal map.

    Result of baking with FWN in Painter

    Decals and deferred decals

    I chose to incorporate decals into the project as a means of being able to add more complex normal mapped detail without the need to model and bake it. I produced the decal materials in Substance Painter using the hard surface normal height textures. Jonas Ronnson has created a plethora of fantastic hard surface alphas and I would highly recommend checking them out.

    I approached decal placement in two different ways:

    Firstly, I created a more traditional style of decal that consists of a polygon with an alpha map that can be applied in the modeling package. This method was handy as it allowed me to put several decals on one texture aka an atlas. I then cut up this atlas in to several polygons, each representing a decal.

    Decal Atlas

    Secondly, I used a tool called Dynamic Decals from the asset store in order to apply deferred decals inside Unity, the main benefit of the tool being that I could quickly place and manipulate decals throughout the scene. The decal is projected onto the surface, much like a sticker, and therefore you don’t have to worry about manually wrapping the texture over tricky volumes, such as cylinders. The tool also provides the ability to add projection masking to objects that you don’t want the decal to affect.

    Dynamic Decals – Unity 5

    The only downside that I came across while using the tool was that, at the time, it did not support the use of decal atlases which meant that every decal had to be imported as a separate texture and therefore material. As a general rule of thumb I try to use alpha cutout materials and atlasing of textures where possible to help improve performance.

    Volumetric fog and lighting

    I wanted to implement a volumetric fog and lighting system into the scene in an attempt to create a greater sense of atmosphere and realism. I had been inspired to do so every since I saw the short film Adam produced by Unity Technologies to showcase Unity 5.

    After some research I found the Volumetric Lighting solution used in the Adam short on Github. The package comes with a few example scenes which really help to serve as a great introduction to the effects. I chose to go with this package as it provides quite a bit of flexibility in terms of light types and fog distribution. Lighting comprised area lights, tube lights and tube lights with shadow masking. Shadow masking was handy in that it let me restrict the influence of lighting in the scene. Fog density could also be adjusted globally or locally which really appealed to me, I liked the idea of being able to have pockets of dense fog like those to the sides of the catwalk in the scene.

    Tube light with locally controlled fog and shadow masking

    I used the area light to try and imitate the effect of a searchlight bursting through the door at the end of the corridor. I found that it was quite difficult to control the shadows generated by the area light in this context. The author does note that the technology behind the package is still very much in the research and development stage and as a result some features are disabled or still to be implemented. However, I achieved a satisfactory crepuscular ray effect for free so I can’t complain.

    Area light with shadows

    There is another popular free solution from SlightlyMad which I cannot really comment on as I didn’t have the time to try it out but it does claim to support some additional light types which is interesting. I also came across a paid solution in the asset store called Hx Volumetric Lighting which I would love to try at some point.

    Animated lighting

    Up until now I had only really presented an environment though a static screenshot. For this scene I made it a priority to have some kind of movement that would help sell the lighting effects and as a result strengthen the atmosphere.

    Initially, I animated the area light because I noticed from moving it around that, depending on the camera angle, the crepuscular ray effect was more evident. So, from there on in I set about using a simple keyframe animation to control the rotation of the area light sweeping from left to right and back. I played around with the length of the animation and then made sure it was set to loop.

    Animated Area Light

    In this scene, something is supposed to have gone wrong and the facility is supposed to be on alert in response to this. I knew I wanted to have some form of flashing alarm light but I also wanted more movement, specifically to draw the eye toward the door at the end of catwalk. Again, I used some simple keyframe animation to control the transform and intensity of two tube lights over time.

    Animated Tube Lights


    Up until fairly recently I relied on pre-made LUTs but with the advent of Unity’s updated post processing stack I took the opportunity to play around and develop my own. Colour grading and tonemapping are probably my favourite aspects of post processing and I cannot emphasise their importance enough. There is so much potential to define the atmosphere and narrative of your environment and there is a lot of pleasure to be had in watching the scene slowly transform into what you imagined in your mind.

    Interview conducted by Kirill Tokarev

    Follow on FacebookTwitter and Instagram

    Join discussion

    Comments 0

      You might also like

      We need your consent

      We use cookies on this website to make your browsing experience better. By using the site you agree to our use of cookies.Learn more