logo80lv
Articlesclick_arrow
Research
Talentsclick_arrow
Events
Workshops
Aboutclick_arrow
profile_loginLogIn

Refining Environment Design with Clever Shaders

Tobias Forsling discusses the production of his amazing environment, inspired by the amazing art by Matus Garaj. Everything was assembled and rendered in Unity.

Tobias Forsling discusses the production of his amazing environment, inspired by the amazing art by Matus Garaj. Everything was assembled and rendered in Unity.

Introduction

The idea for the project originated from this one concept piece by Matus Garaj that I saved while browsing artstation a while back. I really like the style in which it was painted and the challenge that would come with turning it into a realtime environment. 

When I was in the process of finding reference for my project I quickly found myself looking at the art dumps of Assassins Creed Origins. And a good next step would be to buy the game and get reference myself from the game on everything from closeups on props to more broad aspects like lighting in different times of day and how they handle colors in oasis areas. Another source of inspiration was the ruins of Palmyra which had a similar ruin desert scenery that I was after. Once I gathered most of my inspiration I started breaking down the concept into what components I saw that I would need, palmtrees, bushes, blocks of grass, different kind of rocks and so on. After that I started with blocking out the biggest aspect of the scene, the pillar and from there it took off.

When it came to organize my work, I found it the easiest to start big and work downwards to smaller elements as I go. This way also supports the fact that I want to be able to get a feel of the environment and its composition as early as possible. So, I started with the biggest part, the pillars and the terrain, then working my way down to palm trees, rocks, bushes, then further down to grass, logs, tiny leaves and junk on the ground. Of course, there’s some jumping back and forth in some areas but that’s what I try to aim for at the start of my projects.

Materials

For this project, I bought the Amplify Shader Editor to be able to create my own shaders in Unity and this has since completely revolutionized my workflow. In this project, I’m using custom shaders for almost every model. For the water shader, I looked at Amplify sample water shader that’s included in the editor. They had controls for depth blending between two colors, a texture close to the edge of objects with a smoothness control which was the foam and also a very performance friendly way of handling the reflections by grabbing reflection data from a reflection probe.

The water still had this hard edge towards whatever it touched, and it was to calm, the only movement that was in it came from the panning of normal maps in the shader.

So set out to fix these issues in the shader. The first one was quite simple since Amplify has a node called “Depth Fade”, by putting that data into the opacity channel I made the water get transparent at low depth, and with a distance value I could control how much transparency I wanted.

As for the materials and textures I used a combination of my sand materials created in Substance Designer with a mud textures from Substance Source (the one with the footprints) and this gave me the ability to have this wet dirt area just near the edge of the water and breaking the roughness between the dry and wet land. This in combination with a version of the dry sand that was a bit more saturated and a bit darker gave me all the textures I needed to blend between the water and dry sand. But the waster still felt a bit too still or solid, so I added some motion to it by giving it some tesselation and then doing a waving vertex motion.

Rocks

All rocks in this image are made by me except one more rock that I grabbed from the adam demo which is used in two places.

The rocks were made in Zbrush while using reference of rocky desert areas. The sculpt was only to get the bigger shapes of the rock, the finer detail was textured in Substance Painter using a material from substance source along with some dirt and wear layers. The small ones are in fact the same rock as the bigger ones but resized. But since the small ones wouldn’t be as visible to the camera I reduced their tricount by about 90% from about 500 to 50 and lowering the resolution on the textures and sized them down by about 10 times. A quick way to get pebbles that are of the same kind as the other rocks.

Lighting

Yeah me starting to work on the lighting early on is part of my attempt to nail the composition and feeling I want from the scene as early as possible. The concept is set during the mid-day with a very white sunlight and a light blue ambient light which is what I first started with. But I quickly felt that ended up feeling very flat, so after some experimenting I tilted the light down which gave me these shadows along the bulges in the sand that I loved. And after looking at the lighting of Assassins Creed Origins where they have very strong colors I decided to move my light towards more of a sunset with a bit more orange light. Although a lot of the color and light is helped by the color grading in which I further emphasize the orange tones, punch the contrast.

Animations

The cloth on the scaffold is animated using cloth physics in unity, so its simply a somewhat subdivided plane that then has the cloth component applied to it. 

The smoke and fire are effects from the “Unity Particle Pack” made by Unity Technologies that I downloaded from the asset store. The perhaps most interesting part is the water which I animated in the shader using the waving vertex node and tessellation to give it that little extra feel of life.

And then the vegetation for which I’m using kind of the same method to animate the leaves on the trees. But I had some issues where the waving vertex node changes the scale of the mesh, while its fine for a plane it was a big problem on my vegetation. So, I created my own waving controls in the shader. At first, I had this motion of the leaves moving from left and right but the felt too rigid and digital since the movement was synchronized over all the leaves and the leaves themselves didn’t move that much.

Yet again I looked at how other games like Assassins Creed Origins and Battlefield 1 animated their vegetation around the world and they had this small waving motion. So I created the same thing where I had a gradient move based on world space directions. Then I combined these two motions with an add node to have them wave left and right while at the same time having some individual motion on the leaves.

Conclusion

The scene is made in Unity with the intent of being game ready props. With the full scene in view it runs at around 50fps at 2560×1440 and Vsync enabled, and this is on my Geforce 970. It could be used in a game today but depending on the needs of the game some assets might need to be changed and optimized. The grass is for instance way to complex for say a top down strategy game and none of the assets in here are using LODs which they would in the case of being used in a game. So to answer the question, yes they are usable in game but I could optimize them further as all these things would need to be adjusted for the specific game depending on that games needs.

Tobias Forsling, Environment Artist at Tarhead Studio.

Interview conducted by Kirill Tokarev.

Join discussion

Comments 5

  • Filip

    How did you do the reflections on the water surface?

    0

    Filip

    ·6 years ago·
  • Anonymous user

    SomeGuy: The water is a plane using a normal maps panning over it.
    How the actual depth fade node works in detail I cant say other than whats in the wiki http://wiki.amplify.pt/index.php?title=Unity_Products:Amplify_Shader_Editor/Depth_Fade

    rlawsfamily@gmail.com: Thank you!

    MateiGiurgiu: No the trees are handmade, leaves were hand built as a high poly in maya that was then baked down to a simpler mesh.

    0

    Anonymous user

    ·6 years ago·
  • Anonymous user

    speedtree.

    0

    Anonymous user

    ·6 years ago·
  • rlawsfamily

    Very impressive! And people say Unity doesn't have good graphics - it does, you just have to shell out for the right assets ;-)

    0

    rlawsfamily

    ·6 years ago·
  • Anonymous user

    What was the workflow for trees?

    0

    Anonymous user

    ·6 years ago·

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