Textures

From EncyclopAtys

Jump to: navigation, search
en:Textures
fr:Textures environnementales
 
UnderConstruction.png
Translation to review
Don't blame the contributors, but come and help them 😎

Reference text ( Maintained text, used as reference ) :
Notes: (Dorothée, 2021-12-03)


Environmental Textures conception and preparation

" Tutorial not yet finished "

The environmental textures are those used in the 3D modeler (at the moment 3DSMax) on the quadpatches serving to represent the environment (ground and natural reliefs). They have to be created under a very precise format and then prepared inside a tileset (an ensemble of tiles with similar textures) which are regrouped in a "tilebank", allowing the creation of a complete environment for a continent type.

Creating the pictures

The tiles need to be 128x128 pixels OR 256x256 piexels exactly. They absolutely must respect some content constraints: the top and bottom pixel bands have to be identical for a whole tileset, as must be the right and left bands. This allows the system to superimpose those borders so they are only one pixel in the rendering.

Tiling 01.png

For the 256 textures, they have to be taken as a set of 4 128x128 tiles. It is therefore vital that the border be compatible with the 128 of the same tileset.

Tiling 02.png

The center portions will have to be merged one with the other, as if they were 2 tiles of 128x128, so it's important to consider this in the motif (the two pixel lines in the middle will become a single one).

Example: starting with a high definition of a ground: [http:www.cgtextures.com/texview.php?id=5611&PHPSESSID=k872lvlfkds965i1un8a43o4b1 Gravel0031_1_L.jpg], taken from the excellent website [http:www.cgtextures.com cgtextures.com].

I reduce its size to a quarter to increase content and acutance of the small zones. I select 128x128 pixels, "ctrl+C/Ctrl+V > Paste as a new picture". I now have a 128x128 pixels picture.

I'll make the picture repeatable to avoid the visually shocking string that can happen when you serial paste it. Filters exist, but I'd rather control the string from begining to ending and explain it at length for this tutorial.

I do "Layer> Transform > Offset".


Tiling 03.png

I get an offset of the picture starting from:

Tiling 04.png

and we get:

Tiling 05.png

We can guess the junctions due to the offset in the middle parts of the picture, so I correct it with the "buffer" tool, for example, or by redrawing it manually the way I want it. I get:

Tiling 06.png

We now can get a new "offset" to get back the original picture, but with new soft transitions at the borders.

To be sure the borders fit perfectly, I select a 1 pixel band at the top and copy it at the bottom. I do the same with the left band, setting it to the right. Then I select a 1 pixel band around the picture and copy/paste it in a new layer I name "border".

Tiling 07.png


It's this border I must keep for every picture. I can now make different selections of my reference picture and copy them in a layer under that border, apply to them the same treatment as I did to the first picture and each time export the result in a different uncompressed tga, respecting the naming conventions for the pictures of a tileset: [NAME]<now can be organised in subparts to be defined: by region, by surface (ground/walls), by type of soil... I save my gimp file with the layer name named by the number of the first tile of the string:

Tiling 08.png

I repeat the import operation with several soils and each time, I offset them and make sure the junction with the border layer is soft enough. I name each layer in relation with the [ID] number of the corresponding TGA so I can easily find or modify the source. This is even more important when I amek tiles for a different seaons, changing the colors, adding details or anything. It is good to create at least 4 to 6 128x128 tiles for a tileset. It allows for different rendering. For commodity, I put all the first tilels in a layer file with the name and specificities of that particular string:

Tiling 09.png


Create the tilebank

A Tilebank is a set of tilesets (usually linked to an ecosystem), a group of tiles presenting a particular type of surface. It's with those that we paint the ground.

Start the TileBank creation software. It's the software tile_edit_r.exe (Windows only) on [http:ryzomcore.atlassian.net/wiki/display/RC/Downloads+for+Windows|NelTools] to be downloaded and installed.

Left click on the button besides "Absolute path"

Tile bank manager step 00.png

Change the path for the path of the texture tiles. If you start from a RyzomCore install, it should be:

W:\Database\landscape\_texture_tiles\

Create the first type of terrain

Click on "Add land"

Tile bank manager step a.png

Name the land as you wish (an ecosystem's name seems better), "ashtarie" in our example

Tile bank manager step b.png

and click "OK".

Tile bank manager step c.png

Click on "Add tile set"

Tile bank manager step d.png

Name this terrain (see the Conventions de nommage) from its aspect, it will be easier to keep it sorted, "grass" in our example

Tile bank manager add tileset to land a.png

Tile bank manager add tileset to land b.png

click OK.

Tile bank manager add tileset to land c.png


Create a second type of terrain

Click on "Add tile set" to have a second model of terrain for this example. You should add as many as you need in your ecosystem.

Name this terrain (see the Conventions de nommage) from its aspect, it will be easier to keep it sorted, "moss" in our example and click ok, like the one before.

Attributing textures to the Tilesets

Select a Tileset ("grass" in our example) and do "Edit tileset"

Tile bank manager edit land.png

A new window will appear, allowing you to add new pictures to this tileset. We can see several fields:

  • Textures": allowing you to indicate the kind of texture, diffuse or additive (alpha can't be picked)
  • "Size": influences the size with which the texture will be used in the edition tool
  • "Text info": allowing you to show the index number or the name of each picture under it to the right
  • "Tiles": indicates which type of tiles it is: their size for the shown texture or if they are transition textures (tiles with an alpha permitting the transition between tilesets) or Displace tiles (visually alterating the ground's geometry to make it less plain).

Tile bank manager add bank.png

Diffuse textures

We will start by adding textures of the Diffuse type, 128x128: we therefore select those two options in Texture and in Tiles.

Tile bank manager add diffuse 128.png

Right click into the empty space to the right and select "Add"

Tile bank manager add menu.png

Navigate to the place where the tiles from that string will be kept (non compressed TGA), select them all and validate. They will be added. Do the same for the 256x256 textures that are also of the Diffuse type: select the two options, right click and select "Add", then add files.

""Note:"" We can then add additive textures the same way, but I've not found yet how to use those textures. I've seen some used to represent the burning branches of the Flamming Forest of Ryzom, but I don't know their theoretical use.

Transitional textures

Once those textures are saved, we can add transition textures, which will allow visually pleasant transitions between the various materials.

Select "Texture > Diffuse and Tiles > Transition"

Tile bank manager add diffuse transitions.png

Select each of the texture in the window to the right, "right-click > Replace" and choose randomly another texture from the same string.

Select "Texture > Alhpha" and "Tiles > Transition"

Tile bank manager add alpha transitions.png

"Right-click > Batch load" and go the the file "Transitions" (if you use the graphic datas from RyzomCore) and choose "alpha_noise_00.tga", click "ok". A window will ask if you wish to use the alpha tile rotation, accept.


Displacement textures

We can add Displacement tiles if we wish, but it's not a must (and I'm not sure it's even implemented).

Select "Tiles > Displace" and fill at least 6 squares with textures in levels of grey which will be used to deform the terrain.

Tile bank manager add displacement.png

Link the tilesets to effects of contact

Save it all, close it and come back to the "Tile bank manager" window.

Select your tileset and write in "Surface data" the surface number of that texture. Those numbers change the sounds and particles used when soomeone walks on this tileset.

In RyzomCore, we know that : 12 : grass 21 : dust

Use in 3DSMax

You then save the tilebank. You can now use it to texture terrains in 3DSMax with the right plugin.

In 3DSMax, once a quadpatch of 160x160m has been created, it's ready to receive textures. You then have to apply the Modifyer "Nelconvert", then "NelEdit", and finally, "Nel Painter".

Go into the Tool tab, choose "Nel Tile Bank" and chose the tilebank you wish.

Come back to the Modifier menue, choose "Top" in the viewport and click on "Paint". The commands required to manage the application of the textures are the following: