Something else I worked on on Weird West (@WolfEyeGames) is the hiding of walls/floors/etc between player and camera. Roofs dissolve out completely based on some more-involved-than-you'd-think traces, walls dissolve (using TAA dither) from ankle-height up in a plumbob shape #ue4
Initially I was not using a plumbob shape and just trying to math my way out of the problems that come with using a cylinder, this is better and was a suggestion from @kurtruslfanclub (DSD's does that)
That shape reduces a lot of times close to the player character where bits of wall off to the sides of the player would be hidden incorrectly (using a cylinder shape). I do also spheremask a small area right around the player for if you're right up against a wall
The roofs hide when you're under them, but also when you're aiming under them, which was a hassle to get right consistently. Most of the levels were built by the time I was doing this, so solutions that needed level markup were out of the question (and sort of a drag anyway).
If you're aiming into a building you want to see who's in there (it might be a baddie) but you also want to show the roof if you're aiming at someone *on* the roof, even though your aim line might be going straight through a bottom-floor window of the same building. Fraught
Plus, if you do this with a bunch of traces out in your aim direction from your aim location, moving either your character or your aim a little bit can get different result from frame to frame, and now we're flickering the roof and nobody is having a good time.
Plus, the windows aren't at a consistent height.
To fix the frame-to-frame issue I just rounded the player location we do all our traces from to the nearest, like, meter or half-meter ish. This needed some tweaking to not just skip certain windows as you strafe past
If you're not aiming, I think I just ended up tracing up from the player to find the roof, and hiding the right building layers; if no roof I think I'm doing radial traces out in a few-meters-wide circle around the player, and looking for a nearby enough roof to be worth hiding
If you ARE aiming I ignore the player's location and do quite a lot of traces out in the aim direction in like a 30 degree arc, checking upwards for a roof every couple of meters. The aim direction is rounded to the nearest 35 degrees-ish, again so we don't flicker the roofs
The aiming system ended up having sort of a soft lock-on thing; if you're considered to be "aiming" at something it's highlighted red. That's convenient - if it happens, I just forget all this other stuff and act like the player is standing where the target is standing.
So if someone is sniping you from a top level window, and you're aiming at them, you can see the whole top floor. The way layers are hidden means you can't easily do both "show building A's top floor" and "show building B's bottom floor" but I don't think it ever comes up
(but if it was going to it would be when you're in the bottom floor of a building, aiming out the window at an enemy in the top floor of another building, and then you wouldn't be able to see yourself, so you'd just get an outline of yourself). Never happens
Everything uses the same three or four materials, so it was easy to set up material params to opt-out of this per object; eg doors, doorframes, interactables never dissolve (unless they're on a dissolved floor of a building). LDs had to find those cases and disable it on 'em
And you could also disable or enable it per-object instead of per-material by adding a component to that actor
The actual hiding-chunks-of-building stuff, as opposed to the fadey walls, was all @JouanAmate I believe - the results of the traces I mentioned go into a C++ system of his which hides stuff using Layers (an oft-forgotten Unreal feature)
Characters, furniture, etc, which needs to hide along with the floor it's on, has a FloorSensingComponent, and that lets a guy suddenly become visible if he walks out onto the balcony of a hidden floor of a building, for instance. Or hide a vulture when it lands on a hidden roof
That stuff was all very clever and I was pleased not to have to do it. Thanks Jouan!
Oh, another thing was, none of these wall meshes were designed with this in mind, so initially it looked a bit bad, but then Ewan Croft, effects man who I don't know if he's on twitter, made the wall material two-sided and had the backfaces coloured black, which worked nicely
Means the interior wall parts you can suddenly see just look like they're in darkness rather than there's nothing there, in the space between the walls
The plumbobbed wall-fading stuff only kicks in when you're under a roof, except, there are some objects that opt into just doing it at all times, like trees when you're in a forest.
Also, if you're just like "how did you mask all that stuff out without losing the shadows" the material node you want is Shadow Pass Switch
Fun fact, before this system came in we just had the camera going almost full top-down when indoors, so only the roof had to be hidden. I didn't like that super much personally
• • •
Missing some Tweet in this thread? You can try to
force a refresh
Neat Small Things In Weird West You Might Not Notice Thread
-dynamite is imsim mode at all times. if it's lit, it will douse if the lit part of the fuse gets wet. if it falls partly in water, it's still gonna blow if the fuse is dry down to the stick. doesn't matter who threw it
-lit molotovs also can be doused. if you throw one in a river, it goes out instead of exploding and you can fish it out of the river and reuse it. neat!
-shooting or setting fire to an ammo box produces exciting results. you should do it. unless you need ammo i guess
-there are multiple ways to cook raw food. if there's no campfire or stove around, use your imagination. if it seems like it should work it'll probably work
I've begun the PC version of Splinter Cell 4, which I never finished. It's by Ubi Milan and Shanghai again, like 2, which I just finished and quite enjoyed, sort of to my surprise. Xbox/ps2 version of this is by Montreal (devs of 1 and 3) and completely different, but same name
Chaos Theory introduced the "you can see stuff what's electric" viewmode and pretty much did nothing with it, this is already making good use of it, which is neat.
I remember this game being super jank and it is, unfortunately. In this scene the rookie agent eager to prove his worth gets himself killed, but for me he is just getting himself hurt and then ignored. Bummer
Gonna look at Half-Life: Alyx's SDK and tweet about it a little. If you don't know already, I've historically had a big old axe to grind with modern level design tools! Still do. Neither Unity nor UE4 has level design tools worth mentioning built-in. This looks more promising.
Of course, Valve's not Unity or Epic - Valve just makes games; they're not big into licensing. These are internal tools, so there's gonna be jank. It's part of why actually devving on this engine would be a bad idea. But we sure can steal their awesome tool ideas!
An interesting thing straight up is we boot up straight into an Asset Browser, not a level editor. It doesn't assume we want to deal with maps. Interestin'. First thing I'm gonna open is Hammer though.
<me, idly, looking at cat pictures>: the idea that the alien from Alien was created by anybody rather than just evolving makes its existence fundamentally way less scary
the idea that you could just be wandering the universe and come across something incredibly horrible and terrifying is way more scary without it having to have been a biological weapon created by some other dipshit
i guess this is just the ol' problem of compulsively connecting dots. you do it so things make sense and can be understood and not feared, which is a shame when you do it to your own creative work which is a series of scary movies.
level design is a field on life support having been stomped on by expensive AAA workflows which have been artificially forced as standard and has fallen into a hellhole where people confuse it with other skills more often than they don't
theory: widespread adoption of modular mesh based workflows and dropping level design tools came out of epic doing it successfully but that only worked because of them
-being super rich
-making games at the time that didn't particularly need strong iterative level design (gears)
epic own unreal engine so them doing something means AAA generally does the thing which means indie has to follow unless it really wants to put its back out, which is a problem when they do what every AAA does, which is extremely not-generally-applicable solutions