Archive:
Got up this morning, fully intent on starting on the fog-based gameplay in Ytene, and then got completely side-tracked. Kinda.
I need the fog to warp the player off somewhere, which means I need to fade the screen in and out, (in a nice way) to cover-up the jump and give some messaging to the player. Scooby Doo wibbly wobbly stuff.
I started poking around to work out the best way to do it. I have an own-rolled screen fader, that’s part of the HUD, but it only fades to black or white. There’s the fade track, inside a level sequence, but that’s also to/from a solid colour. And then there’s the viewport class, which (I discovered this morning) can also be overridden to do some funky stuff. I still may need to use that for loading screens…
But none of these options seemed to fit what I wanted, and then it dawned on me: a post-process material would do the job. And derp, that’s how I should have been doing it all along. And double derp, that’s how I’m doing the fog in Ytene anyway.
And, as it happens, I have a super annoying bug that’s been in the build forever: when you re-enter the main menu you can see the map for a few frames before the HUD gets applied. At which point there’s a pop to black and everything fades in. The pop looks reet amateur and I’ve been trying to get rid of it for months.
Doing all the fades in the post volume seems to be the fix I’ve been after, which I’m guessing is because the volume’s part of the map; the material parameters are in a collection, which essentially makes them global static, so I can prep for any type of fade, change map, and the new volume automatically picks up the “global” values. Two birds, one stone…
Today I started pulling out the old transitions, and began implementing some material based fades…
Phew. That took a little longer than I expected… Even with some help.
I decided to have a quick look around before I went knee deep into making SDF gradients, and amazingly, found the perfect thing on the marketplace. A whole collection of materials for exactly what I was doing. Highly recommended: Fade Screen Transition Effects in Visual Effects - UE Marketplace (unrealengine.com)
All the existing maps now have fancy fades, using these post-process materials. I’ve tried not to go mental, but each zone has its own type of fade, which is matched by their dungeons. Ytene needed something a bit more specific for the fog, but that didn’t require any custom code.
I quite like how it’s changed the game, feels a little more solid, somehow. And pop-be-gone on the main menu makes me very happy.
Also created a placeholder for female NPCS – I need to get the base mesh off Paul at some point – and added in “Miss Tee”, who’s going to be bird watching in Ytene…
I’ve not been happy with the volumetric fog particles in Ytene for a while. They’re implemented in Cascade, and they’ve never quite collided with the player’s volume correctly. So this morning I re-did them in Niagara.
The collision module seems to act in a different way, casting rays out, rather than hitting a collision type, so my old setup wasn’t working. I needed to create a new trace type and set all the defaults against that. Which took me a good couple of hours to work out…
Once that was working, I spent most of the day tweaking spawn rates, and working out how to kill the particles without a big pop. It’s possible for particles to spawn within the player’s “fog collider capsule” if the player isn’t moving, so I wrote a custom Niagara module to do a distance check against the player and kill anything too close. Trouble is, I haven’t really worked out how to debug Niagara modules, so I’m just assuming my maths was correct. I can’t see as many particles spawning on top of the player, at least…
I had to do a bit of tweaking to the location controller to make sure the screen edges don’t encroach when the player is in a ceremony, and also re-work the update loop, to let me fire off a Level Sequence to warp the player. This gets triggered when the fog is too dense.
And, good news! I think I’ve finally sorted out how to get Level Sequences to retain state when they’ve completed. It’s tucked away in a little setting per channel, the setting on the player itself seems to be entirely irrelevant…
I am sooo happy now that’s solved…
Finished off the warp from the woods and found a bit of friction with the level sequencer… I’ve not found a way to pass parameters to event tracks, or worse, get a copy of the referenced actors from the timeline.
It’s not the end of the world, there’re other ways to get the actors I want, but I’m surprised it’s not a case of drag and drop to pull things out of the timeline. Even getting positions from an additive track seems like something people would want to do all the time?
I might be missing something, again…
Added in some of the music tracks Phil sent over, making sure Sul and its interiors are playing the right thing, did a bunch of text updates, and spent an hour researching for some Quest / dialog puns. Also pushed a build to Steam, as Phil wants to check it out…
Here's the "final" thing:
Previous Post: "Non Player Characters..."Friends:
If you like any of my work, please consider checking out some of the fantastic games made by the following super talented people: