Page 1 of 1

Editable 3d world question

Posted: Fri Nov 27, 2015 5:17 pm
by jchase1970
I want to create a world drawn from a height map that the heights can be adjusted.

So what I have is the height map loaded into a array that can be manipulated.
I create a mesh with the array data.
I create a entity with the mesh.

Works great
except I can only have one texture for the entity.

What I want is to use different textures for different grid tile.

Say the height map is 10x10, Do I have to create 100 entities to have a different texture for each tile? Surely not?

Should I be using Terrain instead?

Re: Editable 3d world question

Posted: Fri Nov 27, 2015 7:57 pm
by jchase1970
I used Samuel's Terrain Generator to learn how to do a lot of this so far. Mine is somewhat simpler in design as I can use some preset values. His has one texture that is used for each grid tile on the map.

I'm not very good with 3D. Have always done 2D on everything in the past because I just do not understand all the 3D concepts to well.

So I guess the question should be can I use different textures on the same mesh?

If not is it best to have a bunch on entities, 1 for each tile, or create entities for each type of tile. IE 1 entity for all the sand tiles, 1 for all the dirt tiles, 1 for all the grass tiles, 1 for all the snow tiles, ect.

Re: Editable 3d world question

Posted: Fri Nov 27, 2015 10:21 pm
by Comtois
jchase1970 wrote:So I guess the question should be can I use different textures on the same mesh?
yes, you can
http://www.purebasic.fr/english/viewtop ... 4&start=10

For terrain you can use this :
http://www.ogre3d.org/tikiwiki/Material ... transition