Cartography Shop to Unity3D

Cartography Shop offers quite a cheap world building and lightmapping tool and it pretty much has tools like Dark Basic Pro in mind. And of course it doesn’t export to any file formats Unity3D can import. But all you need for this tutorial is:

Cartography Shop, LithUnwrap and Unity3D.

Here is my cartography shop scene:

In Cartography Shop

A pretty basic test scene with 1 light.

Export your scene as a .x to your preferred location. It will take all the lightmaps & textures with it. You’ll have 2 .x files, one’s the scene, the other is the lightmap. Load each of these into LithUnwrap and export as .obj into the same folder. If you haven’t already done so, move all of these files into your Unity project directory.

Insert both objects into your scene and make the light map a child of the scene object and position it at 0,0,0 (so it’ll match its parent’s extact position. You’ll see no lightmap. Select your lightmap object’s material and change it to “Transparent/Diffuse”. Under ‘main color’ adjust the alpha slider (or even the color if you wish) to a setting that best suits your object. I’ve got my alpha at 170. This method isn’t as effective as DBP’s ‘ghost object’, but it’s still able to create an effective looking scene for your Unity projects with little effort.

In Unity3D

Update 13/05/2012

The export in Cartography isn’t always necessarily perfect, certain lightmap object may not load into Lithunwrap or other 3D editors for that matter (at least, ones I’ve tried). To rectify this, build your scene in C-Shop, don’t worry about the light, export as .x and import in Gile[s] (which is free) and lightmap it in there and export as .3ds* Follow THIS tutorial on getting Gile[s] up and running, just ignore the bit about exporting to .x as it’s using the objects for a different engine. You can get Gile[s] HERE.

*Normally I would use .obj, but .3ds is better because Gile[s] will export .obj as a single mesh, so when you load it into Unity3D you’ll only be able to use 1 texture. .3ds on the other hand will keep all of your objects separate and you’ll have the materials exported too (they may not necessarily load with the texture, but just change the materials rather than create new ones for each object).

Now, how you deal with a Gile[s] Light map is different. The above method doesn’t work for Gile[s] exports. You’ll ONLY need the light map object. You’ll notice all the texture materials have applied to the lightmap object instead of the actual light map and the resolution will appear really low. The reason for the low resolution appearance is that Gile[s] has created a new UVMap for your lightmap. For each material, just change it to a Legacy Lightmap shader and apply your lightmap image to it. You can also tile the texture image to compensate for how low res it looks.

You will probably notice that the lightmap is too feint in the editor, not like it appears in Gile[s], I’m not sure why this is and Unity doesn’t seem to offer an option to fix this (if there is, I’ve missed it). My solution was to adjust the brightness/contrast of the lightmap itself in an image editor.

Here is the same scene in Unity3D (just with the ambience knocked up)


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s