Tower Polish
Author: Yashwant Patel
Problem
All the mechanics for the towers have been updated and they work correctly, but one of the things that is lacking is PFI. While all towers had basic or placeholder visual effects they needed to be updated to make it feel like a game. The rocket tower had a cylinder for it's rocket, the gas dispenser had an expanding sphere (although it was a cool shader), and the freeze tower had an expanding cube for it's effect. Not to mention the rocket tower itself was a cylinder. So it was time to update these effects and get the freeze tower it's model.
Solution
The effects that I had in mind were going to be hard to find a 1 for 1 tutorial, so it was time to find videos that could be used as a basis for the effects. I knew the freeze tower was going to cause the most trouble since it needed some type of effect that would persist over a duration and the visual had to look like it would hit all enemies of any size. This means a simple beam wouldn't do since some enemies are too short to get hit by a beam. Also, if the beam was scaled on the Z it wouldn't look too great with the tower model, because the fire point wasn't too large. First I stumbled upon a cool tessellation shader that could've done the job, but since we are using UE5 that wasn't possible, so it was time for another alternative. My second thought was to have multiple beams that would originate from the fire point and space each of them with some angle, so all enemies would intersect with at least one of them, but before I could go about implementing that Matthew sent over a video that seemed promising. This video had a ground effect that could be used as a base and tweaked. After making the base effect I needed to parametrize the offset (since it would need to spawn lower than the firepoint), parameterize the duration, and change how the spawning worked. For the spawning I needed dynamic values for the length and width of the particles since we have an upgrade that effects the length. After parameterizing these variables I figured out the scalar value that needed to be used to get from world space units to the units in Niagara, since they aren't one to one. Some logic on the tower had to be redone, since the duration was now controlled by the Niagara effect and not a timeline that scaled a cube. After this I added a projectile particle that would initially fire that made it seem like it left behind the ice trail and a sphere that scaled up when charging up.
This is how it turned out.
Next in line was the gas dispenser. In mind I had a cool effect that would look like gas clouds (green clouds), but I was envisioning something that could probably be done with volumetric clouds, which wouldn't give the best performance. So I started to search for an effect that I could use as a basis for the tower. I stumbled upon this video which had a great looking effect. Somethings used in the videos I didn't have access to, so I had to either make my own or find something similar on the internet. One of the parts of the effect uses a custom mesh, but I didn't have the time to make the mesh or learn how to make it, so I decided to skip that part since it was a minute part of the effect. After making the base effect I modified parameters and parameterized variables needed for the effect that could be controlled by the tower incase an upgrade was purchased. Another thing I did was change up the material a little bit for when the tower is in preview mode, so the player can better see the range of the gas.
This is how it turned out.
Lastly, it was time for the rocket tower. First thing to do was find a nice rocket model which can be surprisingly hard. There are some free missile assets on the marketplace, but I had something else in mind. In the end I couldn't find what I was looking for, so I decided to use that model. The effect I had in mind was have the rocket be built on the track, so the player could see where the rocket would be fired from. In order for this I made a dissolve effect that has a dissolve parameter that can control how much the rocket is dissolved. I then implemented this functionality into the tower. Now it was time to create an effect that made it look like the tower was getting built, so I decided to use a particle that was added by Matthew a while ago and modify it to fit my needs. Once this was done I implemented the particle into the tower. Now the rocket itself needed an exhaust effect, so I made a simple particle that looked decent. Finally I decided to move the indicator arrow when in tower preview mode to be on the track itself instead of point where on the track the rocket would spawn.
This was the final result.
Comments
Post a Comment