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.

No comments:

Post a Comment