This sprint, I worked on some improvements to the enemy wave and damage system, some status conditions for the enemies, as well as some exciting VFX!
When I started working on the blood VFX, I knew I wanted to do something similar to ULTRAKILL’s rendition. I started with Unreal Engine 5’s directional burst niagara template, because it featured ribbon-like trails behind the particles that I knew I wanted. However, these ribbons were square on each end, and I wanted mine to taper off instead of just end abruptly. To this end, I duplicated the built in ribbon material so I could make some modifications. I found that by plugging a sphere mask into the opacity of the material, and then multiplying the radius by the particle’s relative age (a 0-1 value representing the percentage of the particle’s lifetime that has already passed). This worked pretty well, and gave my ribbons a more rounded, tapering look!
The second major problem I had to solve was getting the particles to leave bloodstains on the environment. After doing some research on different approaches to this, I settled on having my particles spawn decals when they collided with static objects. I began by creating a simple, 16x16 bloodstain alpha texture that I could use for the decal. After this, I set my ribbon particles to generate collision events. Then, I created a new emitter that would respond to collision events by spawning itself at the collision location, and attached a decal component onto it. This allowed my particles to create decals where they collided!
After fixing some of the stretching that occurs when a decal is projected onto a surface that’s not directly facing the decal, I wanted my particles to slowly “dry up” so that they wouldn’t just suddenly vanish into thin air. Thankfully, Unreal’s materials give you access to a node called Particle Fade Out Opacity, which is a float ranging from 0-1 that’s manipulated by the particle emitter itself. 0 represents fully faded out, and 1 represents not faded at all. I started by plugging this value into a 1-x node and multiplying it by the alpha of the base texture to get the opacity, but this approach made the entire decal slowly average out in opacity, then fade out all together, which I wasn’t satisfied with. After numerous alternative iterations, I settled on the simple approach of subtracting the fade-out value from the texture’s alpha, meaning that the more transparent parts of the texture would completely fade out before the more opaque areas. This gave my decal a nice “shrinking” effect that I thought passed pretty well for drying up!
There were some other things that I had wanted to try, like randomizing the texture of the particle, or adding a normal map to the material, but I didn’t get to a satisfactory point with either of those endeavors, so I decided to leave it on the back burner for now.
The next VFX system I worked on this week was a muzzle flash effect for our guns!
This one was very fun to make. It consists of two different animations. One shorter, triangular spike that starts fading out from the bottom center, and a longer blast effect that also fades out from the origin. By centering the long blast effect, and creating a ring of the smaller spikes around the side, I was able to create this effect. Finally, I added some sparks, because I thought that it looked more fun that way! Finally, I parameterized the color that fades in over the particle’s lifetime, and I want to go back and add parameters for the scale of the effect so that we can easily reuse this for other weapons. Note: pictures were used because I could not get the animated gifs from google docs to work
Comments
Post a Comment