PORTFOLIO | REEL | BIO | TUTORIALS

Making of - Zer0 Gravity

In this article I will walk you through the process of making hi-detail real-time environment using the latest tools and techniques. Zer0 Gravity is my personal project that I started for learning more about physical based rendering and creating realistic environments.

I want to show some concepts that have made my work flow much better. Also Iīm going to give you some links along the way where you can read more about those techniques. I hope you find this useful and if you have questions, please send those to me.

Planning makes perfect

It all starts with planning. You should ask yourself questions like what you want to do and why. Usually I just like to learn something new like different art style or some technical stuff. You will learn better by doing things and making mistakes. I would recommend reading theory because that will make everything more interesting when you know what is happening behind the curtains.

Next step is to choose the project. Usually the idea comes very easy but good inspiration sources are movies, games etc. and most important real-life. In my case I watched space documentary and the idea just hit me. You still want to choose a project that you can finish and hopefully put to your portfolio. Thinking the scale and complexity is also important to do at this stage. Making the next GTA world is a little too much work for one dude.

Then the fun part starts. Itīs always a good idea to collect reference material (Fig 1.). These could be color charts, inspiration sources, blueprints etc. Main idea is that by watching these you can form ideas in your head and convert those into digital form. Donīt be afraid of using very strange ones because for example you can watch animals and make robots out of them. Try to study your subjects as much as possible. In this stage you can also think and decide what kind of visual style you want to use.

Fig 1. Reference sheet that contains some ideas of space station capsule forms.

When you have a solid idea then itīs time to decide what tools are you going to use. When doing real-time environment it is very important to choose the right engine. There are very good ones out there but take some time to choose the right one for the right project. Same goes with the 3d tools. Try to learn one tool well and then expand to other if necessary.

Planning is something that you do with your own way. However I think itīs a very important step because that way you form some sort of base for the whole project and that main idea that keeps rest of the project together.

In my case the main reason for the project was to make a nice old 80īs space station. I also wanted to learn a whole new physical based rendering workflow that will be the next big thing in game graphics.

I collect references from submarines to 8 bit Nintendo and study more about zero gravity environments. It took a bit long time but I think it was well worth it.

I choose to use Marmoset Toolbag 2 because itīs the best real-time PBR engine out there. It is also very easy and fast to use which is awesome for this kind of project.

Modular thinking

There are some things to consider when doing game environments. Main thing is that you should optimize content as much as possible and try to keep everything at top quality. You also want to have full control of what you are doing and in complex environments that could be hard thing to do without proper thinking. One of the best way is to use modular thinking.

Fancy word but what that really means is making things like Lego blocks. You can do awesome looking environments with unique pieces but changing something will be a huge job. Also building large environments with unique pieces is hard and time consuming.

However it requires a bit more thinking and testing when doing a modular content. You should think those like Lego blocks where you have a set of different ones. You can but those on top of each other or side by side. These blocks should be a certain sizes so there will be no visible seams or holes when placing those into the environment. Like Legos these should snap together nicely. Using some reference objects like humanoid will guarantee right scales when modeling because scaling afterwards will be hard. Using the same grid and scale properties with the engine makes environment creating fast in editor side. This way you can keep level designer happy!

Same goes for texturing. You can make looping textures for different use and create atlas for multiple model to share. This way the scene complexity will decrease and this can also speed up the performance. You can also combine models together when they share the same textures and things like these are nice when you want to save draw calls.

When you have modular objects and textures then making changes will be fast and those changes applies to all of the instances of that object or texture. However you canīt do everything with modular way and you shouldnīt because unique things add a lot more feel and hide looping sections.

I studied space station structures and tried to find pieces that can be modeled in modular way. Basically those stations are big structures that have a lot of tube forms. There are some doors separating areas and the whole station is built section by section over time. That way itīs pretty ideal for modular modeling.

At this time I could also stack uvīs on top of each other’s and that way I saved a lot of texel space in textures. Itīs important to hide seams when doing many cuts in uvīs. Doing extrusions also in geometry is a nice way to naturally hide uv seams. I also wanted to keep my normal maps correct in any conditions. If you flip stuff when using normal maps then itīs easy to get wrong results and flipped values. If you have even one mistake on your modular piece then it will multiply when you are making instances of that.

Fig 2. Final scene structure. Tris count is 114k. Looking really messy but thinking models in different layers helps.

I usually divide environments to different groups or levels so that I can organize stuff better. I think the basic structure first. That is the main frame or form that will keep everything together. In mechanical environments these are the walls and roofs that will support all the rest. Usually these are the biggest parts of your environment. I always want to do these as modular as possible because with these blocks you can build a very huge areas. The nice thing about these parts are the fact that player usually donīt pay so much attention on these so you can go a little lower in polycount and texture resolution. This however is not always the case but usually there will be models to cover these areas. I simply call this layer “Structure”. (fig 3. red)

Next group is a little smaller assets that will not be support any big forms but will hide boring looping wall sections and add small points of interest every here and there. Looping modularity is not so important here. I also want to add more details here because these are the assets that player will be looking a lot. This layer I call “Medium level”. (fig 3. blue)

Last envy layer is “Props”. (fig 3. green) Props are something that the player can take up and lift from the ground. I personally like this stage a lot because you can add some much with so little. Again depending on the situation, you want to have a pretty high level of detail here. In FPS, player could look props really close. In my situation the view was first person.

Fig 3. Structure divided into different layers. Red=Structure, Blue=Medium level, Green=Props.

Usually I start everything with blocking out. This way itīs fast to get some forms and volumes. If something looks bad I can just delete it and start again. I would lose some minutes of work but not hours so itīs a pretty good way to start.

When the block out is done then itīs simply replacing those with final assets. Itīs not easy and sometimes I just like to start doing final quality stuff from the get go. In this project I went pretty much with mixing these together because I wanted to see nice graphics even at the early stages but I also wanted to have some sort of idea about forms that I needed to do next. These are pretty early stages of the project so making bad choses here can mess up the final results.

Below is a screenshot of the scene wireframe. Red means unique pieces and black means instances of those. The scene is small so there are more reds than blacks but when doing bigger levels this ratio will change.

Fig 4. Scene modular structure. Red=Unique asset, Black=Instanced asset

Texturing time with PBR style

Texturing is one of the most important stages. It will vary a lot depending on situations. In this project I used Physical Based Rendering (PBR) and for texturing that means that I needed to use right values to get physical correct results so no baking into textures this time.

PBR is not a new thing but now itīs possible in games thanks to more powerful gear that next-gen consoles and pcīs have. Previously we used shaders that used textures which had a lot of information baked in because engines couldnīt calculate those in real-time. When lighting changed the baked stuff stayed intact and that made things look wrong. Also material definition was really bad and sometimes it was hard to tell what was metal and what wasnīt. PBR will solve a lot of these problems. I wonīt go into details because you can find a really good articles online that will explain all the essentials. One good place to start is this

At planning stage I figured out that I needed to do a lot of assets. That meant a really huge texturing work so I wanted to have a fast workflow that I could use thought-out the project. Everything needed to be automatic and as fast as possible. Allegorithmic Substance Designer was the answer that I was looking for.

My texturing workflow was pretty straight forward. First I modeled low-poly model. Then I made uvīs. Duplicate low-poly and use that as a base for hi-poly. Then export those into Xnormal. Baked normal, AO etc.. In Photoshop I made a simple base for albedo and gloss. Put all of those into Substance Designer and generate rest of the maps there. In SD I used a template that gave me albedo, roughness, metalness and normal maps about in 20 sec. Sometimes I did final tweaking in Photoshop like adding text and stuff like that. Final step was to put everything into Marmoset Toolbag 2 to see how they worked. I think that it would be a good idea to tell some basics about the textures next.

Fig 5. PBR textures. Left is Albedo. Next to that is Normal, Metalness, Gloss.

Albedo is like diffuse. It contains basic colors. Previously we usually baked AO into here but this time we want to remove pre-baked stuff as much as possible. You can however use AO as a separate map in some engines. When using specular maps you want to use dark/black values for metals because they are reflecting almost all the light so there are no diffuse refletions. When using metalness map, albedo will tell the reflectance colors for metals so donīt use dark values then.

Specular tells the reflectance value of the material. Conductors (things that conduct electric current) has a very hi value because they are reflecting almost all the incoming light. Insulators have much lower values because some of the incoming light will stay in the material surface. Conductors can have a color value like copper or gold. Insulators usually are grayscale. Previously specular maps had a lot of stuff on them like damaged metal, scratches etc.. This time you want to avoid that and put those into gloss/roughness maps.

Metalness is basically a mask that tells what parts are conductors and what are not. 0 and 1 values are used here, black and white. Metalness map pretty much replace specular map so itīs up to you what you use. I used metalness a lot because itīs faster to create and itīs black and white information so I can compress that much better.

Gloss or roughness tells how glossy or rought materials are. This tells how the reflections looks. Mirror would have a very hi gloss value and dry sand very low. Roughness is usually inverted version of the gloss map.

Normal maps are pretty much the same like previously. Now those are also much more important because a lot of things will depend on them. Take some time to do your normal maps right.

One trick that I used a lot was some sort of kitbashing. I found out that making a generic template with sci-fi patterns is a fast way to add details into textures. Simply by modeling holes, screws and different bevels and baking those into normal and AO maps is much faster way instead of modeling those into all of the models separately. This way I could just copy the parts that I liked and paste those into textures. This worked very well for normal maps by using “overlay” layer style. Below is the normal map template that I used. (fig 6.)

Fig 6. Sci-fi pattern normal map template.

Sometimes everything worked great but there were times when I needed to do much more manual work to achieve right results. I also needed to do a lot of fixing thought-out the project because I learned more about PBR when I textured. At the end of the day physical based shading in artistic point of view is really simple to understand but it will require testing and observing.

Letīs light things up

Cool thing about PBR is that when you do your textures right they work in any lighting condition. Also Image Based Lighting (IBL) helps for lighting stuff. Itīs still requires thinking and testing. Good lighting can hide some mistakes in textures or models but a bad one will highlight those like a maker.

When Iīm creating lighting setups I usually look references and try to imagine myself there. Thinking what kind of things emit light and how, is it point style or maybe even directional like the Sun.

Space is a lot different than the Earth if we think the lighting conditions. Space is dark and light sources are very limited. Space stations are lit with light bulbs and similar light sources that will create their own kind of shadows. There is no atmosphere that will scatter light or other material that will manipulate that.

Lighting was definitely the hardest part of this project. I did a lot of testing and I went from really bright lit to almost dark. Final lighting was once again a mix of these two, really dark image based lighting with some bright dynamic lights that cast shadows. This way the image had very noticeable shadows and it was very clear where the light sources were.

Fig 7. Scene lighting off and using only image based lighting (IBL).


Fig 8. Scene lighting on. Multiple dynamic lights will cast shadows and lit some areas and creates contrast.

Mood will wrap everything together

I think that the mood is one of the key parts of the final result. Colors are very important for creating that. Using right color palette is a good way to ensure that the mood is going to be well balanced in the whole project.

In my case I changed colors a lot. Fastest way to do this is simply by tweaking lights but itīs important to play with colors in textures also. I wanted to respect early 80īs style as much as possible and that why I went with yellow/orange colors that gave a very warm feel. Using some of the post-process effects I could mimic old camera effects that really sell the feel of 80īs.

One good advice that I got was about using histogram in Photoshop. This way you can see pretty fast if you are losing details because you have too bright or dark areas. Going between these extreme points is a good way because then you are not destroying details.

Forms and silhouettes are also important for the mood. Using round shapes with sharp ones creates a nice contrast and that is something that eyes like to pick up. Creating too much contrast with forms and colors can make the whole image very noisy and hard to read. That is why I tried to keep the overall feel pretty simple.

I wanted to concentrate on quality over quantity. Thanks to that I could create a lot of small details and keep focus on small areas. One idea that I got was photos placed on the walls. Space is very lonely place so astronauts put stuff on walls to remind them of home. Also everyday items will flow in zero gravity so that was one thing that I also wanted to have. Like I said earlier about the props – small things that add a lot.

Fig 9. Some small props that makes the look more real.

Feedback is a powerful tool

For a long time I tried to do my personal projects alone and only shared the final results. Now I understand that going this road was a very bad choice. I found out that being a part of community you can receive very good feedback through-out the project. Without the help of community end results could be much worse.

Conclusion

In this project I learned so much. During these two months I finally understand how to use PBR & IBL in effective way. It was really interesting to see how much PBR affect to the final results and for me itīs more than enough for real-time graphics. There are really no shortcuts to achieve good results. Tools are evolved so much but hard work and open mind is the formula that I believe will point you to awesomeness!

Here are the final shots of the scene.

Kimmo Kaunela - Digital artist Đ 2014