With HDRP now I think Unity has the best redering engine out there
Когда дочитал до фотки интерьера, почувствовал, как будто вернулся на пять лет назад в переполненную электричку до Киева в 6 утра. Это просто потрясающе атмосферно и вызывает все эмоции связанные с теми утренними поездками. Все это грустно-сонное настроение, спасибо за это флэшбек!
Looks absolutely gorgeous!
Callum Tweedie-Walker talked about some techniques he used to create his amazing tribute to Simon Stalenhag in Unity.
Hi, I’m Callum, an Environment Artist from the UK, currently finishing my final year at the University of Hertfordshire. Last year I worked on our second-year project, Pathfinder, alongside my fantastic teammates Alec Thomas, Annamarie Gray and Aleksandra Jankowska. In addition to that, I also spent some time interning with the wonderful folks at REWIND, working on some amazing VR projects like Ghost in the Shell VR, Silicon Valley: Hacker Hostel and Infiniti: Soul of the Machine.
For this project, in particular, I had invaluable feedback from the incredible lecturers here at UH, as well as the very helpful Mark Ranson of Driven Arts, formerly of Rocksteady.
The first thing to mention here is the unbelievably talented Simon Stalenhag, whose work serves as the basis of this piece. These are the two paintings I used as a primary reference for the scene:
Initially, I had only intended to build the Mech itself. However, once completed, it felt like a waste not to stage it in a thematic setting. Rather than doing a straight adaptation of the original painting, I thought it’d be interesting to place it in another Stalenhag scene, as his work has a large amount of in-universe crossover, and I thought it’d be pretty cool to see where else you might find this mech. From there, I found the second image above and then decided to add in a gas station, hopefully hinting at a small story about an abandoned attempt to refuel the vehicle.
By the time I was blocking out the actual environment, I already had the Mech fully modeled and baked. I threw some temporary materials on it and got it in the engine, then immediately began thinking about cameras and lights. These tend to be the first things I consider anyway, but as this scene was built solely to show off the central asset, I wanted to make sure the lights caught it in all the right places, and then build the corresponding environment around that.
It was around this time I settled on placing him in the street painting above, so I added in the row of lamp posts, which repeat along a line that helps draw the eye towards the mech. With a quick grade to help set the heavy mood of the piece, I thought a striking secondary colour would work well to catch the side of the mech. I decided to really push the red lighting found in so many of ‘The Electric State’ paintings (the art book in which the second painting can be found; couldn’t recommend it enough!). This would help tie the piece in with the universe, but also be a fun play on the typical good/evil connotations of blue and red. Was this a “good” or “evil” mech?
With some temporary lights set up to mock the lighting I roughly wanted, it became clear a good candidate for the source of the red light would be a branded “SENTRE” light; the mega-corporation central to The Electric State. From here, it was a quick leap to deciding that could be attached to a gas station. Alongside this, to get a better sense of depth and distance, I threw in some of the towering buildings also found in The Electric State. I blocked all of this out with some cubes and cylinders, which you can see below.
Here you can also see some overhead rail-lights I added, quite liking the “Tron” feel they gave off and felt they helped lead the eye around, but ultimately settled on removing them. In hindsight, I think this was certainly the right decision; looking back they’re incredibly distracting and really quite garish. I quickly got rid of those and decided the charging terminal also from the above painting would make for a good foreground object, acting as the third point in a triangular composition between the Mech’s head and the red light. From here on, the scene was fairly locked down, so I spent some time working on the base textures of the Mech:
All the blockout pieces here are just transformed stock Unity meshes. The background towers and foreground puddles are just scaled capsules/cylinders, and the gas station clearly an arrangement of cubes. I never go into Maya for things like this; it’s so basic, and having immediate feedback on how it looks through the camera and plays with the lighting is invaluable.
Pretty much all of the modeling here is very simple when you break it down into the basic volumes/shapes. Several of the mech’s features are predominantly cylindrical – so the only challenge is getting certain cutaways and holes to lie flush with the surrounding mesh. Even that’s pretty trivial when you have tools like Maya’s Quad draw, where you can just draw the shapes you want on the base cylinder. The best idea with these kinds of shapes is to stay as low poly for as long as possible and focus on the core shapes you need, as they’ll inform the rest of the modeling.
Screengrab of the High poly model in Maya
The antenna is just tapered cylinders instanced around the model, and the lids and panels are generally just offset selections of faces wrapped over one another. It’s just a layering of really simple stuff.
One thing I’d recommend when making pistons would be to embrace really simple rigging techniques. I’m not a big lover of rigging, but when you’re trying to create mechanics that should look functional and practical, the best way to do that is to apply some light constraints so you know its functional. This obviously doesn’t ensure your mechanics are structurally sound from an engineering standpoint, but it adds a level of plausibility knowing none of your parts intersect and so on.
Doing this in Maya (or any other DCC) is really simple. By adding a Locator (Empty) at either end of a piston, parenting the heads/caps to them, and linking each with an Aim constraint targeting the other, you’ve got a very simple working piston. This saved tons of time when I adjusted the length of certain leg parts or adjusted the design in some way that required changes to the pistons. I could just grab one of the Locators, move it to its new position and be sure it was all aligned correctly.
Obviously, a big part of modeling anything is collecting reference. Thankfully there are tons of resources for heavy machinery, vehicles and the like (a great one being Photobash), so it’s quite straightforward to find inspiration. I’m a real fan of cables and pipes, so you can see quite a number of hydraulic lines linking the various mechanics. These add some believability and help break up the shapes and add detail to the Mech’s feet. Leaving the head mostly bereft of detail gives the eye a place to rest. Secondary to that, it’s amazing what mileage you can get out of stuff as simple as adding a small divide across a shape, or an inset on a cylinder for a rubber seal to sit in.
Indeed, the surrounding environment is significantly less complex than the Mech. This came about at the blockout stage, where much of the feedback I had was in favor of keeping the setting primitive, as a stylistic way of highlighting the hero asset (some even suggesting I kept it as it was in blockout). I thought that was an interesting idea, but didn’t want the scene to look unfinished, so I kept all the key shapes the same and only modeled to a level that wasn’t distractingly-primitive.
After that, I needed a way of filling out the rest of the scene and breaking up the fog that wouldn’t draw attention away from the Mech. My solution was to add a chaotic arrangement of cubes, with the idea being that things would become more primitive the further away they were from the Camera. This is also why the background towers remained as they were.
Just as I finished the modeling on the mech, the Substance Painter Live-Link plugin for Unity had just been released, which was a real blessing. Being able to look-dev in real time (and it really is real-time, taking ~0.5s tops to update the materials in the engine) was invaluable, and the quality of the project would have suffered greatly without it.
My general approach to painting is to try and mimic the real-world “story” of the object as much as possible. Creating a convincing history for the object is a big part of making it believable, and Substance Painter makes this very straightforward, as it’s built around the idea of layering processes. I start by adding the raw materials, like metals and plastics, then any paint layers and finally damage/weathering. In the initial step, it’s important not to stick with a single generic “metal” material that you add everywhere you want metal. There are a wide variety of metals, each with subtle variations in hue, and selecting a few to use across a model adds some more delicate material variation. Steel is a cooly-colored metal in comparison to something like Titanium for instance, which has a goldish tinge.
Model in Substance Painter before and after Weathering.
Material separation might be king, but roughness variation is a very close second, and that’s what I try to focus on in the weathering stage. For me, this part of the process is very reminiscent of painting miniatures, where you’ve laid down your base colors and begin dry-brushing some scuffs and dirt on. Again, it’s all about building that history, so sometimes you have to cry a little bit when you add some detail that later ends up hidden. An example of this was around the Mech’s feet – I added some vertical scuffs that, while super simple, I thought added a lot. However, when I went back to the scene in-engine, I really felt like the Mech wouldn’t look grounded unless there was a load of mud that had built up around his feet, so I had to suck it up and cover my delicate work with some big splats of mud. Those scratches still poke through towards the top though, so it certainly wasn’t fruitless labour.
All the materials are approached in this way, and it’s a stage where you can have some fun, so sometimes it’s hard to hold back and not go overboard (a danger you’re always in). I enjoy texturing a lot more than modeling, personally, as you can spend forever thinking about what processes the object might have gone through over its lifetime, what damage it could have suffered and begin to construct a story for how it’s arrived at this point. It’s this stage where I think you really bring the character into a piece.
Everything here is using the stock Unity Standard Shader, with the exception of the road and pavement. Those are using a custom shader I made based on some great work kindly shared by Sébastien Lagarde. This technique uses various masks to offset a bunch of ripples, and dynamically create normals which can be used to refract the underlying textures. The Red channel acts as a distance field for each splash-point (dictating the size of the ripple), the Green and Blue channels store the direction to each circle’s center (used for normal generation), and the Alpha channel acts as a time offset (varying when each ripple’s splash starts).
Rain masks, by Sébastien Lagarde
Rain normals, by Sébastien Lagarde
This effect can be layered and offset to increase the intensity of the rainfall. It’s a very elegant technique, and the pseudocode you’ll find on Seb’s blog is easily adaptable to node-based shader editors; all nicely laid out and the math’s no more complicated than a Sin operation.
I adapted a few things to my own liking, such as a flowing stream of water, but it’s largely the same. I later found out this is exactly the logic the UBER shader package uses (on the Unity Asset Store), so if you want an easy solution with a few tricks built-in, that could be a good pick.
Almost all the lighting here relies on the Volumetric Lighting package created by Unity for the Adam demo, which is freely available on GitHub. There’s obviously a lot of volumetric fog here, but I’m using this more for the real-time area lights because they look fantastic! There’s actually no GI in this scene as it didn’t particularly benefit from it, so I decided to disable it. I approached the lighting in a similarly layered way to everything else, but I think it’s important to do this in tandem with your Post Processing. This is a very big point for me, so I’ll cover that in a bit.
I started lighting this scene by focusing on the ambient light. As it was low-lighting at night, the ambient color from the sky would be a big part of setting the mood of the piece, especially as it’s the color that’s injected into the volumetric fog. After that, I set up a single directional light to establish some form of directionality. Whilst it’s night and foggy/overcast, so shadows should probably be more diffused, this just helps the viewer read the forms a little easier.
From then on, it’s mostly a case of working from major to minor light sources, with the aim of staging the focal point in the scene; in this case the Mech. Some people like to have all their lighting based on real sources within the scene. This isn’t too important to me, as realism isn’t a huge focus of mine, and I think it’s more important to focus on what will help guide the viewer through the scene. I suppose it’s a question of whether your goal is to have a study of realism or just an appealing image. An example of this is a light I add behind the Mech’s head to lift it from the background, by blooming some fog. There’s no reason that light should exist in real life, but it helps the image read clearer. You can see a gif of this process below:
Gif of the lighting process:
Moving on to my favorite part of creating any scene; Post Processing. If I might get on a soapbox for a moment, I think the whole topic of the post (in real-time work anyway) is severely under-discussed by artists. It’s become a bigger thing for engines to tout recently, but few people are actually breaking down their post workflow, which can be discouraging to new artists who might not understand just how dramatic an impact it can have on their final renders. I’m not sure if this is because artists aren’t keen to show their render looking its worst, or because some tools (like UE4) do a fantastic job of setting you up with decent post out-of-the-box, leading to less awareness of its role. No matter the cause, there’s certainly a lack of conversation around it for something so important. Unity gives you no post settings out of the box, which is probably a big reason why some attach a stigma to it. I’m personally a big fan of starting with a blank canvas and building it up how I want, but to somebody who’s approaching the engine for the first time, this isn’t immediately apparent and can lead to them thinking the engine’s just less capable.
Here’s what the scene looks like with all post-processing disabled:
Pretty horrid. It’s washed out, the red light is clipping, and there’s not much balance in the scene. Again, this isn’t strictly how I approached the scene – I add lights and tweak post synchronously, as they inform one another significantly – but it’s mostly how it looked at the start.
The first and most important stage is in the tone mapping. I used the ACES Filmic tone map preset built-in to the new Post Processing package (for the record, this is Post Processing V2, with no third-party / asset store packages). I normally go for a custom curve, but ACES kicked out a pretty heavy/grungy look that I thought suited this scene well. This might be a little too much for some people’s tastes, but a lot of the contrast can be adjusted later on in the colour grading stage. The important thing to note here though is how the red Sentre light has been brought into range and no longer clips.
After this, I enable some of the juicier bits; Bloom, Screen Space Reflections, and Ambient Occlusion. AO should only occlude indirect light, so it has very little impact on this scene. When a render looks too AO-ey, it’s normally because the direct lighting is also being occluded. Thankfully I believe this option now comes enabled by default. Bloom helps the lights pop and is easily overdone, but the biggest player here is SSR. Without reflections on the tarmac, the road doesn’t feel wet and a huge amount of visual interest is lost. I really wanted the lights to dance across the surface of the water, and SSR is what does that.
After the fancy things are enabled, I move onto Colour grading. This is where you can drastically alter the mood of the piece. I cast the image in a blueish-green, as a homage to The Electric State, and also lifted the values a bit to soften the contrast.
Your lights really set you up for this bit; you’ve established your key values and colour groups, but here you can swing them to different extremes. This is why I love this part so much because you can create variations so easily, with drastically different looks.
Want your scene to look like a nuclear-irradiated wasteland? Push your greens and yellows.
Wanna jump on that Cyberpunk trend? Push the purples and pinks.
Anyway – back to reality – the final step I apply is just adding typical photographic / lensing artefacts like a Vignette, Chromatic Aberration and Grain. These all come down to taste but are probably best left subtle. I personally like fairly strong vignettes, and this helps frame the image by concentrating the values towards the center.
I always take 3 attempts at my post, starting from scratch each time (even if I think I’m happy with the first pass). Each iteration is almost always an improvement and helps me develop a better understanding of the scene.
Tricky to say, as I was working on this project alongside several others at the time, but probably around 2 weeks. The hardest part was just deciding on a setting for the little guy, as I had several ideas in mind, including cropfields (already done!) and alleyways, but ultimately I’m happy I went with this one. From a technical standpoint, it would obviously be the modeling of the Mech itself, and maybe the legs specifically. Interpreting the concept and making the mechanics look believable whilst also keeping the ‘pose’ looking natural was a bit challenging at times. If the legs were flexed too low, it looked very strange – too high, and it looked rigid and unstable. This is where the locator-rigged piston method I showed earlier came in super handy.
Cheers for looking and thanks for having me!