ingame_bed

3D INTEGRATION INTO 2D SCENES

When deciding on the switch from a pure 2D game to combination of 2D and 3D elements, I wanted to maintain the pre-rendered 2D feel of STASIS. Even though I love 3D games, and their endless potential, there is a certain magic around 2D.

Game such as Commandos and Icewind Dale hold up beautifully to this day, largely in part to the use of the 2D backgrounds.

So I’m acutely aware of creating 3D objects that will integrate perfectly into a 2D pre-rendered scene. One way of doing this is by setting up 3D lighting in your scene to accurately represent the same lighting in render. While this is doable, it comes at the expense of time and memory which, let’s face it, are finite resources for a developer. So how to get around this?

Baking!

I’d consider this idea a tried and trusted method. Bake the shadows and lighting into the texture instead of relying on real time shadows and reflections from the scene.

I construct the scene as I would fully detailed pre-rendered background. After which, Nic and I decide with objects should be 3D to best suit the scene and story. We’re mixing 2D sprite maps with 3D animated objects so the best solution is often only visible once the scene has been completed.

Once making that assessment, I create lower poly versions of the chosen 3D objects, while trying to keep as much of the object’s original shape and detail. And because there aren’t many 3D elements in each scene, the low poly models are still rather detailed.

After the low poly models are placed, various renders are done with and without the each object to create the correct shadows and reflections on the background plate.

From there I bake the shadows and textures into the low poly model while it sits in the scene. This was the lighting and shadows on the object are exactly as they would be if it was a 2D pre-rendered sprite.

The result: 3D objects that are perfectly integrated into the 2D scenes.

There are drawbacks to this; if the lighting conditions change drastically the 3D object’s textures have to be re-baked to maintain their integration, but as long as we’re aware of these limitations we design around them.

When the low poly models are used in conjunction with normal maps and lighting, we can create some beautiful looking scenes that still maintain the feel of completely pre-rendered scenes with without many of the memory limitations that those create.

BAKED 3d MODEL LOW POLY BED ingame_bed

 

  • Georgi Trenev

    Nice post! It’s good to see Commandos mentioned, that game still amazes me every time I go back to it (and it’s not only the nostalgia… although that might play a significant part,too).

    But really, I think mixing 3D and 2D in this way is perfect when it comes to adventure games, just seems like it makes it a bit easier to highlight interactable objects apart from the background scene.

  • Nicolas Bischoff

    Thanks Georgi. We are finding the results to be pretty darn awesome. Some of the scenes are looking much better than STASIS, at HD with effects etc. We also don’t have to splice up 2D sprites (for when the player navigates around an object) – which is allowing us to do some funky 3D tricks.