Friday, 26 May 2017

Rendering and Lighting for Computer Games Animation - Summary

As I round this unit up to nearing a relative end point, I feel I am at a decent place with my scene, having followed up on a couple of points raised within the peer review, namely the extra light to be added within the end detainment cell, and the slight gain on the yellow/orange hue within the manually created god rays, these two alterations can be seen below, and I am happy with there changes made, as I feel they do benefit my end product.



I feel I have learned a reasonable amount about lighting in a short space of time, which was absolutely necessary when essentially going into a unit completely blind, with no prior knowledge in lighting methods and techniques.
Though my scene is not without its faults, as I feel time constraints have limited my mesh creation, and I would like to have a more populated scene, whether this is in the detainment cells or around the office space.

I still have a LOT to learn about lighting, but as it stands, I am happy with my end product as it stands.
For further development, I will be looking to make more meshes whenever I have the chance to add to this scene and populate the area, this is a big deal to me, as I feel my I am a competent modeller and my modelling is strong enough that I should be able to produce a set of models and textures to be combined into a quality scene.
With further research into appropriate lighting for a scene like mine, the scene may flourish more also, and so I will continue researching lighting techniques also when I have the time.

Rendering and Lighting for Computer Games Animation - Rendering: High Quality Screenshots & Sequencers

As a matter of rendering out still images and video of my scene, I needed to create a sequencer within my scene.
This was a new piece of Unreal Engine to me, and whilst I already know how to use matinees and timeline key framing, it proved to be somewhat tricky, with certain restrictions in the sequencer causing rotation issues and unnecessary problems. These are usually to do with the fact that the camera track does not operate on a 360 degree turning circle within a sequencer, operating on a +180 to -180 degree range instead. As such, I attempted to sort out the rotation issues by using some maths to translate the rotation values to a 360 degree based value.
I implemented a simple 3 camera setup, showing the main three views I feel define my scene, the three being the overall front of office and desk area, the cell/detainment area and the desk itself.

I also took multiple high res shots using the command line function, rendering out multiple screenshots at 4K resolution, and even took some experimental shots at up to 16K, though these are not shown here, as the quality difference is pretty much unnoticeable, especially when viewed on a monitor capable of displaying in only 1080p resolution. I tried experimenting with these resolutions just to see just how much detail I could actually get into a screenshot.

A selection of my screenshots, and the short, simple sequencer capture I produced can be seen below;









From this point, I would be looking at summarising and detailing any changes made in my first changelog as and when necessary.

Rendering and Lighting for Computer Games Animation - Peer Review

As per usual with a peer review session, I came up with a series of questions on which I felt I required feedback, with this in mind, the questions I asked were as follows;

Q1. Do you feel the colour/tone of the god rays are suitable for the scene, taking into account the colour of the skybox in engine? If not, what adjustments do you feel I could make to the god rays to make these more appropriate?

Q2. Do you feel as though the desk area is lit well enough? if not, what would you suggest adding to the scene to light any of the darker areas?

Q3. Do you feel the detainment cell area of the scene is well enough lit? if not, do you have any suggestions to improve lighting in this area?

Q4. Do you feel the dimly lit approach I have taken is appropriate for the scene, or would you prefer a scene such as mine more brightly lit?

Q5. Do you have any general feelings on the scene overall which you feel may improve it?

Peer Answers Below;

--------------------------------------------------------------------------------

Peer 1 / Wayne:

A1. The colour and tone of the god rays are generally quite nice, the directional light shafts are great - arguably the god ray mesh material itself could be slightly more 'pink' to match but it looks and generally feels great.

A2. Yea I like the desk, doesn't feel off whatsoever and serves to show off the small mesh textures on the desk too. The desk adds 'humanity' to the scene as if you only had cells it could easily feel like more of a dark dungeon I suppose.

A3. Almost spot on, the larger cell at the end could have another point light between the two at either end just to keep the central section from being a bit too dark. What I'd do here is just dupe one of those lights align it to the centre of that cell then lower the attenuation radius so it doesn't look like another point light on the ceiling but just spans a proper light volume across that detainment cell in particular. This is fine tuning though.

A4. I think the dimly lit approach is fine and is a good idea to get quick results with shadows bouncing between the cell pipes etc. Also allows for good use of directional light impact on the interior through blinds etc

A5. Ohter than the two suggestions the only think I could think of would be to put a bit of life into the cells, beds/sheets/broken down bits and pieces. Other than that and the suggestions made in previous questions I think the scene is pretty solid.

--------------------------------------------------------------------------------

Peer 2 /  Darren:

A1. I think your god rays fit your scene nicely and the effect of having a 2D and actual bloom adds a really nice effect. all I can say is maybe and a bit more of a orange/yellow tint to your 2D god rays.

A2. Ye I think the desk adds to the the scene, and the lighting emphasise the smaller items.

A3. I think the lighting for the cells is great keeping the dark and gloomy feel with out being to bright or to dark.

A4. I think with the small space and the not high capacity of models the dark a scene benefits you. I believe if the scene was to be more filled out then you would have to try and brighten things up a bit.

A5. I think you could go off what I comment in the last one and fill out the scene more then brighten it up as I believe it is a bit empty for a police station.

--------------------------------------------------------------------------------

I will build upon the peer feedback provided, and make any changes in detailed changelog posts later in this blog.

Rendering and Lighting for Computer Games Animation - Lighting my scene

To begin implementing lighting, I began with the crepuscular/god rays, ticking the box in the directional light details allowing for the light bloom shafts to show in engine.
I needed to position and angle the directional light appropriately for the light to beam through between the blinds. When happy with the positioning I began experimenting with colours and shades which I had visualised using early on for the lighting.

I began toying with pinks and oranges, as the shade of my skybox in-game, due to the time in which my game is set, is  an orange/pink tone. This had been a plan from earlier design units and so I also consulted peers whilst toying with the shade of light and through my own vision and peer comments I ended up settling on a more orange tone as opposed to the, I feel as though there is a very slight hint of pink remaining, but was ultimately happy to use the shade decided on.
Screen grabs can be seen below;




I had not initially accounted for the light bloom shafts also shining through the bars within the exterior prison cell walls, though the beams coming through the cell exterior, and also splitting between the physical interior bar structure also at certain angles, I feel displayed nicely.
Screen grabs specifically of the cell light shafts can be seen below;



Along with the god rays, my research drove me to create my own custom mesh based god rays utilising a YouTube tutorial mentioned earlier in this blog., these in combination with the god rays themselves allow me to give the effect that there is still light piercing through the windows whilst the user cannot actually see the god rays themselves.
This took some careful positioning and colour/tone work once imported into Unreal Engine, to which extent I have duplicated the mesh and material, to create a softer tone, to gain a perspective on how harsh or soft I would like the manually created god ray to be in scene. 
I feel the softer iteration of the god ray setup gives a more respectable effect than the more solid, harsher setup, though this may well have its own use at another point in the design process. 
They can be seen both alone and through god rays when god rays coming through separate windows cannot be seen.





My scene lighting is made by largely static lights, apart from the movable, dynamic lighting present used to pierce the blinds and actually throw shadow onto the walls behind and to the side of the desk, this was a decision made due to the fact that the shadows did not bake onto the walls at all when building lights, no matter the quality level when using stationary or static lights.
As as result I used movable lights, which give a more real time lighting output, this of course may strain a CPU more likely a GPU in a much more crowded area, but within a smaller area it does not hinder the performance or my scene whatsoever.



For the more basic interior lighting, that which does not necessarily have to be piercing through holes or illuminating surfaces, I have used a mixture of point lights, spotlights and also a single point light blueprint set to flicker in one of the cells.

I have been experimenting with the attenuation radius for all types of lights used, both inner and outer cone angles when using spotlights and intensity levels so as to not light the office too much, yet to light it appropriately enough for it to be obvious to a user or viewer that the room is indeed an office/prison type building.

I decided to leave the desk lamp illuminated so as to illuminate the items on the desk and also to allow it to be shown in scene, as from certain angles, the desk is almost too dark to be seen, though this is intentional, as per the dimly lit vision.
The desk lamp needed some more attention to the attenuation radius and intensity than other lights within the scene, as not only is the desk a focal point, but I needed to make sure the spotlight could appropriately light enough of the desk to show the meshes I had created for the scene.



Spotlights, seen above, were used to cascade some light downward on the walls and to bring a bit more visibility to the area itself.


Show above are the detainment cells, with point lights used to light each, though I feel not too strongly, appropriately for the scene and also avoiding any lighting errors being caused by larger attenuation radius measurements.



As mentioned above, the desk lamp was illuminated to allow for illumination of items on the desk, with this in mind, the attenuation radius and inner/outer circles needed to be carefully manipulated to give a realistic amount of light to the desk.

As can be seen throughout my screenshots, there are also a number of dust particles set up through the scene, five in total reaching from one end of the room to the other. These are customisable in their own right, but I have chosen to leave them as they are as my scene requires a more realistic, natural ambience.
I feel the dust particles give me that ambience necessary to push the realism within my level, staying subtle and not showing up too much, especially where there are not necessarily lights present in the scene. If I wanted I could make them more prominent with ease vie duplicating and editing the materials used, either in Unreal itself or in Photoshop. 

From this point, I would be consulting my peers to gain some insight from fresh eyes through peer feedback questions and answers as usual and attempting to make changes based on the feedback given.
In tandem with this, as my deadline looms, I would be taking high resolution screenshots, at 4K and higher resolution to try to showcase my scene and would also be creating a video capture sequencer, to render out a video clip to showcase my scene alongside the high quality screenshots.

Rendering and Lighting for Computer Games Animation - Scene Construction

To construct my scene, much like the lighting, I could transfer a large portion of the meshes across from units completed prior to this one, I constructed a small building from modpack pieces which I had generated for unit 76 and 70.

The pieces already had materials applied due to the nature of the previous units, and only small modifications were necessary to one or two meshes, in order to give me proper windows which can be seen through from both sides.
The rest of the meshes which I had previously made, I had the foresight to make light maps for them also during the UVing process, to allow for appropriate lighting and shadows to be cast on them.
This lowered my workload and allowed me to construct a fairly basic scene with relative ease.

I created a new window section and a new door for my scene with appropriate windows so that the god rays would shine through into the office and also constructed a set of prison bars and a cell door, so that I could make detainment cells within the lawkeeper's office
Below is a screen grab of my general interior and exterior modpack files within Maya, containing some set dressing items also, which I have used to construct my scene, also shown below via an unreal engine screenshot.




I created a number of assets to populate the direct area around the desk area, including a mug, a book, a machete, keys and a desk lamp, these were all created with scale in mind, UV'd and textured within Quixel Suite, allowing my to create variants of the materials if necessary, specifically with the book in mind, creating two different covers.

I also made use of a Glock 17 pistol, one of my own personal projects as a set dressing item, and a mobile phone which I sourced from a royalty free model website. This was only obtained due to the fact I felt I could not dedicate much more time to the modelling and creation of assets. If I am to put this project on my portfolio, I will of course remove or replace the asset with one of my own creation, this was only added in an effort to save some time, present alongside multiple of my own produced, textured models.


The final thing I added to my scene, again sourced via royalty free means via the following link;
http://www.polymodels.com/free-products/procedural-blinds-generator-blueprints-for-ue4

These come in blueprint form and can be modified with the simple changing of numerical values, and would again be either replaced or removed, depending on the usage limitations for the blueprinting work.


With the addition of the blinds, both venetian and vertically hanging variants placed appropriately over the windows and the window pane in the front door of the office, I felt ready to begin implementing lighting procedures. The prodcedured which have already been highlighted, researched earlier and also making use of the lighting work I had produced for earlier units.

Rendering and Lighting for Computer Games Animation - Lighting Research

To conduct adequate research into appropriate lighting for my scene I needed to consider how I wanted my scene to be lit, and as such worked to a mental image of what I wanted my scene to look like.

I visualised an empty office, dimly lit, with sunlight beaming through the windows through opened venetian and vertcially hanging blinds. The office would be somewhat empty in furnishings to begin with, and if any dress setting population was needed I would build on top of the general scene.

------------------------------------------------------------------------------

To begin I did a little research into 'god rays'. God rays, otherwise known as crepuscular rays are the beams of light which originate from the sun in reality, and in unreal engine 4 by any scene's main dominant directional light which acts as the sun in engine.
When looking toward the directional light, they are seen beaming toward the user, penetrating through any gaps in objects within the scene, mimicking reality.
Below is an example of both a natural god ray, and a god ray in engine.



Upon a little reading, I found that god rays are added to a scene fairly easily for basic usage, or at least utilising them for my scene would be easy, much easier than I had first imagined, by simply ticking the Light Shaft Bloom option within Unreal Engine 4, contained in the details on the directional light actor.
This is a great system, however it is not perfect for my setup, and as such I decided to look into more methods of potential manual creation of god rays for my scene, as the way I would like to have them set up is so that the use does not have to be within the viewing angle determined by the actor itself, and they can be viewed at any angle within the scene. There is more than likely a setting within the engine itself to change the viewing angle, making it possible to be seen at any angle, but for the time being as I had the opportunity to improve my skillset and knowledge slightly in terms of material creation, I decided I would look for more manual methods also.

Upon a short search for YouTube tutorials I found a tutorial located at the following URL:
https://www.youtube.com/watch?v=9qAXiVJSzxw

I watched and replicated this tutorial making adjustments to my product, and again whilst they are not perfect for my scene, they serve a great purpose in that whilst the god rays from the directional light are not shining directly through the intended blinds, they will give the effect that there is still light shining through the windows of my lawkeeper's office scene.

God rays were a large part of my lighting research, as for almost everything else I could translate knowledge I had gained in previous units, things like flickering lights and general lighting setups, due to the nature of my scene being small and dimly lit, I felt I did not need to research into too much more.

Rendering and Lighting for Computer Games Animation - Pre-Production

Due to the nature of this unit being largely engine based, there was not actually much pre-production necessary for this scene which had not been produced through other units, outside of researching into lighting methods and functions within Unreal which I would be needing to incorporate into my scene.

Research into lighting methods and what I feel I will need for my scene will be gathered in another post.