Saturday, 25 January 2020

Behind the Door-Week 5 - Polish

Polishing  the environment

Last time I posted about this, the environment was left in a somewhat weak state, it was very dark, and you couldn't see much. At this point I knew very well that I had just the foundation of an environment, it was also a very promising project since the mood and atmosphere worked very well. And after receiving a decent formative assessment, I knew that the environment could only get better. 


  Starting with a decent foundation, I knew that I had to build upon this and give it more details to add interest. There was also somethings I needed to add/fix that was negatively impacting the scene. So I took one of my screenshots and drew over it commenting on what I need to do and where new things should be. 
I found making this visual laundry list really helpful, since whenever I wasn't sure on what I should do, I could come back to this and pick something to work on. 

I really advise anyone to do the same, its a really great way of sitting down and figuring out how to finish any environment.


The ramp had this problem of having footsteps uniformly over all of the ramp, even in parts that don't make sense. This was a pretty quick fix since I could go back to the material I created, edit a few nodes and then get a version of the material without footsteps. From that I could then just vertex paint out the footsteps. I also added a few extra loops to the geometry this material is applied to improve the control of vertex painting.

Polishing The Master Material


The next thing I did was to work on the master material to allow snow buildup on any of my assets. I followed a tutorial explaining how to create a moss material that only applies onto the vertical axis of an object. The tutorial required you to create a material function for the moss material, I tried to change things around to create a snow material. But I didn't seem to get what I wanted. Here's a gif showing how this looked applied to one of my assets.


Parts of this work but its not doing what I want. It should be more like the image below.

I realized that I wanted to add thickness to the material, to look as if its piled on top of my assets, and so I needed to add some tessellation to be able to change the silhouette. 

Going back through the moss tutorial I realized I only needed a small part to create the material I wanted. The small part that I highlighted, was the relevant nodes to create a vertical mask on any asset. I took this out of the material function and applied it to my master material and made it so that I can turn this mask on and off. 

After some noodling about with the nodes, here what my result looks like. 


Although this looks fairly ugly at the moment, it shows what I wanted to create. I can control how much distance the snow pushes out, and how much it tessellates. I also applied some of my snow textures to it, so it will not be completely even and flat. I can also add my own artistic touch by vertex painting the snow out or back in. This gave me a lot of control on how the snow looks in the final renders. 

However there was one small bug that appeared from creating this mask. 


It seemed to appear as toxic waste on my ramp, and also pushed up the normals of the texture with it. It took some time but I was eventually able to fix this with help of one of my classmates Sophie Pette, she really helped to iron out the bugs. The cause of this strange bug was because my outputs of my nodes weren't clamped. So some of my outputs were breaking the material with high values. 

Snow Build-up


Another part that I wanted to fix was the build up of snow on the ledges. Before it appeared as a thin layer of snow, this was because it was a plane I created in 3ds max. The problem was that when the tesselation to the plane, you would be able to see holes in the geometry. However the way I fixed this was applying the snow material to a cube instead. I think one way I could improve this snow pile up is by curving out the edge on the top. Since snow buildup doesn't have hard edges to it. 




Decals

During the time between handing this project in and having this last week to polish, I worked on a different project. And in that project I created a sort of alien portal shader mainly using the nodes from Unreal. From that I got a better understanding of creating complex shaders, and I learned that I could optimize my workflow. Taking a large chunk of nodes from substance designer and instead having them within Unreal. My reasoning to do this, is that I am able to have much more control and add variation to textures/assets.

Exporting the greyscale heightmaps instead, I can color them within Unreal Engine by either lerping the texture with two 3 Vector Parameters. Another way would be to plug the heightmap into a gradient texture sample's UV's, and the heightmap will be coloured according to the keyed gradient map. With these two ways I can quickly change the colours with instances, or even add more nodes to change the colour based on the world position of the textures etc etc. Moving a part of the creation process to Unreal makes things more flexible and quicker.


With this decal in particular all I needed was a single RGBA texture, packed onto that were multiple masks such as patterns, dirt, and paint strokes. One thing I want to point out is that I wanted to have a sort of edge damage mask where the paint has been slowly chipped away at the edges. However I wanted the edge damage on just be horizontal so I can have multiple decals linking up with each other, but this posed a problem since the decals will have a harsh transition with vertical edges.

I can simply rotate the horizontal edge damage to be vertical and multiply it on top. However it will then be squared off and won't conjoin with each other, it would be a bunch of squares stamped in a row. To create a left and right vertical end 'caps', I used the linear gradient node and then used a cheap contrast to mask out one side to the vertical mask. I can than invert this mask to do the reverse. Then I set up the material so that I can lerp between these end caps, and now I have three instances. One which tiles horizontally. One that ends the decal tiling in a direction and the last instance is the reverse. 

This can be seen in the images below.





Another part of my decals I want to touch on was creating a scrolling mask so that I can select certain parts of a texture to only be shown. This works really well for textures with text, as in most cases there will be a lot of wasted space if each text has a separate texture. Instead multiple lines of text can be fitted in a single column. 




By using the linear gradient and cheap contrast nodes I was able to create this mask horizontal mask. I can control the size/width of the mask by plugging a scalar parameter into the cheap contrast node. 



As the name suggest this is a scrolling mask, so I can scroll the mask in whichever direction to single out what I want from a texture. However after later revisions I realised that this method was sort of broken. When you use a decal you will notice that the pivot point of the decal is in the center. The problem is that when you move or rotate the decal, there will be a distance between the texture being shown and the pivot. This can be a problem when you want precise control. I fixed this later by instead panning the UV's of the texture instead, whilst the mask stays in the center.



Adding more details

Within the environment so far, you can see that there is a clear lack of snow piling in any of the corners. And since there hasn't been any human activity for a while, there should be some snow piling somewhere. 

I sculpted a very simple pile of snow from a plane in ZBrush. As I may have stated before, I have quite a high tri budget for this project. And at this stage I've noticed that I have a limited amount of materials, but I still have around 20 to 10k tri's remaining out of the budget. I know that this isn't efficient but for my current scenario I really want to push this project to the edge, and use whatever I have left to polish this scene. So because of these reasons I opted for a more dense mesh (similar to a mid-poly) for these snow pile assets. 

Since these meshes have lots of ridges, when I apply a tiling snow material it would appear as if it was a snow clump. To help it further I can use plug in a temporal dither into the pixel depth offset of the material so that this snow clump can blend into other objects.

I also want to mention that the process for creating the icicles in the final scene, were made in the same way as these piles of snow




Here is the scene before adding the snow planes.




And now here is the scene after adding the snow planes. 




As you can see the snow clumps break up the uni-formality of this scene, adding a bit more randomness that real life has.

Fog

The last thing I want to touch upon is the fog I created in the scene. Previously I have touched on creating fog using the Exponential Height Fog within Unreal. However I have realised that increasing the thickness of the fog within the settings would lower the frame rate dramatically.

I read up on creating fog on Unreal's documentation, and I found that for my case it would be best to create a more local fog using particles effects. Having the fog be created by a particle system means that I can restrict the fog to a certain location. This would be beneficial in levels that would have different lighting/atmospheres. An example could be a level with both a dark indoor area (with god rays bleeding through any gaps/windows) and a bright outdoor area. 

To add a bit of extra depth to my fog I wanted to add a slight ripple  and movement effect. If you looked closely at some volumetric light in a foggy setting, you would see that the wind/air pushes the fog slightly giving it a wisp like quality similar to smoke. 

I recreated this effect by panning a cloud like texture over another static cloud texture, which finally multiplies on top of the fog material. This worked quite well, however it led me to constantly tweak the settings within the instance and the volumetric lighting to get a good result. Which you can see below.




Finally to see the final renders you can go to my Artstation or follow this link.



Conclusion

There are many things about this project that I would still want to fix or polish however it must be concluded at some point. I feel as though I made large improvements on this project since the formative hand-in. I was able to explore the uses of decals in-depth and how to efficiently create multiple decals from just one texture. 

I think that this project is a success in being able to execute a strong composition and narrative. The inspirations from brutalism was a real key part in creating the cold and oppressive atmosphere that is only heightened by the snow. The blood gives a real contrast with the white snow and adds to the unsettling mood. I set out to create a scene that is a strong entrance, however I feel the need to explore a larger scene at some point. I also need to do a scene in the future that isn't set in dark lighting, to better show the materials and models.

I feel like from working on this project I have a better understanding of unreal, that I can take forward. 

One thing I want to note is that I was able to have the time to add sound to my scene as well. I wanted to help sell the ambience of the scene. I combined two different wind affects to get an interesting texture, a long with a chilling alarm going off that is affected by distance. All the sounds were sourced from a royalty free website.




https://freesound.org/people/Zyrian/sounds/463690/

No comments:

Post a Comment