Mutitexturing terrain

Blitz3D Forums/Blitz3D Beginners Area/Mutitexturing terrain

Terry B.(Posted 2007) [#1]
How do you put a racetrack texture on the terrain?
I've been trying to figure out how all day but it isn't working.


Sledge(Posted 2007) [#2]
Should get you going...




Terry B.(Posted 2007) [#3]
Thanks, that code works great, but when I tried to add in my racetrack texture, instead of the created texture, it tiled it across the whole terrain.


jfk EO-11110(Posted 2007) [#4]
The quick solution is to use multitexturing. Although, the resolution of the track will be low this way.
I think a racetrack should not be made with a simple texture, but with an additional track mesh. Maybe you can create yourself some kind of Track tiles set so you can build your tracks with a simple editor. Just make sure they are tiling nicely.


Terry B.(Posted 2007) [#5]
Ok but what if I want to make dirt ground turn into desert?


jfk EO-11110(Posted 2007) [#6]
Not sure what you mean. BTW make sure your track texture uses the same size as the created one.


Sledge(Posted 2007) [#7]

when I tried to add in my racetrack texture, instead of the created texture, it tiled it across the whole terrain



You see that line in the code I posted where the track texture is scaled by the size of the terrain? That's the answer... if your terrain is sized at 128x128, for example, then scale the texture by 128 along both axes to have it fit exactly. (Note it's the UV's you're scaling, not the pixel resolution of the texture... that doesn't matter.)

EDIT: Brain spasm.