Friday, April 29, 2016

Realistic Basketball Court - Materials in UE4

I've just finished texturing my architectural assets in Substance Painter. One thing I've noticed when importing my textures into Unreal Engine is the impact the Image Based Lighting Substance uses has on the aesthetic of the materials, metallic materials are especially more visually pleasing in Substance than in UE4.

The material properties look more crisp and constrasting in Substance. The Version in UE4 below is lit with a Directional light and a Skylight to try and emphasis the highlights. This is also with my combined Roughness and Metalness texture with unchecked sRGB in the parameters, as I know this can have an undesired effect on the glossy aesthetic.


It's my understanding that you can replicate the effect Substance has with a HDR in UE4 but it is only useful for reflections not so much the lighting.

To fix the low resolution brick problem from my last post I've made a tiling brick texture. However As I had put the effort in to making the plaster effect and overlaying graffiti and dirt onto the exiting bricks I decided to try a different method. I've utilised the Diffuse information that was overlayed on the old bricks in Substance and blended my new tiling texture underneath. Meaning I can keep the same unique crumbling plaster details and still have a higher res brick where its exposed.



To do this meant a little bit of extra work in the material shader with blending multiple textures and creating a mask where the new brick should be exposed. Also to make the tiling brick texture I had to reduce another textures resolution, which led me to try and optimize the metal shader of the cage.




The cage is now using a 1024 texture instead of the 2048 it was displayed with above, however i've used techniques such as Bump offset Mapping to retain some of the normal emphasis and overlayed a greyscale macro texture of surface details to get a similar results in the Diffuse and Roughness. The shader now gives the cage a much more battered look, with more contrasting detail highlights.

Exploring these different nodes in the shader graph led me get more adventurous with alternate techniques for improving shaders and the material realism outcomes.

This mesh Alpha uses the Bump Offset node for the illusion of being thicker than it is.

My plastered wall material now looks a lot more realistic thanks to Pixel Depth Offset, blending multiple Angle Corrected Normals.










I went back into Substance after integrating the textures into PBR shaders to change some things that I felt could look more visually interesting now I've seen them in a new light. One area i felt was lacking was the plaster, despite the graffiti and dirt it still lacked the grungy believability.

I didn't have any reference of the interior spaces from the basketball court I'm basing the environment off, but I had been following the generic principles of an abandoned building... messy and destroyed. After looking at some more research of abandoned buildings I realised that in a lot of publicly used facilities plaster is normally painted bright colours. So I added some paint to break up the large plain of white plaster, along with a painted vent detail and more green mold. This rework surpisingly made a massive difference.



I've also learnt about adding parameters to shaders to be able to tweak them in realtime, which is frankly awesome and a lot more convenient for making aesthetic choices for material properties, so now most of my textures have a set of nodes for controlling customised parameters such as macro detail amount or Normal intensity multipliers.




 Having control over the aesthetics through more complex material shaders is very useful but also
expensive. Detail enhancing nodes such as POM are great for giving the impression of surface detail on an otherwise flat mesh, without having to add geometry. However if nodes like these are used excessively throughout your shaders it can be expensive to calculate and frame rate will take a hit.

The scene is looking as I had hoped so far, with the derelict feel coming across through meshes and materials. I'll need to work on the atmosphere next and start to create and build lighting effects.

























































One issue i've since had is with the mesh material below, because the mesh alpha is tiled a lot to get the right density, when the player is far away the mesh becomes a solid material occluding all the background. This I discovered is due to the Mipmap levels, they were previously set to 'FromTextureGroup' I've now set them to 'NoMipMaps', which in these close quarters is fine because the texture doesn't really need to be downscaled for optimization purposes. This fixes the issue a little but I don't think it can be solved fully as it's just the density that's the issue.

Tuesday, April 26, 2016

Realistic Basketball Court - Texturing, Using Substance Painter


With completing the architecture of the basketball court I've decided to start texturing the assets I have and begin to build my scene in Unreal Engine. I know I'm most likely going to be modelling smaller prop assets later but I couldn't wait to start using Allegorithmic's - Substance Painter to see what the program is capable of and to hopefully work out what works and what doesn't with the models I already have.
My intention is to texture the whole environment using Substance Painter as it houses very useful tools such as being able to create dirt masks or quickly blend different material types, and all ready for PBR export. The program is new to me but it has been very intuitive to pick up and use. There are still some features such as the blending layers and adding generators to masks that seem to be temperamental in using, but overall I'm finding it very efficient for texturing and being able to paint unique textures straight onto the mesh is a method I wish I had implemented into my pipeline in previous years.

One of the benefits of being able to paint straight onto the mesh is how quickly you can fake details. In the image below I've managed to quickly give the impression of bolts in the supports by simply painting height information into the separate channels available. Also, painting straight onto the mesh allows you to see directly how details like damage are working with the mesh and the lighting, for example the subtle scratches on the edges would have taken some back and forth between Photoshop and 3dsMax to achieve, however I was able to replicate it in seconds with Substance, and UV seems are no longer an issue either with being able to paint over them.

Substance Painter has the ability to generate all kinds of useful maps which are used to calculate things such as dirt buildup overlays. However the results weren't always that good, with issues such as light bleeding from edges being a problem, so I decided to bake my own AO maps in 3dsMax to use in the program.

To begin texturing each asset I had planned the texture sheets and grouped the meshes accordingly, having a separate file for each group and working on one sheet at a time, I.e 'Metal' assets or 'Brick and Stone' assets, allowing for a clear layer tree with shared overlays for universal material properties.



One great thing about Substance Painter is that you can scale up or down the texture size at any point without loss, so I was working mostly with 4k materials to help see painted details and then scaling them down on export. Also For efficiency I combined the grey scale textures sheets where possible into the different channels.

One problem that arose later down the line in my plan of texturing the whole environment with Substance was; that whilst the scope for texture variation for each material was fantastic for creating the look of unique grunge and interesting areas of damage, the resolution of the textures were poor. For example in the images below, the brick featured underneath the plaster wasn't so noticeably low resolution in Unreal Engine, however because the UV's were confined to the 2048x2048 I allowed for this particular mesh the brick outside was the same pixel density and looked very noticeably low res with there being so much of it on display.


In an attempt to get some higher resolution bricks I rearranged how I've divided my texture budget up and allowed for one texture sheet of just the bricks walls.


However, as you can see it didn't do much good. It's obvious that i'm going to have to create a tiling brick texture for this. The reason I didn't take this route to begin with was that I thought I might be able to save myself some time, instead of needing to make decals to break up the large plains of bricks, I used Substance to paint graffiti and dirt over the mesh, with the wider intention of making the whole environment look unique and non uniform.

I realise now that I've been neglecting the traditional methods of texturing that I know work just fine, such as using tiling textures where possible. Substance Painter is fun to use but should only be used for texturing unique assets, not an entire building.


Saturday, April 23, 2016

Realistic Basketball Court - Essential Meshes Finished

After working with the scaling I've been able to quickly block out some of the other features and focal points that I liked from the reference images i'm using. However I've begun to realise that the metal frame is going to be difficult to keep modular and tillable, the doorway either side already creates a unique tillable piece and with the asymmetrical features I'm intending to add it might be the case that I divide the frame up into larger modular pieces, to allow me to keep the random variations of damage and such to break up the frame silhouette.


It's my intention to try and keep the models as close to the reference as possible, however in some areas I've been forced to deviate from the real version to allow for better player experience and level design. For example in the image below, I'm sure these struts are needed for the structural stability of the frame, however adding them would mean cutting off a large portion of the playerable area.


























Creating the feeling of natural and man made wear and tear is essential for the overall aesthetic i'm trying to create with this level. As I've been modelling i'm beginning to allow room for interesting focal points, by creating a clean mesh and then evaluating where it might be damaged and how this would factor into a composition.

I'm also aware of the timescale, so I'm trying to plan ahead for unwrapping/texturing and making sure to reuse assets where possible.

The triangle budget has shot up quite fast, which is surprising because I have been optimizing the meshes as I go, with only the surfaces the player will be able to walk up to having the majority of the budget dedicated to it. However I'm not too worried about going over the budget at the minute because I know that the reason it's so high at this early stage is due to the metal frame being the scale it is, with all the runs and joints being modeled it soon adds up despite them being low poly. Some of the joints are only a 'nice to have' for the realism of the frame and not essential to the overall silhouette, especially the ones at the top of the frame, so they are definitely on the hit list if I need to cut back later.


I'm hoping that that interior spaces wont look too boring as they really are just four walls and I haven't got many triangles spare to justify modelling details such as cracks or loose bricks, I'm intending to fake these details with the Normals and possibly Displacement maps.


I'm nearly finished with the essential meshes of the scene and I'm mentally preparing them into material groups to help me think how to divide the 4x 2048x2048 texture sheets.







Thursday, April 14, 2016

Realistic Basketball Court - Modeling/Scaling

I have now started to model the metal frame of the basketball court, working in cm I've tailored the frame towards the standard First Person Player height in Unreal Engine, I'm testing the door height in engine and using this as a scale reference for everything else that needs to be modeled.




Getting the correct looking curvature for the frame proved to be more difficult than I thought and I had to use a cylinder with a matching number of sides to get the correct spacing and angle between each frame segment.




Wednesday, April 13, 2016

Realistic Basketball Court - Concept

After finding reference of basketball courts and looking at things like natural wear and tear on objects that are in constant exposure to the elements, I began to compile my favourite pictures and produced a concept to help me figure out the scaling and get an idea of the modular pieces I could make.

 The sketch is based heavily on the basketball court image seen in the top right of the moodbaord above, as it already shows a lot of the elements I wish to replicate.

I've also started to look into which direction and can take the mood and lighting. I would love to give the impression of the court being flooded with city smog with the surrounding neon lights gleaming through it. It will have just rained in my scene, allowing the composition to seem more cluttered than it is, with the metal frame and the city lights being present twice.

It was my original intention to model the scene as it appears in my concept, with it being dissected down the middle, more of a diarama/aesthetic goal for a bigger scene. I wanted to focus on creating a a well populated level slice, but after getting feedback on my ideas it was suggested to add more cover and I was reminded that this is supposed to be a game ready environment for a first person shooter.

Acting on the feedback, I decided to try and create the whole rooftop. This wasn't so much of an issue in terms of the design because the scene is already visually modular and I could essentially build the second half with the existing half, however populating such a large area to the same standard I was planning would be difficult. The triangle budget for the brief is 50,000, which seems fairly generous now, but i'm sure i'll be struggling to make the level look as grungy and wrecked as I intend later down the line.  

Tuesday, April 12, 2016

Realistic Roof-Top Project


At the start of the university year I was due to start work back in Munich at a multi media agency, who produced imagery and film from a range of pipelines for all kinds of clients. My role there would have been to assist in the CG aspect of the production. Focusing on After Effects animations, Vred renders, post production of image and film, 3D modelling and more. Unfortunately I had to turn the position down due to some complications on their end and I made a more beneficiary choice to return to BMW to do a Bachelor Thesis.

After a bumpy start and a few more hurdles before I finally got settled in Munich and started work at BMW again, I was admittedly rather behind on the Professional Brief projects that I had been set alongside the work placement. Also due to starting my Final Major Project/Bachelor Thesis early to adhere to my contract length at BMW, my time delegation for the Professional Briefs became varied hence only starting to properly execute the projects now.

Before christmas I chose the 'Metropolis Roof-Top' brief as my first project of the three we were assigned. The small projects, lasting three weeks each, were designed to be representative of the sort of briefs we should expect to see in the professional industry.

I chose the realistic rooftop for multiple reasons; firstly because I have an interest in environment creation, secondly because the majority of games I find appealing are those that try to emulate realism, and thirdly because I had been out of the game art loop for a while whilst working for BMW I hadn't really had any experience of Unreal Engine 4 yet and I felt the best way to delve into the alien PBR pipeline was to focus on replicating real world materials.

I began R&D for the project immediately and a choice quickly presented itself. Whether to try and achieve a pristine aesthetic, something of the likes of a James Bond scene


or to aim for more of a grungy Ganglands setting.


I chose to go forward with the grungy aesthetic as I felt like it could offer a lot more scope for interesting textural work, and with programs like Substance Designer becoming more prevalent over the past year I understood that there were some favorable tools to be implemented that I hadn't had chance to use yet.

From riffling through reference I became drawn towards to the idea of making a rooftop basketball court. The verticallity of the framework would allow for some visually pleasing compositions and I could already begin to envisage the wonderful scope for debris and material properties present in such a scene.