Shaders- Environment

I decided to continue the sci-fi horror theme, and created a research facility that is being turned into a museum. A lot of work has been done on this section, so I will split my progress for this week into environment construction and functionality implementation.


The environment is made up of a simple modkit and three trim sheets; one for the floor and ceiling, one for the doors and one for the walls, pipes and pillars. 


I used duplicate meshes with different UVs, rather than instancing the material and manipulating its UVs, as I believe this was the cheaper option. I also added grunge maps to be vertex painted onto the meshes to add slightly more variety, interest and realism. I used a couple of instances with shifted UVs to make the tiling of the walls less obvious. 



The notes device and door lights use another 512 texture map, and are also quite simple construction-wise. I used grouping to make the environment quicker to construct, as duplicating such small meshes was taking too long. The glass material was difficult to get right, as the refraction in Unreal would not work properly. Physically based properties did not look correct, so I had to adjust them constantly. 


I also added some improvements to the shaders themselves. The blinking eyes have a better more adjustable roughness balance, and use a lerp to activate the "alarm" mode instead of switching between two materials. I also changed their base material, from wood to a plain purple metal, as the wood does not suit a sci-fi setting. The liquid height variation is now reduced, as it was causing problems in its performance, and I added a new mesh to be used by the crystals. This mesh is more suitable for the eye, and can turn to follow the player. I added a delay to the crystal's rotation to make it more jerky and unnerving. 


The doors use a simple blueprint that moves them up or down using a timeline, based on overlap collision. The bottom door uses the same timeline multiplied by -1. The lights change colour when overlap begins and when doors are closed, depending on a boolean variable. However, there are still some issues with the collision that seem to be engine flaws. Sometimes the collision just does not activate.


I had a lot of problems with the lighting, as the lightmaps on the repeating meshes were struggling with shadowing. I fixed this by tweaking lighting quality sliders in world settings, which increased build times immensely. This was a payoff I was willing to take, as I could just build lighting at the end. 





Comments

Popular Posts