Log 13: Oops, Missed an Upload...
- Kassandra McCormack
- Dec 28, 2023
- 5 min read
Well this is embarrassing, I forgot to actually post the last entry so now I have almost a month worth of work to catch up on reporting.
Knowing that I wanted to incorporate QTEs was all well and good, but I couldn't start on them until I had the rest of the sequence presentable.
I had several things I needed to work on:
The morphing animation kept playing on loop, but would only play the sequence every other loop.
The overlay material was appearing where it shouldn't have been.
None of the (3) particle systems were working correctly.
I needed some way of putting pauses or breaks in where the QTEs were meant to be, that could also be interrupted and the next stage moved to early on a successful button press.
The first thing I decided to work on was the overlay material:
I don't know why I decided on starting there as in retrospect it seems the least important, but it may have also been because it appeared to be the easier option. At first it appeared to be an obvious problem, the material did not have any opacity cutoffs never mind being dependent on external objects like my other materials. So I added in opacity cutoffs to the material dependent on the orientation and location of four planes so that the material would only be visible in between them. I did four because of how the morphing sequence worked two would define the visibility of the trunk of the character, and two others would define the visibility on the arms.
This did not work because in certain poses in the morph animation, planes would be intersecting and causing weird cutoffs that I didn't want to happen. After thinking on it for a while, I figured why have two meshes of the same thing (a full body mannequin) when I wanted them for different parts: one for the arms and the other for the trunk. So I reduced the material planes to be in between two planes, and started some mesh work.
After exporting the Synty mannequin mesh to an FBX file, I imported it into my preferred 3D software: Blender. I can use Maya, but I originally learned on Blender and I'm just more comfortable there. Fortunately I didn't need to do anything drastic or weird. Just chop up the mesh into two different meshes:


While admittedly a bit macabre, we must do what we must. I cut the head off the trunk because I want the character's civilian face to be showing up through the whole thing, a bit more of a connection to the character that way. This way I wouldn't have to worry about bits not being cutoff when they should be, or showing through other bits. It took a bit of fussing with the blueprint to create and use Dynamic Instance Materials, but was relatively uneventful.
The next thing I wanted to work on was the looping animation and infrequent sequence playing. Originally the animation was a single animation state in the animation blueprint, but because of the QTEs I figured actually doing smaller montages that I could play and control from the character blueprint may be more effective. The first thing I did was actually break up the animation into smaller, individual chunks. At the end of these chunks I left quite a bit of dead space where the character would just hold the last pose where I intended the wait time for the QTEs to be, getting a bit of a head start on future work. This was one of the few things I wound up keeping as I progressed.
Montages kind of worked, but I ran into a problem that montages don't blend into each other, if you have one montage playing, and then try to play a different one in the same slot it first blends back to the animation blueprint and then blends into the new montage. This happens even if you set the blending time to 0. So now montages were out. Looking back I don't remember why I thought they were the way to go. I wound up sticking the broken up animations into the animation blueprint with some new bools to trigger when to transition to the next state. This worked, and because the transitions are controlled by bools in the character blueprint, I could make the transition wait the full animation or cut off early by controlling the state of those bools in my future QTE code.
The final thing I worked on before moving on to the QTEs proper was getting my particle systems behaving. The first I worked on was the rotating dome. For some reason it was rotating around the global origin, instead of the system's origin. At first I thought it was a simple matter of changing the rotation center's position from 0, 0, 0 to the system's center. And then I remembered that I had to build a custom rotator scratch pad, and the Rotate Angle on Axis node doesn't have a pin for the point you want to rotate around:

After struggling with vector math for a while and trying to copy the algorithm used in Unreal's "Rotate Around Point" module, I finally found a node that would convert a [Position] to and from local space and world space. Now I only needed to convert from world space to local space when feeding into the rotator node and back into world space at the end, and viola:

Next up was the particle systems that formed the armor. The were either not moving, or instantly snapping into place. Now, I already solved a similar problem with the armor forming in the quick morph Niagara system, so you would think that it would have been an easy fix. It did give me some insight, don't get me wrong: whether the dissolve plane was within range of the chosen mesh tri would sometimes go from true to false, or otherwise never become true. But that didn't solve the snapping problem. I wound up simplifying the age calculation by removing the [Age Within Bias] parameter, and instead added either 0 or DeltaTime (chosen by if the plane was or had ever been in range) to a separately tracked age variable and lerped based on that.

Finally, and far more simply: the spinning particles that cover the dissolve edge just needed to have some user defined parameters created so that the arms and helmet could be at different sizes and radii from the trunk particles.
And...this is getting long again, so in order to have more thematically consistent posts I'm going to cut it here and continue with my more direct QTE work in the next post.
Comments