Grime and Punishment
[p]Hi everyone! Welcome back to another dev blog. Brian and Robin are fresh back from a week off, and we’re excited to get back into talking about the game! Today we’re doing a deep-dive into one of the game’s tentpole visual effects: grime![/p][p][/p][p]Spoiler label: this post describes the grime visual effect and discusses small gameplay interactions.[/p]
From left to right: pre-grime, post-grime, and grime blending under the hood![/p][p][/p][p]
[/p][p]In combination with the vegetation system, grime helps us sell the age of environments like this computer room[/p][p][/p][p]Our grime technology applies dirty texture overlays over any surface. It works both on flat floors and wall surfaces, as well as three-dimensional pieces of furniture. This is accomplished using a modified version of a triplanar mapping shader.[/p][p][/p][p]In simple terms, triplanar mapping is a graphics technique that automatically wraps textures over arbitrary geometry in a way that looks natural. The "arbitrary geometry" part is important here; on a typical model, 3D artists manually assign which parts of a texture go on which parts of the object using a process called UV mapping. This makes a lot of sense for something like a chair, where you don't want the cushion color on the legs or the wood color on the cushions, but it's pretty inefficient for a homogeneous repeating texture like grime.[/p][p]
[/p][p]Triplanar mapping works by defining wrapping textures for the top, sides, etc. of a mesh and then elegantly blending between them on the corners. One issue with this approach for us is that Dandelion void uses “crunchy pixel” textures for its world geometry without antialiasing. If we just blended between our top and wall textures, this would create smooth regions that break the pixel grid. [/p][p][/p][p]Our solution is that instead of linearly blending on these corners, we use a noise function to combine the two textures like a tile mosaic; note the regions in the screenshot below where you can see little boxes of the red and the yellow intermingling. This allows for a more seamless transition between the two textures without having to compromise on our precious crunchy pixels. [/p][p]
[/p][p]Our grime shader is what I call a “garlic salt” effect. It works with any dish, and everything you sprinkle it on tastes better![/p]
Aging Gracefully
[p]The visual identity for Dandelion Void is “Spaceship Reclaimed by Nature.” Launched hundreds of years ago, the once-gleaming Pergola has fallen into ruin. With this in mind, it’s very important for our environment to look like it has gone to seed.[/p][previewyoutube][/previewyoutube][p]When we started Dandelion Void, we were just trying to nail the architecture and design language of the ship as it was built. Our earliest builds looked nice, but the environment more closely resembled the Pergola in its prime than its derelict era. The leafy ponic plants helped a bit, but everything was still too “clean.”[/p][p]Enter: the grime pass![/p][p]Grime-based Gameplay
[p]Our grime isn't just a pretty face: It also serves an important gameplay function in our base building system. Using a designated tool, the player can clean grime off of floors and furniture objects![/p][p][/p][p]Cleaning grime is one of the first things you might do when picking a safe room to turn into a temporary or permanent base. In addition to being satisfying and aesthetically pleasing, certain types of furniture will offer extra benefits when they are clear of grime. [/p][p][/p][p]Our grime system is open-ended and supports multiple categories of filth. The green algae is the most visible, but we also have a more subtle gray dust effect, and ideas for future types of grime. In addition to looking different, grime classes also have secondary effects like changing the footstep sound; algae provides a satisfying “squish” while dust will use the standard hard surface sound. We also support infrastructure for requiring different tools to clean different grime classes, creating opportunities for items like scraping knives, sponges, sandpaper, etc.![/p]Bedtime for Grime
[p]That’s enough about grime! We’ve really enjoyed getting down and dirty about this system. If we're being honest, we also really, really feel like washing our hands.[/p][p][/p][p]Take care everyone, and have a great week![/p][p][/p]