From 0ea5fc66924303d1bf73ba283a383e2aadee02f2 Mon Sep 17 00:00:00 2001 From: neodarz Date: Sat, 11 Aug 2018 20:21:34 +0200 Subject: Initial commit --- docs/tile_bank.html | 178 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 178 insertions(+) create mode 100644 docs/tile_bank.html (limited to 'docs/tile_bank.html') diff --git a/docs/tile_bank.html b/docs/tile_bank.html new file mode 100644 index 00000000..a5936f63 --- /dev/null +++ b/docs/tile_bank.html @@ -0,0 +1,178 @@ + + + + + Spécification du plugin de maillage des patchs dans 3dsmax + + + + + + + + +

The +tile banks used in NeL landscape.

+

1.Tile bank

+

A NeL tile bank is a +binary file in which is stored bitmap filenames that are used to map +the landscape.

+

Here is an overview of the +tile bank:

+


+

+

+

2.Tileset

+


+

+

A tile bank is composed by +several tileset. A tileset is a kind of material (like grass, wood, +rock).

+

This material is divided +in small textures (128x128), large textures (256x256) and transition +textures (128x128 alpha).

+

2.1.Small and large textures

+


+

+

A tile in the NeL +landscape is a bitmap with a size of 128x128. A patch can have 2x2 +tiles, 4x4 tiles, 8x8 tiles and 16x16 tiles. But to have bitmaps with +a better quality, we can use larges textures (256x256) as 4 tiles.

+

In the painter plugin, you +can choose to paint 128x128 bitmaps or 256x256 bitmaps. The pixel +ratio stays the same.

+

All the textures have two +channels: diffuse and additive. We use a bitmap for diffuse and +another one for additive.

+

2.2.Transition textures

+


+

+

Transition textures are +used to make smooth tileset changes. To do this, we have a set of 48 +transition textures. With this set, we can make all transition we +want with some diversity (two type of transitions are randomly +choosen to increase diversity).

+

Transition textures are +bitmaps of 128x128 pixel with a third channel: an alpha channel. This +channel is a grayscale bitmap. It is used to make the transition like +this:

+



+

+


+

+

Here is the transitions +set:

+

+

This is the 48 alpha +bitmaps you need to build your bank.

+

Orange pixels are +alpha=255 and black pixels are alpha=0.

+

In fact, you only need to +draw 12 alpha bitmaps to fill this bank. The others are computed with +a rotation. Here is the 12 alpha bitmaps you really need:

+

+

The batchload function of +tile_edit.exe load all the alpha transitions in one shot. To use the +batchload function, the alpha bitmaps must have a name like +wood_alpha00.tga, wood_alpha01.tga. The number of a transition tile +is given by its position in the previous set. The first (left, top) +is number 00, and so on, first to the right then to the bottom.

+

2.3.Bitmap check

+

To avoid blinear +discontinuity using tiles, tile_edit.exe performe some checks to be +sure bilinear filtering will work.

+


+

+

Each time you add a bitmap +in tile_edit.exe, by drag and drop or with the “add” or +“replace” functions, the program checks the tile pixels. +The tiles must follow whose rules:

+
    +
  1. 128x128 bitmaps must + have the same top and bottom pixel row.

    +
  2. 128x128 bitmaps must + have the same left and right pixel column.

    +
  3. 256x256 bitmaps must + have two times the 128x128 pixel row at top and bottom.

    +
  4. 256x256 bitmaps must + have two times the 128x128 pixel column at left and right.

    +
  5. Two transitions with + the same kind of border must have same pixel border. For exemple, + check the transition n°0 right border and transition n°1 + left border. They have the same type. So, the right pixel column of + transition n°0 must be the same than the left pixel column of + transition n°1.

    +
+


+

+


+

+


+

+


+

+


+

+


+

+


+

+


+

+


+

+


+

+


+

+


+

+


+

+


+

+


+

+


+

+


+

+


+

+


+

+


+

+


+

+


+

+


+

+


+

+


+

+


+

+

You can see in the above +picture a 128x128 bitmap with its U and V pixel borders and a 256x256 +bitmap with the double U and V pixel border.

+


+

+


+

+


+

+ + -- cgit v1.2.1