Editable 3d world question

Everything related to 3D programming
jchase1970
New User
New User
Posts: 9
Joined: Fri Nov 27, 2015 4:53 pm

Editable 3d world question

Post 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?
jchase1970
New User
New User
Posts: 9
Joined: Fri Nov 27, 2015 4:53 pm

Re: Editable 3d world question

Post 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.
User avatar
Comtois
Addict
Addict
Posts: 1431
Joined: Tue Aug 19, 2003 11:36 am
Location: Doubs - France

Re: Editable 3d world question

Post 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
Please correct my english
http://purebasic.developpez.com/
Post Reply