Tadeusz
02-21-2009, 07:41 AM
Hello!
I'm writing programm - terrain generator for strategic game.
The terrain is described by 2-dimension array of points. Each point have several parameters like heigh or terrain type (grass, water, dessert, etc.).
Now, I'm writing module for terrain visualization in OpenGL. I'm using simplest method: I get 3 points from array and create triangle. At first I used only colors for simulate terrain type and all was OK.
But now I'm trying to use textures and I have conceptual problem. If all vertexes have the same terrain type, everything is OK - I'm using one texture for whole triangle. But if vertexes have different terrain type, I have no idea, how morf 2 or 3 textures on one triangle. :(
Do you heve any suggestions?
Of course, I can prepare special morfed textures, but it is stupid work. :p
I found many information about multitexturing, but I think it is not proper way too...
Tadeusz
I'm writing programm - terrain generator for strategic game.
The terrain is described by 2-dimension array of points. Each point have several parameters like heigh or terrain type (grass, water, dessert, etc.).
Now, I'm writing module for terrain visualization in OpenGL. I'm using simplest method: I get 3 points from array and create triangle. At first I used only colors for simulate terrain type and all was OK.
But now I'm trying to use textures and I have conceptual problem. If all vertexes have the same terrain type, everything is OK - I'm using one texture for whole triangle. But if vertexes have different terrain type, I have no idea, how morf 2 or 3 textures on one triangle. :(
Do you heve any suggestions?
Of course, I can prepare special morfed textures, but it is stupid work. :p
I found many information about multitexturing, but I think it is not proper way too...
Tadeusz