Thursday, March 21, 2024

Games Production: Major Project (Week - 25)

As my level progresses into the finalisation stages, I wanted to think about how to execute certain renders.

I had already made my marketing/brand layout, it was just a case of getting renders ready for photoshop.

Opting for 2 methods of renders, the main level renders would be done in unreal, then smaller asset/prop work, textures and breakdowns would be done inside of marmoset toolbag.


Here is an example of a slightly older engine test render.



This is an example of a prop breakdown done inside of marmoset toolbag, where I rotated the item and also put the visualisation mode on to render the wireframe seperately.


These are the examples of the logos I made inside of photoshop to show the more graphical elements within the level.


And these materials were rendered separately, but I stitched them together inside photoshop after they were rendered out of marmoset toolbag.


Costermonger Cart:

To fill out more space in my scene, I did some research into what potential props I could add to the scene.
I was told not to add any more assets to the road, otherwise it would block the main camera view.
So I opted to put another asset off to the side so it isn't disrupting the level design flow, but the player could go up to it if they wanted to look at the asset.

So I made this asset a Costermonger cart. After researching victorian goods, I had already made potatoes to go in the scene, then I came across a costermonger, of which is a vegetable and fruit travelling salesman.


Here is some references I pulled up for the costermonger cart, it had really nice shapes and silhouette, so it would be really nice to make this exact model.


The model only has 16,450 tris, which isn't bad for an asset like this, considering there is a lot of form changes and cylinders. The bit that heavily ups the tri count is adding boxes with vegetables inside it.

To create the vegetables I created basic shapes, in the case of the carrots, I made a basic cylinder with about 5 subdivisions, then using the soft select tool I pulled and pushed verts to make it look more organic.

MassFX Rigid bodies:

Then when I had finished creating the vegetables I wanted to drop them into the wooden boxes. To do this I used the rigid bodies modification. I placed all the vegetables above the crate then set these to my dynamic objects. I then set the crate to static object. I finally baked the simulation once I was happy with the positioning of the vegetables and deleted any that fell out of the boundaries.


When I was satisfied with all the placement of the vegetables, sent the meshes to texture inside of substance painter.


Here are what the vegetables look like after texturing them inside of substance painter - I opted for 2 carrots, 2 spring onions and a swede, I added rope on a plane as well, because I wanted to tie some of my onions up into bunches.


While I was at it, I also textured the cart. Making sure that it was worn and dirty as usage of this cart through fields and general ware would make it look like this.


With all the vegetables and wooden boxes in place, the tri count came to a staggering 98k - however, I wanted to make it as realistic as I could with my current skills and the tri count is something I had to sacrifice to do this. However, I plan on utilising this asset as a nanite mesh.
I applied material IDs to the final export so I could easily attach the relevant textures to the meshes.
Without the vegetable meshes and boxes, the cart itself is in the range of 16.5k tris, which for a hero asset, isn't particularly bad. It is hard to make something 'photorealistic' and game ready at the same time, it almost seems impossible to do this with tileables and a restricted geometry count.


This is what the model looks like inside of unreal. I really like how it turned out. Having the modelled assets really makes a difference.

This part of the map is nicely filled up. Furthermore, I have some audio playing behind the gate, with these assets here the player might be enticed to investigate this area and might stumble across the audio while looking at the assets.

Marmoset renders:

For the final touches I went ahead and rendered the asset inside of marmoset toolbag.


I added a shadow catcher plane in order to have some drop shadows on the asset.

After rendering the asset from multiple angles, I put it into photoshop to do my presentation pass and post processing.


This is the final result. I am really happy with how the asset turned out, it is one of my favourite renders out of all the assets I have created.

Lightswitch change:

I had some feedback regarding my lightswitch - it was recommended that I change it from the 6 switch design to a single switch that controlled them all.
However, all is not lost because I could reuse the six switch design elsewhere in the level and retain the same UV space.


Optimisation pass:

This was one of the more difficult tasks to undertake, not necessarily from an optimisation standpoint, but more for a quality vs performance standpoint.

I enabled profile gpu via the console command to see what was costing the most.
I noticed that it was lights that were the key issue.
To make it look nicer in some spots, I set the shadow default to raytraced enabled - to combat certain lights causing problems, I went into the light and disabled cast raytrace shadows and did this for all lights that were not affecting shadows in the scene, this mainly included bounce lights or lights that lit up dark areas, as the directional light would be doing most of the heavy lifting.

Another one that caused issues was my skylight - the skylight was profiling about 2.40, but since I downsized the cubemap texture size from 512 to 128, that statistic has gone down to 0.40



After checking my post process volume, I saw that hit lighting for reflection was turned on which was causing reflection costs to go up. However, shifting this to surface cache marginally improved performance and I also believe it looks better as it almost gives the windows a slight glare which when viewed from certain angles can be more realistic.

Sky colour changes via post process material:

After searching online on how to add some cheap volumetric fog to my scene, I came across this tutorial by PrismaticaDev - https://www.youtube.com/watch?v=7TXe1rgpW2c
I played with some of the original settings within the material instance that was created and it ended up adding to my sky. Rather than create a 'volumetric' per se, it instead indirectly added to my skysphere colour and made it more 'smoggy'


Level without fog post process material enabled.


Level with for post process material enabled.

It is a subtle difference, but I like how overcast it now looks with the extra hints of grey, furthermore the cream/orange offshoot of the volumetric cloud is now more apparent after the change.

Local fog:

I wanted to create some subtle low lying fog which could add to the atmosphere of the scene - I did this via a hanging particulates niagara system.
However, the majority of the control was within a material instance.

Affecting exposed paramaters in the material instance


The key to this material was the depth fade and absolute world position.
By multiplying the Z of the world position with the depth fade nodes, I was able to essentially drag the fade from the floor up to the top of the texture.
This way, the particle wouldn't just clip through the floor.
Along with various other fade options for the opacity, such as radial gradient exponential, this material instance gave me a lot of control over how the fog works.

Cloud light function:

For some additional depth to the scene, I created a light function for the directional light

I created the cloud texture within Substance Designer in order to make it tile and alter the levels, I did this with a simple clouds 2 and changed the random seed.
Various parameters on this material include:
  • Tiling (Able to tile to clouds texture)
  • Offset (Offset the original cloud texture)
  • Panner (Animates the clouds)
  • Speed X + Speed Y (Changes the panning speed on the respective channels)
  • Speed (Changes the directional speed for both channels)
  • Animated clouds? (Static Switch parameter so act as an on-off switch for the clouds to move or be stationary)
  • Intensity (Increases the outline of the clouds)
  • Contrast (Increases the gap between the light and dark of the texture)
  • Emissive colour (acts as a boost for the brightest value range)
Instead of trying to get the volumetric clouds to cast shadows, it was more effective to have this as a base light function for more control over the material, rather than relying on the shape of the clouds, giving the overall scene more art direction potential.


Litter:

Another piece of advice I received was to create some litter for my scene just to dirty it up a bit.
So the way I decided to put litter into my scene was via to foliage tool inside of unreal.


I created several meshes of already existing textured assets, such as discarded cigarettes, crumpled paper, squashed boxes and used these as my base meshes.




Tutor feedback:

Recently I had some feedback from craig regarding my fmp - one of the pieces of feedback was to do with the shop.
He mentioned that the shop needs some extra assets to make it feel more 'shop like' - which I understood.
However one of the points that was mentioned was to maybe add some tables with items on it, I decided to rule against this piece of feedback as there was minimal space between the counter and the opposite wall to justify putting any sort of object there without it feeling cluttered.



Here is a very rudimentary drawover for the shop, demonstrating the various lengths of assets.
Tables can vary in size, but in the case of a shop that has to demonstrate multiple items to be the most appealing to customers, of which I believe a reasonable size for a table like this would have to be at least 2m x 2m for the dimensions. Giving the player only 0.5 - 1m of room to walk by, I don't believe this would work for a shop of this size.


I did take onboard the idea of other items.


Here is a screenshot with some additional items. The items in question consist of: a chair, numbered metal jugs and a metal bucket.


For the jugs, I drew inspiration from this image.
Furthermore, I created 6 images in photoshop to correlate with the jugs in question, using this as a mesh decal on top of the jugs.

Number stencil created within photoshop

Chair Reference


Week 24 Feedback session

This week I had some feedback from my peer Din.

He gave me some recommendations for my scene, which I carried out.


One of the recommendations was to put some dirt buildup around the edge of this building as it looked a bit too plain.


Another recommendation he told me was to change the pipes a bit for variety - he initially told me to potentially rotate the bolted seam, but knowing this would have to be done in substance painter again, I opted for the easier option which was to create a material instance with a flatten normal node, I then put this on to varying pipes to break up the seams.


Though dyes were becoming more common as the British Empire expanded, he recommended I change the colours of the tiddlywinks, because plastics and plastic dyes were more expensive to make, especially ultramarine and purple dyes as traditionally blue dyes were made from lapis lazuli or Azurite.

- 'The earliest known blue dyes were made from plants – woad in Europe, indigo in Asia and Africa, while blue pigments were made from minerals, usually either lapis lazuli or azurite, and required more. Blue glazes posed still another challenge since the early blue dyes and pigments were not thermally robust.' -https://books.google.co.uk/books?id=P_Ixuott4doC&redir_esc=y

Tyrian purple dye was so costly because it was difficult to make. The source of the dye was the mucus produced by predatory sea snails found in the Mediterranean Sea.' - https://exhibitions.kelsey.lsa.umich.edu/ancient-color/purple.php#:~:text=Tyrian%20purple%20dye%20was%20so,found%20in%20the%20Mediterranean%20Sea.


He told me to revise the glasses, in references I found the glasses were more 'foggy' as victorian glass didn't use modern glass blowing technology, resulting in some defects in the glass. Furthermore, it was mentioned that the glass needed thickness, because the glass was touching the table before, it was recommended I add an extra bit to the bottom of the glass to make it look a bit more 'glass like'. I put the top bit of the glass and the newly added bottom part to different material IDs so I could control the glass to look different for both parts.

One of the things that was pointed out to me that I didn't initially notice was the floors being too low/windows were too large.


Here you can see the windows are quite large in this older screenshot



Whereas in the newer screenshot, you can see that the windows have gotten smaller - I used anchour plates on the side of the building, not only for decoration to fill out space, but to give the idea of structural integrity (for people that understand what anchour plates are used for).
the main problem I encountered was the leveling of the walls and ceilings, they were all too close together and when I put a measuring tool next to the window in 3ds max, I saw that the windows were almost as tall as my measuring tool (for reference I use 180cm as an average height for a 5'11'' person).
So the first thing I needed to do was rescale them.
Although the windows looked fine in a stylistic sense, these windows are more realistic to the actual size of windows, but also don't detract much from the areas that have been changed.

Wednesday, March 13, 2024

Games Production: Major Project (Week - 24)

 Potatoes:

The front of the shop looked a bit sparse. Although in previous weeks, I added a step ladder and a few additional props to the shop front, it still seemed a bit plain.
So I modelled and textured some potatoes. I modelled a total of 5 potatoes out of geospheres inside of 3ds max, using soft selection to make crevasses and lumps to make the potatoes feel more organic.
The beauty of using geospheres rather than regular spheres is I could cut the UV straight down the middle of the sphere and lay it flat. When you use regular spheres, you get triangles at the top of the mesh which can cause issues with the unwrap and make the texturing look unusual.
After I unwrapped them, I took them into substance painter to texture.

Potatoes inside of substance painter

Potato references

When texturing the potatoes, I didn't want straight from the ground earthy/dirty - I wanted them to look more dusty, my reasoning for this is I could have some of the potato skins exposed, whereas if I did it purely brown and dirty, the viewer could have possibly confused them with rocks or stones rather than potatoes.
Using a bunch of 'dust soft' masks and height maps, I was able to make my potatoes look like the reference.


For some additional narrative, I thought it would be a good idea to stack boxes with potatoes inside them and have one knocked over, revealing all the potatoes inside the wooden box.
Here I used a deffered decal with a leak opacity map which I had already used on my walls, I did this to cast some 'dirty water' look over the top of the potatoes, it almost feels like the dust/dirt of the potatoes has mixed with the puddle it sits in causing clumping of dirt into mud.

Scene development:


Here is a GIF of the scene development up to its current stage.
A lot of the most drastic changes include the lighting and post processing. Until I adjusted the lighting, there were many people telling me that the scene looked 'stylised' mainly because there was no buildup of dirt which was causing the scene to look stylised. But since I colour corrected it to be slightly more yellow than having the contrasting orange and blue colours, as well as the sharper and darker shadows, it looks more realistic and grounded.
From here it is just a case of onboarding as much feedback as possible and implementing said feedback.

Light switch Blueprint:


Here is an example of me using the light blueprint in the level, as you can see the lights, including the emissive, point light switch off, as well as the switches flick up and down.


This is an example of the blueprint set up, I will go over in detail what each section does.

Keyboard Input and Sequencer:

Initially, I tried investigating how I could plug in multiple values from one input, but the 'custom event' in this case the E key press, wouldn't connect to anything other than a single node. So I browsed solutions and found a sequencer was the way to achieve multiple values being changed.



I also reused first person code from my bell blueprint, as I made my bell move when pressed, so instead of casting to bell, I casted to the light switch blue print followed up by the custom event - so theoretically speaking, the keyboard input was cast by a line trace within the first person character point of view, which then triggered the code to run the sequencer with animations, toggleables and sound.

Point light on and off:

I added the lamp shades and point lights to the blueprint, replicating the same positions I had the lights at prior to the blueprint creation.
Using a clip flop, I had 2 states for each object (not just these point lights) I had a state for on and off. By toggling the 'new visibility' on the set visibility node, I was able to turn the visibility of the light off, then inverse of that, I left the other one as default to mean on.


Light switch animation:

For the switch animation, I set the pivot point for a single switch to match the ball joint in 3ds max, so the pivot could work as intended in the animation.


I then animated it with a set relative rotation, which again was connected to a flip flop to alternate between 2 states - either on or off. All I did was set the relative rotation to 45 degrees the play it on a timeline so the animation would be visible in the viewport.


Emissive scalar parameters:

I had an emissive channel on my light to help improve the light visibility and to act like the light was on without adding a bulb to the lamp shade mesh.
In my material instance, I had an emissive boost parameter, which essentially toggles how dark or bright the emissive light can be.


The off scalar parameter was set to 0 meaning 'off' and the on scalar parameter was set to 2.5, which gave it a nice glow - which were all connected to a flip flop.

Sound:


And finally was the sound, which was the most simple piece of the blueprint to complete - all I had to do was get to states of a switch sound, 1 for on and another for off and connect these to a flip flop and plug it into my sequencer.

All of these nodes were on the sequencer, meaning they could fire simultaneously - this gives extra depth for player interaction within my level. 
I originally thought this would be quite difficult, it wasn't too difficult, it was more time consuming than anything. Mainly because I had to copy and paste nodes several times over and copy and paste values into nodes.

Audio Design:

I wanted to add some more liveliness to my props when you interact with them.
So I gathered some items I had around my house so perform audio design with audacity.


Here is a Colman's metal tin that I used, I did 4 takes within audacity of me putting/slamming it down onto the desk, because the desk is made of wood, it would have the same kind of acoustics as the countertops in the shop.
This corresponds with the Rowntree's metal tin within the level.


Corresponding asset



I then attached the sound effect to a 'play sound 2D' node after the item inspect custom event.


I used a tub of rocks from my hobby collection to drag over my desk to act like I was putting down another item, which I assigned to the treacle can.

Background buildings:

One suggestion for my work was to fill out the space in the background. This proved difficult, Because the main building was already 3 stories tall, the assets that had to fill the space above had to be taller than 3 stories.
Using reference I gathered I decided to go with a cathedral and model a building based off what is now known as 'JP Morgan - Victoria Embankment'

JP Morgan building



Google Street view of Leicester Cathedral