Texturing my terrain - how to?

Apologies up front if this has been asked a million times, but I really am having trouble finding material on how to do this… or more appropriately, material I can understand :slight_smile: Ok, so I have my terrain generator working and I now want to texture it with various textures like water, sand, grass, rock, snow etc, that are all nicely blended together. Anyone know any good links to tutorials (preferably with some code snips as I follow that better) that show the techniques invovled? I really have google’d this and found only a few tutorials that deal with the texturing part, and they are somewhat hard to follow. I’m dense obviously :slight_smile: Cheers everyone.

I currently use a 2d array of vectors as a heighmap and GL_TRIANGLE_STRIP for the rendering.

A simple screenie of my first attempt using multitexture code from the OpenGL game dev book and a simple if ( height < ) test. Hmmmm… needs some work.


  1. the appropriate forum for this question is www.vterrain.org
  2. good google terms include “texture splatting” (implementation heavy) and “mesh parameterization” (research heavy)