Game Development Community

About bump textures on terrain

by Dimitris Matsouliadis · in Technical Issues · 10/18/2008 (3:40 pm) · 11 replies

Hi to all :)
Know any if i can use the bump textures on terrain?

new Material(floorStone)
{
mapTo = "floorStone";
basetex[0] = "floorStone";
bumptex[0] = "floorStone.n";
pixelSpecular[0] = true;
specular[0] = "1.0 1.0 1.0 1.0";
specularPower[0] = 4.0;
};

I have try this and don't working on terrain :(

Thanks

#1
10/18/2008 (6:53 pm)
Terrain doesn't support normal/specular mapping.

It's got a detail map (usually a greyscale png) instead under TerrainBlock - Media (first option/directory path).
#2
10/19/2008 (2:34 am)
Thanks Steve
I know about details maps, but i am working on a MMOrpg game and i have very large terrains with 6 textures. We can use 1 detail map on terrain... or can i use more?
#3
10/19/2008 (4:26 am)
I think that you're restricted to just the one detail map unfortunately.

If you don't use a detail map (you might have to open the mission up in a text editor and delete the setting their for this to work correctly - mission files are all in plain text really), have high quality terrain textures and in TerrainBlock-Misc set texels per meter to something high (I find 64 is quite nice, 128 and 256 are a bit too small), with clipsizemaplog2 set to 10 (9 it's blurry, 11 it lags to death), you should get some pretty good and detailed terrain textures. But no bump or spec I'm afraid, Dimitri.
#4
10/19/2008 (5:21 am)
Bump mapping does exist on terrain, see code below (TGE), example taken from modified TGE 1.5.2 release mission:
new TerrainBlock(Terrain) {
      canSaveDynamicFields = "1";
      rotation = "1 0 0 0";
      scale = "1 1 1";
      detailTexture = "~/data/terrains/details/snowdetail04.png";
      terrainFile = "./barebones.ter";
      bumpTexture = "~/data/terrains/details/cracks.jpg";
      squareSize = "8";
      bumpScale = "8";
      bumpOffset = "0.01";
      zeroBumpScale = "8";
      tile = "1";
         position = "-1024 -1024 0";
         locked = "False";

Expect performance hits though.
#5
10/19/2008 (6:56 am)
Stephan, he means normal mapping, bump mapping in TGE is really detail mapping. But people also call normal mapping bump mapping --- so it all gets a bit confusing in the end!
#6
10/19/2008 (9:13 am)
Doh! 8-P
#7
10/19/2008 (12:57 pm)
Thanks boys :)

Steve i use texelsPerMeter = "32" because is right for my textures i think!
I go to make some tests with texelsPerMeter = "64++" and will see.

Know what effects support tgea 1.7.1 except (specular, glow, emissive)?
PixelVersion isn't problem
Thanks for your time
#8
10/19/2008 (4:24 pm)
I don't think the terrain textures support any material effects. As I remember, that's just reserved for textures on DIF and DTS.
#9
10/19/2008 (6:44 pm)
Yup... Textures in TGE don't use any vertex/ fragment programs at all...
#10
11/01/2008 (8:22 am)
Hi :)
Effects that i say is for dif and dts files...
Know what effects support tgea 1.7.1 except (specular, glow, emissive)?
#11
11/01/2008 (8:40 am)
Look under materials and shaders in the "Torque Engine Advanced" section of the "documentation" listing on the site.