Multitexturing Terrains

Blitz3D Forums/Blitz3D Programming/Multitexturing Terrains

PaulJG(Posted 2003) [#1]
From what I've worked out by playing with em, I can create a heightmap - then lightmap it..

I can then apply colour to the lightmap bitmap to give me a painted terrain.

I can apply a texture to the whole terrain.. but how about I want to use perhaps 2 or 3 different texture maps to the same terrain ?. (such as a mountain, and a grass texture)

The only way I can see I can do this is to apply each texture over the whole of the terrain, and then use black to mask out the areas I want to show through to the next texture.

But... that would mean the texture I use would have to stretch over my entire terrain - which is pretty huge.. giving me a poor giant pixel texture. If I tile it, then the same masked areas would appear in the wrong places over the terrain.

Any ideas, or advice please guys..


IPete2(Posted 2003) [#2]
Paul,

yes it is possible, have a look around by searching the forum (use the search function) look for Terrain, Look in the code archives too...

There are a couple of terrain painting tools knocking about too, check out blitzcoder.com. You'll find there are a couple of bb progs written to help do this job, I think I also saw on at Binarymoon.com too.

No you do not have to stretch out the textures either - go look you will find.

Ipete2.


PaulJG(Posted 2003) [#3]
IPete, yeap - I did my homework before I posted.. problem was most of the apps available just arent finished. There's some really good proggies that let you knock up heightmaps - but not to do any texturing with them afterwards.

I did find some bits and pieces in the archives.. but these where mainly for painting.

Can a mask be loaded in seperately from the texture ? - if it can, then it would make more sense...

tile the textures you want, create a mask that covers the terrain, using the mask to show through the bits of the texture you want it to. Although, again - surely this means you'd have to stretch the mask over the whole of the terrain ? (and a small area that is taken away to mask, might cover a huge area when its stretched !)


IPete2(Posted 2003) [#4]
Paul,

I'm guessing a bit here cause I havent actually done it, but B3d format allows for multiple textures, thats how some of the lightmapping in CShop and Quill is achieved. But I am sure if you build it correctly in the first place, so that each section has more that one surface, you can multi-texture each surface of a mesh. Some of the terrain progs seem to be able to do this I think.

You need to look to use 'find child' or something like that. Ask Shawn Swift hes a genius where this sort of thing is concerned, and I have seen his terrain prog, it is awesome looking.

In brief then...Yes you can stretch multitextures over the entire terrain, but you can also get to part of the terrain and just multi texture that part - I think.

Sorry I can't be of more help.

regards,

IPete2.


PaulJG(Posted 2003) [#5]
Looking through all the code examples I can find of this (cheers Mr Bird loads of stuff in the samples folder !) - it seems you 'pro' guys like to bypass blitz'es terrain commands, and instead prefer to use standard meshes !.

So I guess thats where I should put the effort in. :)