PDA

View Full Version : Texturing my terrain - how to?



Fahrenheit451
06-25-2004, 08:58 AM
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 :) 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 :) 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.

http://hw001.gate01.com/sean451/tmp/terrain1.jpg

jwatte
06-25-2004, 07:48 PM
1) the appropriate forum for this question is www.vterrain.org (http://www.vterrain.org)
2) good google terms include "texture splatting" (implementation heavy) and "mesh parameterization" (research heavy)