Monday, March 18, 2019

The final update.

Since my last post I've changed a few integral parts of my project that wrap it up to be a few steps from being finished, most namely enclosing off the environment, increasing FPS through optimisation so on and so forth. Little changes that mean everything when it comes to turning this whole progression into a fully functional stand alone environment.

 Since my project is so closed to being finished I thought I would wrap this blog up with a final post of the progress since its start and finish with a final tour of the environment. 

Here are the screen shots of the final project!




Please note that some features such as the tilting ground textures will change!, these photos are more or less the end product give or take a few small things. 

This is a video of the environment (please read caption)

https://www.youtube.com/watch?v=CqqDrBA-3U4&feature=youtu.be

This video was taken on a very old laptop, FPS isnt representative of the final product


This project has been very fun!, I've learnt so much and I've also learned what I would change for a project of this calibre next time. I believe the environment I chose was too big. It meant a severe lack in quality in places and this really shows. However, the whole experience has been very enjoyable.

Monday, February 18, 2019

The end of the FMP is nigh.

I've recently held back from posting on this blog, this is mainly because the progress of the FMP is rather bland. Its simple texturing and rendering of small assets to make the project feel whole. But now the project is nearing its final destination I thought its now time to upload a long list of changes that have occurred since my last post.  I have finally got the project to a standard of which I'm content with. This screen shot is the standard of which I want my final project to be at and still run at an FPS acceptable for a high grade. As of now the lighting builds weirdly into not reflecting the quality of this screenshot. Thus more work needs to be done of the FMP, saying this, I'm happy with the current project and am finished adding more assets or changing the landscape. It needs collision to be added and such but as it stands this is the quality of the final submission. 




I'm rather proud of the outcome so far. I believe this is up to a standard in which a real game could be marketed with. Ofcourse there are changes I would like to make, most namely being, smaller assets in which describe the story and follow a narrative through the level. However as I am one man with five other modules there are limitations to what I can achieve. 

I'll start a list of the changes I've made since my last post in order of what I deem to be the priority. 

- No more cel-shader
- Tree textures
- Fixed gate model
- Animated dragons that give life to the environment
- 2 Dojo buildings situated to the right of the temple
- Improved pond textures and micro environment
- Textured static dragons
- Textured buddah
- Tweeks to the temple textures, temple foundation textures and more....
- Blossom leaf particle effects
- Tower remodelling 
- Mountain planes

Cel-Shader

The cel-shader offered a unique style. This style separated me from the rest of the crowed. It allowed for individuality through styalization. This would eventually mean I have a better chance of getting a specified job within the industry that adhered to this style. It also means my FMP doesn't have to reach a realistic quality that artists have the bar of so high. 

However ultimately my project does look more authentic, natural and aesthetically beautiful without it in my opinion. So regardless of those key factors I want my FMP to look the best it possibly can. 

I posted an image on Facebook of the before and after to gain some critical feedback from a general popular that would infact be my clientele later down the line. The feed back was overwhelmingly positive and the consensus is that the environment without the cel-shader looked best. 

Tree textures

Although its just another model being textured in the grand scheme of things. The trees being textured helped fill the environment. Helped really make it feel complete. So this was quite an essential piece to the puzzle. 

The tree texture it's self is far from perfect. It has a clear seem directly down the middle of the trunk. This can be fixed if I have to time to go over it. If not I will direct the trees in a way that the seem can't be seen from the fixed walking direction the character is forced down.

Fixed gate model. 

The gate needed complete revaluation, it was missing faces, the textures were of a bad resolution, the detail to the model was moderate at best. I've revamped it so when close to the model it still retains as much screen priority as it does when you first spawn in the game.

Animated dragons

This was a large step off the road. I didn't even know if I could animate a dragon. I simply did it because it thought it would bring the environment to life. At first I struggled greatly. I used the already built in presets of animation for a CAT rig within 3DS MAX. This was not how a dragon files so i scratched it and reanimated it from a fresh start. My thought process behind the animation was that a dragon's structure is much like that of a tail. So if I made the whole CAT model with the kenetic formations of a tail within max then it would easily allow me to CAT pose the model and create key frames to auto animate. Getting the free forming movement of a tail is surprisingly hard. The biggest problem with this was actually the auto-key. The auto-key kept building the movements in a way that didn't suggest a constant wave going through the tail. So I had to either add around 16 key frames to give max a better idea of the movement I'm going for. Or pick 4 very precise key frames that allow max enough information to build a movement I'm happy with. I went with the latter. Although its still clunky its not the a level I'm unhappy with. So i kept it and added it. The only problem now is the textures. In which I will revisit soon enough. 

The reason I added dragons and not another creature was because I already had static statues honoring dragons within this fantasy Chinese environment so it would make sense for the statues to be built around existing creatures in the fantasy universe. The rough idea is that the dragons were also being hunted in this magical world due to being pure magic beings and also found refuge on this island along with the magic wielders finding refuge on the island. Thus you can see sleeping dragons around the environment and such. Which is a nice effect.



Within this picture above you can see the new water shader and also the dragon in the top half of the picture. The dragon is attached to a spline that loops in a pattern. This gives a simple effect that the dragon is constantly flying around the environment. 

You can also see the mountain planes in the background. This really gives the illusion of seclusion as if there is something more beyond the green hills of this temple ground. And are very cheap as they are simple alpha cut outs. They are actual photos sourced from google images. I will make sure to fully credit the photographer as this is actually the single and only aspect I have sourced from the internet and used within my project. 

2-Dojo Buildings.

There's not much to say about these Dojos. They were mostly a spur of the moment creation, like much within this project. The texturing is was a simple process that followed the same pattern as most of my buildings in this environment and its the same for the modelling process. The tiles of the roofs are the same as the other buildings which made for an easy build. I've tried to brand the custom made Chinese logo I've shown previously into as many buildings within this environment as possible to give it Identity to the people that It was originally built by. 

Quality of life changes. 

Quality of life changes are just as the subheading suggest. Small changes that make the quality of life for the character within this environment a bit more enjoyable. In short, Wind movement changes, texture saturation changes, landscape changes, contrast changes, so on and so forth. Simple changes that can add all the difference. The devil is in the detail as they say.

Buddah, dragon and tower textures. 

Some of the feedback I got given from changing futures week was that the tower textures were too low res for quite and important building within the environment, so I upgraded them. I've also added a jade smart material to the dragons and Buddha. In a real environment this amount of jade would be completely unrealistic but because It's a fantasy environment I believe I can get away with it. There are changes that need to be made such as adding a sub-surface material to it to allow for some translucency in the gem stone to give it a more believable feel. 



Overall the project so far is going well and very nearing its end. Apart from collision and a few texture changes, maybe some more particle effects the environment is complete. 

Friday, January 25, 2019

Week 14 

Big update!

So this update is quite large. So I'm going to give you a before and after from what it was in my previous post to now. This is so you have some relevance to go off on how much its changed and what has changed.



As you can see just from the front view dramatic changes have been made. Most importantly the temple in the background has finally been textured. Seeing as this is the biggest change I'll start with it.



The temple has been reduced from 85.5K triangles to 55K. This is a loss of almost 30K triangles nearly cutting it down by half. As you can see there is no real change in the geometry from the first temple to the second in the before and after picture. The reason the temple has been further cut down isn't because of performance but actually because the UV unwrapping of the first temple was abysmal. It was awful. So, to fix this, I had to actually remodel the entire temple apart from the walls. This took an approximate 3 hours to do simply because I had a temple to already go off. The way I molded the temple made it both efficient in time and UV unwrapping space. A big thanks to my tutor Ian for helping me. 

The texturing of the temple took a while to establish. The thought process behind how to texture it was messy. I went through many different ideas. I started originally by handpainting a seamless wood texture and then applying it to the UV map. Although this looked effective it didn't fit the style unless I hand painted all the textures. Given my time frame this wasn't an option. So then I opted to using substance painter materials. The material I have mainly been using for all my models is a wood texture that has variation of normal strength. This is good because not all wood would look the same. Although I believe all the structures would be made out of all the same wood as the trees were sourced from the same environment. 

There are still a couple of things that need changing with the temple. For example the specular reflection on the roof is too much. The colour of the walls doesn't match the colour scheme for the rest of the environment. The roof joints still need to be textured. They only have a simple green material on them that unreal supplied. 




I've stated previously that the normal maps appear weird when under post processing effects due to the cel-shader. However, in this picture I actually do not mind it to much. I think it adds to the style more. So I might not try and fix this visual interaction. 

The only problem I have with using substance painter is that I feel as if the textures aren't mine. Everything within this environment was sourced by me. Either I took the photographs or painted it. This for some reasons bugs me but I guess this can not be helped. 

I made some alpha maps in order to add to the Chinese aesthetic. In which I then just converted into a normal map within substance painter. 



Although the one on the left doesn't look too good at first glance when converted to a normal map it turns out fine.

Next on the list is the flags.

 The flags were a very long process. Not modelling wise but trying to get the animated within Unreal Engine. I first tried to add a cloth simulation to a model within max. Collapsing it and baking an animation. Then reversing the animation so it looped. It didn't look great but each flag on the model was uniquely animated and it looked close to how Tibetan flags fly in the wind. The problem with all this after spending a substantial amount of time on creating this was that I found out Unreal Engine doesn't support vertex animation... This was a huge waste of time. But I learnt something. So then I went on to plan B. Actually using blueprints to get an animation working. This didn't work so then I had to make a plan C. It turns out Unreal Engine has a great cloth simulation built into it. 

The engine requires a hierarchy of models for this to work. You need to link the flag as a separate object underneath the rope model. This is so when you import it as an FBX the flag is a bone of the rope. Then by painting the weights within the engine you can tell it where the flag attaches to the rope. Then by drop and dragging wind from the engine search bar it then automatically works. This was a very informative tangent I unwillingly went down and I'm glad I did. The reference video for where I learnt how to use this cloth simulation with in unreal is here - > Thankyou to this guy

                            https://www.youtube.com/watch?v=kjOq8OB_3AQ&t=317s

The only problem with this simulation is I'm yet how to work out how to get the wind to treat each individual flag differently because at the moment they all move near identical to each other. Changing the physical model of each flag does not change anything, nor does detaching them from one object. So the only Idea i can think of is through either scripting a wind radius as the wind radius within unreal engine doesn't seem to work too effectively. I think this is because the scale of my level is a lot larger than its Intended to be. 



Next I'll talk about the new gate model. 

So this model was more basic than it is now. This is due to the poly count on the temple decreasing, allowing me to update models that do not match the rest of the environment in its detail. The tiles are identical to the tiles on the temple to keep thematic consistency. I've textured the walls with the self made alpha maps. The normal maps on the circle entrance are very strong and need to be bought down. Apart from this I'm happy with the texturing on this wall and claiming it to be finished.



I've also changed the fences to be more wooden in nature rather than golden metallic. This is so it fits the environment to a greater degree. 

Because of how contrasting metallic maps looking within my environment I've used them sparingly to bring attention of not only your eyes but of your thoughts to sparingly make a reflection of a temple that is not great in wealth but proud aesthetically. 

Lastly I've added a foundation base to the temple. This is because the temple resting on solid ground looked unnatural to a real life Chinese temple. It also adds greater dynamic to the map layout so it's not boring walking around flat ground. 












Wednesday, January 9, 2019

Week 13

Post Christmas holiday.

I didn't touch my FMP during the Christmas holiday simply because of the vast amount of work I had for my other modules however since being back for a day I have added a few changes to the environment. 

First of all the second presentation of the year gave me some valuable information. This presentation took place on week 10 of University. After my presentation I got given 4 sets of information I need to work with to improve my environment.

- I need a way to blend the spawn zone of the environment into a bigger setting so you cant see the end of the world terrain.

- I need to re texture my rocks as the texturing doesn't resemble rock.

- I need to resize my large trees as they do not look realistic (in terms of proportion)

- I should focus on my temple when it comes to texturing before anything else.


I will work on this information as soon as possible. For now I've added simple pond plants and other flora to decorate the inner area of the temple and fill it out from the emptiness that it was. Attempted a few texturing tests around my environment to try and grasp a style. However, for now I will try and match the texturing to the aesthetic qualities of flora, which is quite basic, calm colours that blend in well with each other.

All the textures at the moment are just placeholder. There are a few problems I need to address. For example the resolution of the lake floor although being 4096x4096 you can still see pixelation in the grounds normal maps. This might be due to the cel-shader not being able to render normal maps correctly due to only a two tone lighting system which makes the normal maps come out strange and not correct (this is also an issue I need to fix). 

Metallic maps and roughness maps seem to work correctly however they bring out a contrast within the environment that contrasts with the style. Meaning it doesn't quite fit the washy colour scheme and makes a very strong colour.







This is the area I need to make fit into a larger environment to keep a consistency of the "illusion of seclusion" functionality of a small game environment. To address this, I will most likely create another terrain past the one that the player spawns on, and then map planes with tree alphas on top to give the illusion of a forest surrounding the temple. 









Monday, December 3, 2018




Week 9

This week made more additions to my organic modelling collection. New asetts that have been created - 

- Rocks
- Large Trees
- Buddha

The rocks are approximately 1K Tris each. I didn't want to go beyond this as rocks can be achieved with a significant low poly count using baking methods. I went with more runic shaped rocks. By this I mean rocks that would be seen around altars or henges across the globe. An example of this is of course Stone Henge which although native to England, still boasts magical presence with the shape of its stones. I didn't recreate the structure as that would of been out of place within my environment just the shape of the individual stones.

 The tree was a little different from the usual modelling process. This is only because the polygon density needs to be higher at eye level rather than at the top of the tree. Meaning I had to use poly paint to zremesh within zbrush. Polypainting excels at specific tasks such as this one. 

I also worked with the re-topology of my dragon. Originally it was dynameshed and imported straight from Zbrush. This was a problem due to two factors. One the normals of the model were wrong. Secondly the engine finds reading a irregularly triangle mesh much harder than a good working topology. 

This also means its much easier to UV unwrap and the seems wont be quite so noticeable. I'm still currently struggling to retopologise the Buddha. Mainly because the face wasn't symmetrical which makes attempting to get a good zremesh topology near impossible so i believe I will have to remodel the head of the Buddha. However apart from that I'm happy with the robe and hands.




Friday, November 23, 2018

Week 8 

After optimising my level better i can finally add more models and detail to the environment. The first step i wanted to cover before importing new models was the finalisation of the temple.

The temple has been an on going issue. The first problem was its polygon count, which I've managed to fix and reduce to 87K. The second issue I came across was that the temple was not welded at certain parts which mean light would break through the roof. It wasn't a solid build. To fix this i welded the corners and roofs together making it one solid piece. I then experimented with attaching the roof parts and the walls into one mesh, then duplicating it two times, re scaling and attaching them. Approaching the temple this way would mean i would only have to use one draw call of 4096 x 4096. This is a lot more efficient and would be ideal. 

The main problem with this was that the lighting of the temple within the engine wasn't building correctly. It  took a few hours of understanding how light maps work to fix this. Light maps are simply a separate UV that unreal automatically creates. It works much like the flattening map function within 3DS MAX in which it creates individual islands for every polygon within the UV. However with a model that has 80K polygons the Light map resolution would have to be roughly 8196 x 8196. Unreal only lets you create a light map resolution of 4096 x 4096. This meant i simply couldn't have a single mesh sharing one UV with such a polygon density. Thus i had to readjust how many models I split the temple into so unreal engine could build the lighting with no problems. 



After finishing the temple it was time to add more models to my scene to fill it out more. I started with walls surrounding the perimeter because I wasn't happy with the current set up. After researching traditional gates and towers that surround a historic Chinese temple I applied the most common recurring theme to my environment. The build it self wasn't complex and i managed to keep it relativity low polygon.



I then went on to create a shrine in which I could place the Buddha which in my original concept drawings would of been within the temple. But since the feedback i got given I decided to instead put it outside and work only on the outside environment. This meant creating a shrine in which it could be placed.



After this i went on to create fences that fit more to the theme than the bamboo originally did. I then also added a lake terrain box so it wasn't the standard terrain surrounding the temple grounds. This will allow me to add tiles or ground textures with custom normals, roughness, speculars so on and so forth achieving a higher quality finish than standard terrain could create. 



Lastly and most importantly I decided against using the outline blueprint within my environment. The main reason for this was that it was clashing with the ability to create dynamic lighting, god rays, volumetric fog and dynamic shadows. These 4 aspects are the reason unreal engine thrives graphically over unity. And since I chose unreal for its better graphical implementations I decided i should make use of them. Over all it has greatly increased the aesthetics of my environment and unless i can work out how to manipulate the blueprint to still allow for these graphical enhancements to occur i will not be going back. This also means that my original plan of having a high polygon count on technically implemented models was wasted and I could infact get away with greatly decreased poly counts on models such as the temple as there is no outline giving the suggestion of the polygon count anymore. This art style is more representative of games such as Zelda: Breath of the wild rather than my original inspiration of dungeon defenders. 




Saturday, November 17, 2018

Week 7 - Optimisation 

My project finally starting hitting the breaking point of optimisation. I had never made a unreal engine project this big before so i didn't know the limits of the engine and how far I could go before it started to drop below an FPS that was optimal. 

This didn't mean i had no awareness that 200K tris for a building was abnormally large. I was aware through the teachings i've received what should be expected of polygon count but without breaking the system my self i would never have known how far i can go and how far i should be going. 

The most taxing part of my project so far was not even the polygon count it was more the amount of alpha planes the engine was trying to compute. But i'll break it all more down in the proceeding paragraphs. 

List of assets that have been optimised -

Temple 207k Tris -> 99k Tris 

150K Grass Plane Foliage -> 56.7K

Blossom 10k Tris -> 6k Tris

20 Tree Foliage Instances -> 14 Tree Foliage Instances

Baked shadows off on Blossom Trees

Static shadows on all objects from half dynamic

Cull range from 0 -> 5K on all grass foliage

Environment change for linear movement to reduce polycount

The temple.

The temple was exceedingly large on the polygon count. The polygon count reduces performance because of the amount of individual faces the engine has to calculate how the light responds the the normals and smoothing groups being applied to the model. The temple is made of approximately 52 individual models, majority of them are duplicates and varied in someway meaning I could easily then unwrap them and attach to share the same UV space.

This allowed me to combine the entirety of the 52 models down into a mere 12 static mesh instances. Each of these static mesh instances is it's own draw call. This is optimisation for the future when I move on to texturing.  

The cel-shader depending on how its coded in the blue print can either allow for outlines around smoothing groups (or, and) around the geometry of the building. So I tried to keep the integrity of the shape as much as I could when cutting the Tri count down. I won't to greatly in detail of what parts of the temple were more or less efficient than others but I will outline the ones that were great or the ones that were terrible. 

The walls of my temple were by far the least efficient. This is simply because I'm now focusing on only the outside environment I didn't need double sided meshes to block light from penetrating the walls. Meaning I could model simple plane geometry in the shape similar to the original. Just cutting the shape of the walls down meant removing approximately 16000 Tris. 

Each polygonal instance of the roofs were around 5000 Tris. I managed to cut each instance down to around 2500 which meant around Half my Tri count was obliterated. The fences were 16000 Tris which is so ridiculously large that I just deleted them instead of trying to find a work around. I will most likely remodel a lower polygon version. 

You can naturally tell a difference between the high poly and low poly in engine. However as I anticipated it's not anywhere near enough to justify keeping a static instances that doubles the lower poly. If in the near future I find a problem with my engine that was costing severe performance and fixed it and can in fact use the lower poly as a LOD and not as the mesh I will do so. And if I further need to optimise I will LOD the lowerpoly and use this aswell. 

                98k(not in scale)                                                           207k

Foliage

I've never worked with foliage in unreal engine or even unity for that matter so it makes sense that I wouldn't know the limitations for quantity within an engine. Nothing surprised me immensely about how little or how much you could push it before you dipped below 60 fps. However I've learnt much more than I thought I would in terms of foliage within a game engine.

Firstly the blossom tree, I managed to cut it down from 10k to 6k. The trunk of the tree was roughly 2.1k which I then cut down to around 0.8k already taking off 1.3k Tris. The leaves were 8k Tris. I realised that the amount of planes within a fibermesh instance in zbrush does not dictate the amount of leaves. The amount of leaves is a variable decided on the alpha texture, this meant i could drastically decrease the polycount and even increase the quality of the tree. 

Iv'e decided to keep both meshes but mostly use the 6k and then dot the 10k around for variation in colour and size. This all together cut down around 120k Tris from my scene. 

I turned shadows off the blossom trees for now because calculating where light doesn't penetrate in an instance of 4K alpha planes is very taxing.

However I was a little surprised to find that the most taxing aspect of my FMP so far was indeed the grass planes. I expected the process of optimisation to maybe involve reducing the plane count but not so much on the use of lighting. However static shadows are essential for aesthetically pleasing foliage so I kept it on and simply reduced the amount of planes instead. 


This is with the amount of planes reduced. As you can see the grass foliage is still "extremely bad" meaning I'll need to possibly increase the size of the grass on the texture to reduce the amount of light that can get through the plane, increasing performance. 

Its also important to note I've decided to change my plan of the environment. Originally I was going to let the player run around the forest surrounding the temple. However because of the player perspective if i do this it means i cant reduce the grass planes on either side of the main path. However if they are forced down a linear path then because of their eye level its a lot harder to make out the grass plane count across the field as they are all parallaxing and its not been viewed from a top down perspective. 

So far this is all the optimisation I've applied. I will find that I'll need to optimise more when I start bringing in textures with draw calls, more models, particle effects, animations, terrain instances and high resolution mountain textures for around the environment. But I will cross that bridge when I come to it. 

So far I've managed to increase the FPS from 80 to 130 in a single day with very little loss of quality and an even cleaner temple build.