Now that I have most of the core SkyCars engine developed, I’ve been working on one part of the game that has been left behind a bit: Art. Especially environmental, ambient, mood-setting art. It’s my firm belief that lava, when used sparingly, injects life and vibrancy into a scene. I especially like the combination of lava with organic rocky terrains, and with brutalist industrial tech architecture. Yes it’s cliché, but lava is found in many games for a good reason.
There’s good lava and bad lava. Bad lava is generic, semi-uniform, blurry, and orange. Good lava is a bit more difficult to create. Good lava oozes and flows, has different layers, is high-contrast, is emissive, and looks dangerous! I’ve tried to create good lava in SkyCars, which is a bit challenging given the graphical constraints of mobile devices.
It’s not perfect, but I think it works well in this situation. The lava actually looks much cooler in-game because it has overlapping animated layers, glows, and cascades nicely over the edges of the rocks and platforms. Here’s a general description of how I created this effect.
- Create a lava texture using Photoshop. Rendering difference clouds using bright yellow and orange works well. I then drew in more details, such as dark spots and corrections. The clone stamp brush works well here, as well as the burn tool. Make sure the texture tessellates on all sides! Save this as “lava1.png”
- Duplicate the texture, rotate it by 90 degrees, and manually modify it so it’s not identical to the first. Perhaps give it more mids and darks than the original texture. Save this as “lava2.png”
- Create your lava material. Because I’m developing for mobile, I can’t use any shader effects. For performance reasons, I opted not to apply ripples (geometric or procedural texture-based) to the surface of the lava. Create 2 layers in your material using your lava1 and lava2 textures. Set the blend mode to “modulate.”
- Give each layer it’s own scrolling animation. I gave both layers a repeating sinusoidal translation in UV coordinates. I made sure the parameters were different for the U and V axes (or X and Y if you prefer), as well as for each layer. For the cascade (lava fall) material, I did the same thing as above, but changed one of the axes (V in this case) to a sawtooth motion so that it scrolls seamlessly.
I hope this helps somebody. Video blogs are coming soon!