Friday, 11 June 2010

WANG: PART 1

Creating your own terrain texture set is the best way to make your route stand out from the crowd. It also allows you to order and control how you group your textures.

What is Wang?

Wang tiles are sets of textures that fit together to non-periodically tile across the terrain,
creating expanses of non repeating texture and avoiding the 'carpet' effect.

More info can be obtained by a very quick internet search. I have also seen applications that make the wang textures, however I have to say that I never seemed to get the results I wanted.
Making them by hand can be time consuming but like all things the more you make the easier it gets.
So, lets look at the basics before we get into the details.

Railworks uses 8 wang tiles to create a terrain texture and like everything in RWs they need to be named correctly.
For Example:

Grass01_A
Grass01_B
Grass01_C
Grass01_D
Grass01_E
Grass01_F
Grass01_G
Grass01_H

These textures need to be 32 bit which means they need an alpha channel. The Alpha channel is used for the blending between different texture sets.

How do we get the textures to tile in a set?

The 8 textures in a set get tiled in a certain way. This can be best explained by using a colour diagram.
(see image below)


So, using this method I would make 4 key tileable 256/256 textures.
I name them; Red, Blue, Yellow and Green. This helps me keep track of what I am doing.

From these 4 textures (which each need to be tileable with itself) you can make the 8 you need.

So, to make texture A you would copy the top from red texture and place it at the top, right side from the yellow, blue from the left and green from the bottom. (see image below)

Texture_A


Texture_B


Texture_C



Next up in Part 2, picking the right image to get your textures from and getting the scale correct for ingame. (you don't want pebbles the size of footballs).


No comments:

Post a comment