Hey all! It’s workbook time again. I’ve made a lot of progress these last two days, so let’s get to business!

I’ve previously talked a bit about the issues I had with having more than two materials in the level I exported from UDK. Well, yesterday I solved that problem as well! It turns out that as long as I use separate materials for every surface that needs it, as opposed to using material instances (which are materials with slight variations, in UDK), the level gets exported correctly, with more than two materials! This made my workflow a whole lot smoother, since I didn’t need to add that potential extra step in Maya, what with assigning the materials through there and all.

Of course, with one issue out of the way, another one usually always appears. This time was no exception. With the materials and all that sorted out, I started getting problems with the lightmap UV’s for my level. I’ll just explain what I mean real quick, in case anyone doesn’t know what it is. Every mesh/model imported into Unity that is going to be lightmapped, that is have lights and shadows baked on top of the usual texture, needs a second set of UV-coordinates to tell the lightmapper how this lightmap texture should be applied to the model. The generated lightmap UV’s for my level model started misaligning and scaling horribly, which caused some serious artefacts on the baked lighting. It looked kind of like the walls were origami-made, except the shapes of the origami made no bloody sense. I don’t have a screenshot of it, but believe me, it was not a pretty sight!

However, I would not let myself be bested by a glitch in the exporter. I went back into UDK, removed all the static meshes from the map itself and unnecessary, UDK-specific objects. With those gone, I had only the bare shell of the level, just the CSG itself. I had to separately export the static meshes and place them again in Unity, which wasn’t a whole lot of work since there were just some 10-ish models. I had planned to place all of the decoration in Unity anyway.

After having removed the unnecessary objects and making sure that the undo history in UDK was cleaned, I exported the level again. It turned out that I had found the cause of the issue! The lightmap UV’s now looked right and after testing a quick lightmap bake, it turned out that they were. With that issue out of the way, I just continued building the final few pieces in UDK.

I’ve mostly been placing out lights and making the simple game mechanics that I needed today. The most complex thing is basically just the player pushing a button, which in turn lowers/raises something in the level, like a platform needed to reach the next level. Not any deeply engaging mechanic, but I’m trying to keep it all consistently simple; layouts, textures, gameplay, etc. The first Chamber is almost done. Basically, the only thing it needs before it can be called final is a door, with accompanying model, material and script. Nothing to difficult to make now that I have the base for moving objects with my button triggering script that moves objects.

Phew, a lot of words right there. If you did read all that, I can’t leave you with just a few final words. Let’s have one of those screenshot thingies!

A view of the level from inside Unity. There’s a lot more lights, models and triggers and stuff in it now! (Click to enlarge.)

Oh yeah, just a little reveal right there in the screenshot. The project’s called Mortal Spire. You’ll know why soon enough, but I’d like to keep a lid on things for a little while longer, as not to spoil the whole surprise at once!

That’s all for now. Until next time!

Marcus out.