blitz terrain texture tiling question
Blitz3D Forums/Blitz3D Programming/blitz terrain texture tiling question
| ||
is it possible? and if so... how? I'm talking about applying tiled textures to a internal blitz command loadterrain() blitz terrain. I decided I want to update my shadow library to have towl meshes for terrains... (but have the same projection method I use)... So I started creating a terrain editor... but then my process became halted when I noticed I don't have a clue about tiling a terrain with textures... If someone can help, that would be great! also, is there a function that anyone has created for saving a terrain as a *.bmp heightmap? Both these things would really help. (Oh, and I know I don't need these things for terrain shadows... but after playing days of Morrowwind, I decided I want to start trying to use the blitz terrain commands in games... face it, it has a great LOD system!) |
| ||
to control texture tiling use scaletexture ie.;Load terrain terrain=LoadTerrain("terrain1.bmp") TerrainDetail terrain,4000,True ScaleEntity terrain,1,10,1 grasstex=LoadTexture("terrain1grass.jpg") ScaleTexture grasstex,32,32 EntityTexture terrain,grasstex,0,1 |
| ||
I think he means painting different textures on different parts of the terrain and saving the output. |
| ||
I have tried that, but I couldn't get it to work. The only way I succeeded was placing a few terrains on top of each other, each with (1) a tilemap (2) a alphamap. I stretched the alphamap out over the entire terrain, so it has a low resolution and I kept the tilemap small, to give detail. Later on, I've made a single terrain with (1) a colormap and (2) a detail map, in greyscale. The idea was to suggest a tiled terrain using different colors. Maybe you can combine both methods, but instead of using a 2nd terrain, use a few mesh terrains here and there that fit exactly on the blitz terrain. On these smaller mesh terrains you can apply alpha, so they blend into the 'background' terrain. |
| ||
iamdaman13: Yuppers, that's exactly what I meant. B32: that's what I'm doing now... a colormap and a detailmap. I guess it gets the job done I think I'll stick to this for now |
| ||
Well, I think that is the best way. However, you could easily make a mesh that fits on a terrain using TerrainY(). First, design the add-on for the terrain in a 3d editor as a flat shape. Then, in blitz, loop through all the vertices and place them on the terrain. Here is the code from my attempt, it loads the same terrain three times. |