Game Development Community

How to add NEW Textures to your Create New Terrain Option.

by Michael Flynn · in Torque 3D Beginner · 01/23/2012 (8:47 am) · 0 replies

Hi all,

This is a simple edit to the Create New Terrain textures.
When you create a new Level, you select a Texture to cover your new Level with.

I am going to explane what I know of how to add your own textures, to the Defaults.

I used 256 x 256 pixel Grid Texture sub divided into 128,64,32 squares.
I'm going to edit it to 512 x 512 later!

Copy the texture you want to have added to your Create New Terrain option by copying them to your projects art/terrains/example folder, or BETTER make a New Folder in the art/terrains/ Folder.
I suggest this to keep from messing with the Original Textures and you can name it something more meningful to you like "Ice" or "Swampy".

Then edit the Material.cs file in the terrains folder to add your new textures, here is an example of mine.


new TerrainMaterial()
{
internalName = "grid256";
diffuseMap = "art/terrains/Example/Grid256x256";
detailMap = "art/terrains/Example/Grid256x256";
detailSize = "1";
//detailDistance = "200";
isManaged = "1";
detailBrightness = "1";
Enabled = "1";
diffuseSize = "256";
detailStrength = "1";
};


Internalname, this is what will show in the Create New Terrain texture option.

Diffusemap, a layer that adds "texture" to your textures.

Detailmap, Your Texture.

Detailsize, the size of the Texture in meters per pixal, if set to 1 this is the textures default size, IE 256x256 if set to 2 = 512x512 so on. (If your Texture is 256x256, it could be 32x32, 64x64, 512x512 whatever.)

The rest of the settings I'm not sure about. Sorry I'm learning.

Make sure to SAVE!

I hope this helps Newbees like me at least add some custom options.

The more you know..... Share it!

Anyone else who understands this better want to share?

Mike