tileing terrain and meshes

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
Tannayr
Posts: 5
Joined: Mon Jun 13, 2005 5:00 am

tileing terrain and meshes

Post by Tannayr »

I'm sorry if this sounds very newbish, but when I searched, I could not find exactly what I needed. But what I want to know if there is any way to tile a terrain height map and a terrain texture. In the example that comes in the irrlicht folder for terrain rendering, how could I tile the height map and the texture files without making the picture itself bigger.
Guest

Post by Guest »

Code: Select all

smgr->getMeshManipulator()->makePlanarTextureMapping(terrainmesh->getMesh(0), 0.002f);
that should tile your terrain texture :)
Spintz
Posts: 1688
Joined: Thu Nov 04, 2004 3:25 pm

Post by Spintz »

Actually, you'll want to call scaleTexture of the TerrainSceneNode. It's much faster and has better results for scaling the texture. You can try what GFXStlyer has recommended, but I've not had much success with my textures looking good after using that method.
Image
Guest

Post by Guest »

well i use that too and i dont see any major fps decrease :) it works fine for all my terrains, so i wonder why it does not work for you.

but since scaleTexture looks much nicer, i would use that too!
Spintz
Posts: 1688
Joined: Thu Nov 04, 2004 3:25 pm

Post by Spintz »

Yeah, ScaleTexture looks nicer, is what I meant. It's faster cause it doesn't deal with normals. With the planar texture mapping function, I get some weird artifacts with the textures on steep hills on my terrain, which is why I don't use it.
Image
Post Reply