Get Cracking: Decals, decals, decals (Patreon)
Content
Here's a quick sneak peek at the decal stuff I've been working on!
In games, a decal is a texture that is projected onto other surfaces; traditionally you use this for stuff like bullet holes, blood splatter, graffiti, etc. – and I've been planning to use decals to portray cracks in the streets, for quite a while now.
However, Unity's "Universal Render Pipeline" is lacking a critical feature to make decals work, properly: Layer masking. Which means, yes, I can project a decal texture to the ground... however I'm also projecting it on to anything else that's getting in the way, i.e. cars, paws, etc.—it's one of those features that are technically there, but not really usable.
In the latest beta/alpha versions they have finally added layer masking, which is exactly what I have been waiting for, so I upgraded immediately: Unfortunately... it's still not quite usable, at the moment. That's the danger of going for alpha/beta features!
But I thought I'd still get started on decals: Worst case you can see cracks be also projected to the character's paws, if you look really closely (just don't, for now)—and hopefully Unity will fix their decal features, eventually! Until then, I'll try to put the decal projectors as low to the ground as possible...
Cracks!
I've modeled the cracks in Blender, using two very handy add-ons: Cracker and One-Click Damage!
And to make sure I have some variety, I've modeled a bunch of them, for different sizes of impact, too:
In the next step I used these high-poly models to bake my decal textures, in Substance Designer. From there I exported textures for normal maps, ambient occlusion, and so on, to give them their final look, in the game.
Overall, I'm very happy with the result: Although, as you can see at the end of the video, this effect only works really well if the viewing angle isn't too flat. After all, it's still just a projection of a bunch of flat textures, with no actual depth.
What's next for Decals
To really sell the effect, I will still add a bunch of particle systems, so that some dust and debris gets thrown up, whenever the ground cracks.
I may also still add some alternative decals to use on grassy terrain: The cracks don't work well on grass, so I've set it up currently that no decals are spawned there, at all... But having some paw prints, or such, in the grass would probably still be nice.