Tuesday 12 May 2015

Lighting Errors

When Lighting the environment I came across a lot of issues based off of my work flow that that i was not expecting. However with a little research and piecing together prior knowledge it was prettying simple to solve for most of them. 

The First issue i came across was light map resolution after baking, the shadows where very blurred and unclear. This was due to my choice of work methods and texturing methods. As Im using 4K texture Atlases for my models, only a small portion of the map made up the whole unwrap for the models using it. This is fine of the texture as its resolutions 4K (4096x4096 pixels) so the portion the UVmap occupies is around 512x512 to 1024x1024 pixel data for the models texture which is enough for the model to look fairly high res. However within unreal the Light/Shadow map is by default set to 64x64. This is usually fine for most objects assuming they use a UVmap that takes up the whole space. So in proportion to the texture size the light map was effectiving only texturing a area of 8x8 to 16x16 pixels. A dramatic difference to the texture. 

My quick fix to this problem was to simply bump up the Light map Resolution however later I encountered more problems that with a new solution implemented would fix both problems at the same time..

The second issue was more to do with the shadows not looking correct even with a bumped up resolution. Working out what was wrong was difficult and really i was stumped until I baked the scene and noticed something interesting. All modular floor tiles where light up the same with identical shadows. It was a strange error but seeing it made me realise that the uv coordinates that where being used for the model had overlapping sections. This wasn't the reason for all the modular pieces sharing the same lighting but it made me realise why I was getting lighting issues. As one part of a model was being light another part sharing the same uv coordinates had a shadow cast over it. This caused both the side in the light and the side in the shadow to render with a shadows. 


So to resolve this i created a second Uv map for the model the fixations containing texturing coordinates and the second lightmapping Coordinates.This fixed both issues as the lightmapping Coordinates use up more uv realestate allowing for more higher res shadows without needing to scale up my lightmaps.



No comments:

Post a Comment