<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <HTML> <HEAD> <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=iso-8859-1"> <TITLE>Spécification du plugin de maillage des patchs dans 3dsmax</TITLE> <META NAME="GENERATOR" CONTENT="OpenOffice.org 641 (Linux)"> <META NAME="AUTHOR" CONTENT="Nevrax"> <META NAME="CREATED" CONTENT="20010220;19060000"> <META NAME="CHANGEDBY" CONTENT="Cyril Corvazier"> <META NAME="CHANGED" CONTENT="20010221;11520000"> <STYLE> <!-- @page { size: 21cm 29.7cm; margin: 2.5cm } H1 { margin-top: 1.06cm; margin-bottom: 0cm; color: #ffffff; text-align: justify; widows: 2; orphans: 2; text-decoration: underline } H1.western { font-family: "Arial", sans-serif; font-size: 14pt; so-language: fr-FR } H1.cjk { font-family: "Times New Roman", serif; font-size: 14pt; font-weight: bold } H2 { margin-bottom: 0.11cm; color: #ffffff; text-align: justify; widows: 2; orphans: 2; text-decoration: underline } H2.western { font-family: "Arial", sans-serif; font-size: 12pt; so-language: fr-FR; font-style: italic } H2.cjk { font-family: "Times New Roman", serif; font-size: 12pt; font-style: italic; font-weight: bold } --> </STYLE> </HEAD> <BODY LANG="en-US" TEXT="#000000"> <P LANG="en-GB" ALIGN=CENTER STYLE="margin-bottom: 1.27cm"><FONT SIZE=5 STYLE="font-size: 20pt"><B>The tile banks used in NeL landscape.</B></FONT></P> <H1 LANG="en-GB" CLASS="western">1.Tile bank</H1> <P LANG="en-GB" STYLE="margin-bottom: 0cm">A NeL tile bank is a binary file in which is stored bitmap filenames that are used to map the landscape.</P> <P LANG="en-GB" STYLE="margin-bottom: 0cm">Here is an overview of the tile bank:</P> <P LANG="en-GB" STYLE="margin-bottom: 0cm"><BR> </P> <P LANG="en-GB" STYLE="margin-bottom: 0cm"><IMG SRC="img/tile_bank_html_70d0f5c5.png" NAME="Graphic1" ALIGN=BOTTOM WIDTH=573 HEIGHT=484 BORDER=0></P> <H1 LANG="en-GB" CLASS="western">2.Tileset</H1> <P LANG="en-GB" STYLE="margin-bottom: 0cm"><BR> </P> <P LANG="en-GB" STYLE="margin-bottom: 0cm">A tile bank is composed by several tileset. A tileset is a kind of material (like grass, wood, rock).</P> <P LANG="en-GB" STYLE="margin-bottom: 0cm">This material is divided in small textures (128x128), large textures (256x256) and transition textures (128x128 alpha).</P> <H2 LANG="en-GB" CLASS="western">2.1.Small and large textures</H2> <P LANG="en-GB" STYLE="margin-bottom: 0cm"><BR> </P> <P LANG="en-GB" STYLE="margin-bottom: 0cm">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.</P> <P LANG="en-GB" STYLE="margin-bottom: 0cm">In the painter plugin, you can choose to paint 128x128 bitmaps or 256x256 bitmaps. The pixel ratio stays the same.</P> <P LANG="en-GB" STYLE="margin-bottom: 0cm">All the textures have two channels: diffuse and additive. We use a bitmap for diffuse and another one for additive.</P> <H2 LANG="en-GB" CLASS="western">2.2.Transition textures</H2> <P LANG="en-GB" STYLE="margin-bottom: 0cm"><BR> </P> <P LANG="en-GB" STYLE="margin-bottom: 0cm">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).</P> <P LANG="en-GB" STYLE="margin-bottom: 0cm">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:</P> <P LANG="en-GB" STYLE="margin-bottom: 0cm"><IMG SRC="img/tile_bank_html_m2b842ebd.png" NAME="Graphic2" ALIGN=LEFT WIDTH=614 HEIGHT=389 BORDER=0><BR CLEAR=LEFT><BR> </P> <P LANG="en-GB" STYLE="margin-bottom: 0cm"><BR> </P> <P LANG="en-GB" STYLE="margin-bottom: 0cm">Here is the transitions set:</P> <P LANG="en-GB" STYLE="margin-bottom: 0cm"><IMG SRC="img/tile_bank_html_7f255931.jpg" NAME="G1: transitionset%20full" ALIGN=BOTTOM WIDTH=421 HEIGHT=554 BORDER=0></P> <P LANG="en-GB" STYLE="margin-bottom: 0cm">This is the 48 alpha bitmaps you need to build your bank.</P> <P LANG="en-GB" STYLE="margin-bottom: 0cm">Orange pixels are alpha=255 and black pixels are alpha=0.</P> <P LANG="en-GB" STYLE="margin-bottom: 0cm">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:</P> <P LANG="en-GB" STYLE="margin-bottom: 0cm"><IMG SRC="img/tile_bank_html_m637dd59a.jpg" NAME="G2: transitionset%20without%20rotation" ALIGN=BOTTOM WIDTH=419 HEIGHT=554 BORDER=0></P> <P LANG="en-GB" STYLE="margin-bottom: 0cm">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.</P> <H2 LANG="en-GB" CLASS="western">2.3.Bitmap check</H2> <P LANG="en-GB" STYLE="margin-bottom: 0cm">To avoid blinear discontinuity using tiles, tile_edit.exe performe some checks to be sure bilinear filtering will work.</P> <P LANG="en-GB" STYLE="margin-bottom: 0cm"><BR> </P> <P LANG="en-GB" STYLE="margin-bottom: 0cm">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:</P> <OL> <LI><P LANG="en-GB" STYLE="margin-bottom: 0cm">128x128 bitmaps must have the same top and bottom pixel row.</P> <LI><P LANG="en-GB" STYLE="margin-bottom: 0cm">128x128 bitmaps must have the same left and right pixel column.</P> <LI><P LANG="en-GB" STYLE="margin-bottom: 0cm">256x256 bitmaps must have two times the 128x128 pixel row at top and bottom.</P> <LI><P LANG="en-GB" STYLE="margin-bottom: 0cm">256x256 bitmaps must have two times the 128x128 pixel column at left and right.</P> <LI><P LANG="en-GB" STYLE="margin-bottom: 0cm">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.</P> </OL> <P LANG="en-GB" STYLE="margin-bottom: 0cm"><BR> </P> <P LANG="en-GB" STYLE="margin-bottom: 0cm"><BR> </P> <P LANG="en-GB" STYLE="margin-bottom: 0cm"><BR> </P> <P LANG="en-GB" STYLE="margin-bottom: 0cm"><BR> </P> <P LANG="en-GB" STYLE="margin-bottom: 0cm"><BR> </P> <P LANG="en-GB" STYLE="margin-bottom: 0cm"><IMG SRC="img/tile_bank_html_3160d7fa.gif" ALIGN=LEFT><BR> </P> <P LANG="en-GB" STYLE="margin-bottom: 0cm"><BR> </P> <P LANG="en-GB" STYLE="margin-bottom: 0cm"><BR> </P> <P LANG="en-GB" STYLE="margin-bottom: 0cm"><BR> </P> <P LANG="en-GB" STYLE="margin-bottom: 0cm"><BR> </P> <P LANG="en-GB" STYLE="margin-bottom: 0cm"><BR> </P> <P LANG="en-GB" STYLE="margin-bottom: 0cm"><BR> </P> <P LANG="en-GB" STYLE="margin-bottom: 0cm"><BR> </P> <P LANG="en-GB" STYLE="margin-bottom: 0cm"><BR> </P> <P LANG="en-GB" STYLE="margin-bottom: 0cm"><BR> </P> <P LANG="en-GB" STYLE="margin-bottom: 0cm"><BR> </P> <P LANG="en-GB" STYLE="margin-bottom: 0cm"><BR> </P> <P LANG="en-GB" STYLE="margin-bottom: 0cm"><BR> </P> <P LANG="en-GB" STYLE="margin-bottom: 0cm"><BR> </P> <P LANG="en-GB" STYLE="margin-bottom: 0cm"><BR> </P> <P LANG="en-GB" STYLE="margin-bottom: 0cm"><BR> </P> <P LANG="en-GB" STYLE="margin-bottom: 0cm"><BR> </P> <P LANG="en-GB" STYLE="margin-bottom: 0cm"><BR> </P> <P LANG="en-GB" STYLE="margin-bottom: 0cm"><BR> </P> <P LANG="en-GB" STYLE="margin-bottom: 0cm"><BR> </P> <P LANG="en-GB" STYLE="margin-bottom: 0cm"><BR> </P> <P LANG="en-GB" STYLE="margin-bottom: 0cm">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.</P> <P LANG="en-GB" STYLE="margin-bottom: 0cm"><BR> </P> <P LANG="en-GB" STYLE="margin-bottom: 0cm"><BR> </P> <P LANG="en-GB" STYLE="margin-bottom: 0cm"><BR> </P> </BODY> </HTML>