How to change texture on some squares of terrain?

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
vhson13
Posts: 10
Joined: Wed Mar 17, 2010 3:39 pm

How to change texture on some squares of terrain?

Post by vhson13 »

I have a terrain created by irrEdit, I want to apply new texture on some polygons of this terrain. It similars with creating zone function in SimCity, when you drag your mouse, texture or color of squares changes. How can I do that?
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Post by Mel »

You can't apply textures per vertex or polygons in a terrain.

Use shaders instead to achieve something similar. Check the shaders example.
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

You can also create some overlay which is based on the underlying vertex structure. Or use decals to add a second texture on top of another mesh.
vhson13
Posts: 10
Joined: Wed Mar 17, 2010 3:39 pm

Post by vhson13 »

I think your ideas very helpful. Thanks for your help, I will try them. It's not easy for beginner like me, but I think I can implement. :D
Post Reply