Visual Effects on Gun and Enemies - Antonio Roldan
A major task I set out to complete this week was making some visual feedback for various actions that happen within the game. My goal was to accomplish the following, a particle effect for the enemy spewer's vomit attack, another for a blood splatter when the enemies get shot, and bullet hole decals that will be spawned on surfaces that aren't enemies when we shoot them.
I started by making the particle system for the vomit effect that I wanted to spray from my Spewer enemy's mouth when it attacks. Before I could do this though I needed to create a material that looked like a yellowish-green glowing liquid. First I needed to make it translucent to emulate the opacity of liquid. I then set the base color to a dark yellow-green and used a fresnel effect to create a ring of a lighter yellow-green color on the edges which would be used as the emissive color, creating a shiny glowing effect. Lastly I found a water ripple normal map that I sent a panner into and added that to the material to slightly animate the texture and give the effect of rippling liquid. Once that was done I could actually start making the particle system.
I used the default fountain template for the Niagara particle systems as a base and from there set it to have more particles spawn, randomize the size of the particles, randomize the velocities of the particles, and randomize the life time of the particles. Doing this created a less uniform look making it seem more like liquid without actually trying to simulate physics which would be expensive. I then needed to adjust the cone that the fountain was spraying from to be more narrow and focused and then I adjusted the origin and direction of it to look like a stream going forward. Lastly I added more gravity to the particles to make them fall more naturally like liquid would.
Now to actually use the particle system all I had to do was set up two animation notify events, one for when I wanted the particle system to activate and one to turn it off. I then added a socket to the head bone of my model and adjusted the location to be in front of the mouth and from there I just needed to spawn the particle system at the location of that socket on the event.
With that done it was time to start working on the blood splatter effect. The process was very similar so I started by again creating a material. This time however I decided to sample a texture of blood splatter that I generated using AI. I used this as our base color and this time to avoid the uniformity of the panning effect that we added to the opacity, I made the speed of the panning a dynamic parameter which meant I could now randomize it in our particle system. Just like before I also used another ripple texture that I sampled for the opacity to make it look even more like a liquid.
This effect was very similar and I used a fountain Niagara system as a base again. This time however instead of creating a stream I wanted it to be more of a burst of velocity in random directions from an origin point. So I set that up and again randomized other attributes of the particles like scale and life time. I again made sure to add gravity and this time as mentioned earlier we used dynamic material parameters to randomize the speed of the panner allowing the animation within the material to not be uniform. Now all I had to do was actually use the system, and the easiest way to do this for me was to spawn one of these particle systems whenever our bullets collider overlapped with an enemy. To reduce dependencies I added an enemy interface to all enemies and on overlap of the bullet, attempted to cast the hit actor to that interface. Then if the cast succeeded I would spawn our blood splatter at the location of the hit.
The last thing I wanted to accomplish was creating bullet-hole decals on surfaces that block projectiles such as buildings or floors. This is actually a fairly straight forward process that once again requires making a material. I first needed to get a bullet hole texture which I generated with AI. Then I set the material domain to be a deferred decal and set the blend mode to translucent. I could then create a mask and get our bullet-hole image by sampling the texture we made for the bullet hole color and sampling the opacity for our opacity mask and that was all we needed to do to create the decal. Then to actually spawn the decals where the bullets were hitting all I needed to do was create an event for when bullets hit an object that blocks them rather than overlap. Then spawn our decal when this event was called, and to get the right location and orientation, we used the hit location for the position, and the hit's normal rotation from its X vector to make sure the decal would spawn perpendicular to the floor. Lastly I wanted some variation so I randomized the individual x, y, and z, parameters of the scale vector and now bullet holes would spawn in varied sizes on bullet collisions with anything that blocked them.
With every desired feature complete I now have to handle a few problems that arose as well as consider changing a few things. First of all I am using the base projectile for the spewer attack and so one issue is that the Spewer attack now also spawns these bullet-hole decals when its attack hits the floor. To get around this I am going to make a new base projectile that will be the parent and will not have that logic in it, then I can implement a different decal for the spewer such as a nice acid pool on surfaces. Another thing I only realized after making the blood splatter particle effect was how I could use dynamic parameter with my panner. Now that I know this I intend to go back and add this to my vomit particle effect as well to add more movement and less uniformity to that effect as well hopefully making it look more fluid.
Looking forward there are a ton of more visual effects that I can add to this game and intend to do so. These simple additions to the game increase the look and feel of it substantially and I now have much more respect for all of the various particle effects that I take for granted in every game I've ever played.
Plague Wardens
Obliterate for your country.
Status | Prototype |
Author | Board Gamers |
Genre | Shooter, Action |
Tags | Action RPG, Bullet Hell, Co-op, horor, pve, Third-Person Shooter |
More posts
- Spawning Logic Rework - Antonio Roldan23 days ago
- Surrounding Behavior Improvements - Antonio Roldan34 days ago
- AI Surrounding Behavior - Antonio Roldan40 days ago
- Enemy Balancing - Antonio Roldan50 days ago
- Functional Lobby and More Visual Feedback - Ryan Brown50 days ago
- Network Smoothing - Antonio Roldan55 days ago
- Stratagem Improvements and Menu Additions - Ryan Brown55 days ago
- C++ Conversion - Antonio Roldan57 days ago
- Interactable Visuals and Other Changes - Ryan Brown57 days ago
- AI Optimization - Antonio Roldan68 days ago
Leave a comment
Log in with itch.io to leave a comment.