Tech Art Tools for Lunacy: Saint Rhodes

Hello UE community,

I don’t post on here too often and I rarely ever share my work, but I figured that now is a pretty good time to share some tools that I built for a game called Lunacy: Saint Rhodes.
Here’s a link to a Markiplier play-through:

And the original UE thread: Lunacy: Saint Rhodes - Game Development - Epic Developer Community Forums

I did a lot of tech art/environmental work (not everything, but a good bit) and have decided that I’d like to show some of the tools I built and how I built them. Not all of the tools will be in this post due to limited time, but I will update it until all of what I built (that I deem good enough for this post) is here.

A few members (myself included) didn’t have build access until right near the end of production on the demo, which resulted in a lot of these tools being built as sort of a catch-all type deal so that the designers who did have access could work without having to ask me to rebuild the tools.

Tool #1: Dynamic Decals

So this one is pretty neat, I think. The decal system allows the designer to pick between 2 atlas textures: dirt or damage. The damage decals are aligned to the world (along with whatever wall/material it’s being projected to) so that it will seamlessly blend at the edges with the wall/floor/ceiling. The exposed areas of the damage (and the dirt, if necessary) are also world aligned and have their own parameters. These atlases contain a full set of textures and can be changed at run time as they were made entirely in Substance Designer, which allowed the designers to further tweak the decals in case my preferences didn’t align with theirs.

Dirt Atlas:

Damage Atlas:

The damage decal atlas in that photo is a little different because it’s a packed texture that contains certain masks required to provide the illusion of depth seen in the video.
The dirt atlas contains a black and white mask, normals and a roughness texture while the damage atlas contains a packed mask, AO and normal texture.
Only one material handles both sets of textures and is linked to the blueprint actor itself:

If we go down to the very basic level, the material provides us the sub uv coordinates of the atlas that are passed to the blueprint and then exposed for the designers to shift through at will. There’s also a feature that will pick/rotate the dirt decals at random.

The blueprints also provide some much needed ease of use when it comes to working with decals, such as handling rotation and also handles the world aligned aspects of the materials.

As you can see in the video and these screenshots, the dynamic decals can be altered in very significant ways.
The reason I went with the combination of Substance materials and material instances is so that every single detail could be different via material instance dynamics.
If there are any questions about the specifics of the decal system, just feel free to ask.

I forgot to explain the kind of obscure but most important thing powering this system…
Sub UVs

Alright, so to start off with, I took the number of my rows/columns of each atlas (for this example, the dirt atlas) and then divided it by the full UV scale (which is 1). So you’d have 1/3 = .3333, and you set your initial texcoord node U and V values to that.

The forums are refusing to let me embed any photos at all

So to proceed, we need to imagine our atlas as a grid that has specific coordinates that we need to get to.

To manage this, you need to add 0, .3333 or .6666 in whichever direction you’re wanting to go, and since we set our texcoord uv values to .3333, that means that one of the images on our atlas will be the default state.

My numbers may be wrong there as I’m doing that from memory, but that is the general idea of it.

So to implement this into the BP tool, I passed in the parameters used to add our values to the initial textcoord node.

This is the setup to do that and I set up one of these functions for each cell on the grid.
After that, it just boils down to having a function that contains a sequence node that hooks up to each UV function with an exposed boolean so that the designer can pick the texture they want to use.

That about covers it for the basics of this system, which we used in one more area of the demo. There’s a lot of paper scattered around the level, and we needed a lot of variants to choose from…which is why I built the basic system I’ve covered here.

Tool #2: Dynamic Fog Volume (Ground/Ceiling)

HQ gif of the subtle movement the fog can have:

Here’s a really slightly less compressed version of the video:

This one started out with an idea for very simple fog volumes that MetricZero had that involved layering simple plane meshes on them and applying a simple fog material to each one. However, this wasn’t enough, so I decided to take the material as far as I needed.

I couldn’t seem to find the original thread showcasing the stacking method for the meshes, so this image will have to suffice:

It’s very simple and just involves user input on the amount of layers and the distance between each layer.

The material itself is a little more complicated, though:

  1. First, we have world aligned UVs so there’s no visible tiling.
  2. We take time and multiply it by a global scalar parameter.
  3. I made a custom noise inside of Substance Designer (to have control over internal tiling and visual appearance) and then layered 4 instances together, with each having different panning values passed into them.
  4. Color is very simple with a single vector 3 parameter and scalar parameter that are lerped together by the noise chain.
  5. There’s a depth fade that’s lerped with by an inverted version of itself, and that is multiplied by the noise chain before being fed into the color lerp node.
  6. The vertex movement is a bunch of math to simulate ocean wave movement with the addition of being multiplied by the noise’s normal map, and that gets plugged into WPO.
  7. This may be entirely unnecessary, but I ran the noise chain into the two perturb normal nodes and plugged those into the normal slot.

Some thoughts/notes:

  1. This does have hard edges on the planes (you could probably rectify this, but I had no need to do so as our demo was set in a house), but they aren’t that noticeable if you use a reasonable opacity for the fog.
  2. You could very likely replace a baked texture with procedural noise directly inside of UE if you wanted to go that route.

It’s not as complicated as the decals, but I still think that it’s a very nice tool to have around.

fog looks very cool to me !! grats !!
would you mind to share it, so i could use it for my pont & click adventure game, too ??
kind regards

Congrats on getting a popular streamer to play your game, and like it. Really must be a cool feeling for you too watch.
I like the decor, and the crayon drawings are a cool touch.
Thanks for sharing your system.

I can’t share the project files at this time, no. Everything up to the vertex movement is very basic and you should be able to replicate that stuff pretty easily with some effort. You could probably get about with replacing the vertex math with some simple movement based off of some normal maps (I think) manipulation.
Thanks, I appreciate it. The whole team did their best in the timeframe that we had to work in.

Great to see this! Thanks for sharing man.