Generating maps and loading them on runtime

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Guest

Generating maps and loading them on runtime

Post by Guest »

Hello,

I'm trying to find an algoritm to do this wit irrlicht:

1 - Have a binary 2d array on wich every position maps a world cell and the value of the byte indicates the type of terrain (Grass, land, rock).

2 - Have a bmp heightmap representing the y axis of the terrain. (And detail map, ...)

This is the solution I'm idealizing:

> Use the terrain APIs in irrlicht to generate the terrain mesh.
> Put all the textures on the same texture map and use the tu and tv components to select the right texture according to the type of terrain.

> Does anyone ever seen something like this done? Code samples?
> How can I alter the tu and tv coordinates of every point in the mess to point to the right texture?
> Any comments on the algorithm?

Thanks,
Pedro
Devion
Posts: 9
Joined: Sat Sep 17, 2005 5:54 pm
Location: Netherlands
Contact:

Post by Devion »

Mmh would be large code but you could use RenderToTexture for that, I'm almost at the point that I'm going to implement such a thing in my own terrain so if I come up with something I'll post it in here if someone else hasn't done so by then :)
eudemon
Posts: 14
Joined: Mon Jul 04, 2005 2:48 am

Post by eudemon »

Hello, I'm trying to accomplish something very similar. I was trying to use meshes before, but I a simpler way would be to use this: http://www.irrforge.org/index.php/Some_ ... or_Texture to tile smaller textures into one large texture, and generate a terrain node from that.
Post Reply