Making the Sci Fi Tank shield

Making Of / 24 August 2022

The Sci-Fi tank was an interesting project I did. Most of the project was straight forward enough for the particle effects and forced me outside my comfort zone which I enjoyed. The shield was the most difficult part of the project. Feedback I received on the shield was to have it drag on the ground as the tank moved around. This was a tricky to make work; however, using the UV unwrap and a bit of math, it was possible to make this work.

This is the unwrap for the shield, while this is just the default unwrap from Maya it allows for easy control for the shield flexing. The seam on the sides is the front of the shield facing in the X axis. This is important for when the material uses a WPO to stretch the shield as it moves. 

This is the WPO for the shield material. The first thing I do is create a linear gradient that comes from both sides. This will control the front of the shield, I invert this to control the back half of the shield. The tank speed node in the center controls the flexing of the shield. The Depth Fade is where the shield will flex when moving. The WPO Color and Tank Speed nodes are controlled through the tank BP. 

The first thing that happens in the BP is getting the shield's rotation. Unreal calculates rotation from 0 to 180 and then -180 to 0. I get the absolute value since, we only care about the positive values for the WPO. Using the rotation, the BP creates a value 0 - 1 based on how close it is to 90. If the rotation is at 0 or 180 the value will be 0. If the rotation is at 90, the value will be at 1. This value is used to create the WPO color. 

The previous value that was created from the rotation now creates a WPO color. Red is the 0 value and green is the 1 value now. We use the WPO color for the last step to create the value for how much the shield flexes. 

The last step for the BP to create the shield flexing is to control how much it flexes. The main issue I encountered with the shield is when the WPO color is between green and red the shield looses some flex. This will compensate that by increasing the flex value the closer it is to the center of green and red. 

This is the end result with the shield as you move around. It's subtle, but I enjoy the effect as you can identify which direction the tank is moving.