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/

Thursday, 26 December 2019

1950's Alien Invasion - All Weeks - Part 4




Creating the vortex


I wanted to challenge myself with this vortex, I could possibly make something interesting in substance designer but that would require textures and would most likely be static without any assistance. I decided ultimately that this sphere texture should be made 100% in UE4. The texture of the vortex is fairly simple and would mainly be based around the Fresnel Function. Let's take a look at what I'm creating and break down each part that would be created in UE4. I also have to preface that I'm not super technical but I was able to get results I wanted, there might be more efficient ways but this is what I did.


So straight off the bat one element that stands out to me is the harsh bright edge of this sphere. This edge is much brighter and defined compared to the inside of the sphere. You can also see that there is texture on the edge which I think implies a surface. It does look like a solar eclipse but the information I see makes me think its a 3D shape that emits a light. You can also notice that this looks similar to depictions of black holes, this is because of the dark centre. 

To point out the colours, the whole concept has a wash of blue tint due to atmospheric fog. My interpretation is that the colours of the vortex are closer to a red hue because of the warm light the edge gives off.

So the three elements I have dissected from this image is:
1- Sharp Bright Edge
2- Textured Surface
3-Dark Centre. 


As I have said before, the majority of the work will be centred around using the Fresnel Function. Here is what the Fresnel looks like. It already almost looks like the concept art.


I wanted to isolate the edge so that I could make it have a sharp contrast of colour. I used a CheapContrast node to do so.


To add the colour I just simply multiplied it on top the CheapContrast.


The base colour of the vortex is a bright red that darkens to a darker shade towards the centre. I used a Lerp node to add two colours together and using the Fresnel in the Alpha. The Alpha controls the distribution of the colours, If I were to swap the inputs of A and B the result would be a dark edge and bright centre.



I wanted the centre of the Vortex to be much darker than it already is. To do so I divided the Fresnel to make the Fresnel darker, I then used a CheapContrast to control the harshness of the transition. To add this darkness to the base colour, I used a BlendDarken node to only darken the centre.


This is what it looks like with everything I've created so far. As you can see the colours look pretty dull.

 
By multiplying the result so far I can increase the brightness of the colours, and since this will be an emmisive, the colours should be bright.

So far all I have are the Sharp Bright Edge and the Dark Centre. I now need to add texture to the Vortex.


My process in creating the texture is by Panning a cloud like texture, this is to add variation of colour and give a sense of shape. Giving a rotational affect will make it appear more as a 3D object than a Static Image. 


The variation only appears in the red belt since the panning cloud is multiplied on top. You can also see that the bright edge is barely affected, this is because the values of the edge are so intense that this variation does nothing to it.

 

Since multiplying the cloud texture on top of the vortex made everything darker, I decided to multiply it again by a static value so that there is more contrast in the sphere. 


Finally I wanted to distort the shape so that it would look more unearthly. One thing that should be noted is that due to the tessellation the affect is more intense close up in the editor than it is in the playable level. Because I wanted to make it constantly changing as well I decided to pan the displacement texture as well. 

This is what the texture looks like within the editor.
 

----------------------------------------------
There is one final thing I wanted to note that I couldn't really find where to place. But it needs to be said somewhere. 

So in my UE4 file I had this problem that whenever I pressed play level, the scene would look a lot brighter than it did in the editor. As if there is auto exposure enabled. This is strange because I had already disabled the auto-exposure in the project settings. What I found after a long time of pulling my hair out is that the camera attached to the 3rd person character had auto exposure enabled. However if I turned off auto exposure I would have the problem of the scene being darker than it is in the editor. To fix this problem I changed the min brightness as the same as max brightness, which essentially disables auto exposure as it will stay at a constant value.

 

Final Screenshots

I think one problem I seem to have with every project is not having enough time to light the scene properly. And it seems like this project will be no different. I will however take this advice into FMP, because I will actually have time to properly light my project.

Now I want to show a before and after.


In this image I have the bare bones of lighting, I have a directional light and sky light for the light coming from outside of the shed. This does cast an interesting shadow on the floor, however my problem was that the shadows are wayyy too dark. So dark that it wouldn't be fixable with post processing. 

I found the way to fix this issue was to bump the skylight to an insane degree, and add a few point lights with inverse square fall off turned off. My reasoning behind this was to fill in the space with more bounce light that I wasn't getting from my directional light. If I only depended on my directional light, then the colours of the scene would be bleached out. 

Overall I think there is definitely a lot missing from this scene, the ground texture should be hay and dirt instead of the grass that is there. There should be stacks of hay everywhere. And the cherry on the top would be "Red Weed" or red vines everywhere. Which would help portray the idea of an alien invasion. There are also somethings in the scene already that I would tweak with. But at the end of the day I have to remind myself that I was able to create this in just about 2 weeks. And if I were given more time I could improve this scene by a mile. 







1950's Alien Invasion - All Weeks - Part 3

Finishing the Car

I wanted to separate the car into it's own section as there is a fair bit to talk about. The first of which is creating the car tire. It's my first time creating a car tyre, however the process in how to create one is very similar for something that I did in my second year. The first part is creating the treads, if there is any design to them then it must be made so that it can tile repeatedly. 

Once you have a small piece you can duplicate it as many times for whatever diameter is needed. I'm never quite too sure on how long the tread strip should be, so I always make a copy of the model so that I can just go back and forth until I get the right amount. Create a circular spline, or select and edge loop on the edge of the car wheel and 'create shape from selection'. Then using the path deform modifier, play with the settings to get a decent result. If the strip is too short or too long, undo your actions or change the duplicate you made. 



This is the end result. It's fairly simple and works great. A piece of advice I would give is to make sure that you path deform the low poly, since you can always add extra loops afterwards to change the smoothing of edges.


My approach for the creating the car, after you last saw it. Was to focus on what can be seen from a standing or straight on view. I don't need to create the bottom structure of the car, since it wouldn't be seen. However, if there are any gaps that can be seen through, such as the front and back fenders. The wheel does cover up most of the space, but there are still gaps. My solution to this was to have a some solid walls that's roughly in the same shape as the original.


Some of these parts underneath I deleted later on, because they couldn't be seen. Such as the purple model. 



Although I came to the decision to not create the underneath of the car, I still gave it a first attempt and found lots of relevant references to help with modelling. I found one video especially useful that was showing off the car in an aim to sell the pickup truck. Click Here





The wheel was created in slowly building layers. Since the location of the wheel is inside a barn and attached to a farmers truck. I thought that there would be some dirt build-up from both use and due to the location. However I wasn't wanting to coat it in a thick layer of mud, since I wanted the wheel to have roughness variation from the rubber to metal. I found through my research that even moderate use of the car will lead to some sort of dust/debris building up in the treads. Although my ref was mainly used to inform the shape language of 1950 tyers.

 


This is what the car looks like in Substance Painter. As you can see there is only one headlight glass and one tyre, these will be duplicated after texturing to be efficient. My thought process for texturing the car is to be used but not rusted. There would be areas of rust starting to expand from crevices and concave shapes that would water would build up, leading to rust. To add contrast in the roughness I would use both dust, rust and mud to break up the reflective metal paint. And since its been a while since it was buffed, the metal sheen wouldn't be as present. I looked at references to help support my decisions and texturing. 

(I focused on using the blue car near the middle as my main point of reference, and use other references to help guide other details.)



The windows are blacked out and dusty. I know that dark windows are un-realistic for a 1950's period time, however this has the purpose of blocking out the insides of the car. If you could see through the window, I would then have had to model the interior. The bottom line of this project was an environment, the vehicle is a hero asset but still part of a whole environment. I had to choose where to put my time wisely since I realistically only had 2 weeks to create this environment.  



There are some critiques I have for myself. One is that I should have probably added more loops to the bonnet/hood of the car so that its a smoothing curve in the silhouette. There are also some elements of the car missing entirely. Such as some side grills, chevrolet iconography, side mirrors, rear lights and a license plate. Some of these details are fairly minor and don't affect the silhouette of the car so it wouldn't be noticeable at first. Only on a closer look will anyone realise whats missing.