Spellcaster Studios

Make it happen…

Building seamless roofs…

I know, I know, we’ve been silent… But we’ve been working!

On my part, I’ve been refactoring the resource system, and the task is almost complete for Spellbook and the Surge Player… Still need to tweak some minor bugs (and stuff I’ve found that was wrong for years and years!), but it’s mostly done, with little performance impact… Now I still need to upgrade the SurgeEd to use the new resource system, but we should have complete dynamic resource update in 2 or 3 weeks (not sooner, since RealJob™ is been a killer lately, and I’m going away on a business trip for a week)…

Anyway, Rincewind has been working on the asset set for the city of Calabeth, and it was quite hard to get a good pipeline working for the type of city assets we wanted to build, mainly the roofs.

Below you can see the result of the work he did (extremely low poly end result, just three quads for the roof in the example below):

10

After the break, you can see an overview of the end process we’ve found to build seamless roof textures…

First, he modeled a single roof tile, complete with UV mapping:

1

Afterwards, he composited them together, not allowing for intersections:

2

Afterwards, he selected an area of interest in series of tiles, defining in this way what was going to be the “tile” (granularity) of the asset he was going to use to build roofs:

3

In the upper-left corner, the area in blue would be the area necessary if we’d defined the “tile” to be just a single tile. Why take a piece of the middle, instead of a whole tile? Well, so that we get seamless tiles… This way, the influence of the next tile is felt on the normal map that we’re going to generate.

He ended up selecting an 9×5 tile area to be our “atomic tile”.

5

The color map of the tiles was done in a semi-random fashion, by rotating the UVs of individual tiles, in a way to add variety to otherwise monotonous visual.

To minimize seams, he grabbed the leftmost column, and copied to the right, and grabbed the top row and copied to the bottom:

6

This ensures the color map is seamless.

Finally, to build the normal map from the detailed model, he just added a plane and projected the color, normal and specular channels to that super-simplified mesh (the quad):

7

To put in some more detail in the final object, he decided to build a heighmap as well, to use as a base for the ambient occlusion map, using the same process:

8

The end result:

9

A seamless roof texture with color, normal, specular and ambient occlusion map… There might have been other processes to achieve the same result, but in our experience, building seamless textures for this sort of thing that don’t look drab and monotonous is usually more work than this!

Variations on this are also pretty easy now that we’ve got the process tuned, including different tile materials (obsidian tiles anyone?), or adding cracked and broken tiles as well…

Comment