Terrains Gone Crazy in 0.14

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
krama757
Posts: 451
Joined: Sun Nov 06, 2005 12:07 am

Terrains Gone Crazy in 0.14

Post by krama757 »

Porting over from 0.12 to 0.14 I had no problem compiling. But it seems the terrain algorithm has been changed.

When I draw the same heightmap I did in 0.12 in 0.14 the heightmap is crazy. It seems only 1 row of LOD patches is drawn or something.

Here is a pic:
Image

Here is the code:

Code: Select all

pTerrain = irrSceneMan->addTerrainSceneNode("./data/maps/HeightMap2.jpg",
															0,-1,									//bleh
															vector3df(0,0,0),						//position
															vector3df(0,0,0),						//rotation
															//vector3df(8,4.4f,8),					//scale
															vector3df(8,4.4f,8),					//scale
															SColor(255,255,255,255),				//default color
															//3,ETPS_9);
															3,ETPS_9);
	pTerrain ->setMaterialFlag(EMF_LIGHTING, false);
	pTerrain ->setMaterialTexture(0, irrDriver->getTexture("./data/textures/maps/HeightMap2.bmp"));
	pTerrain ->setMaterialTexture(1, irrDriver->getTexture("./data/textures/env/bumpy.jpg"));
	pTerrain ->setMaterialType(EMT_DETAIL_MAP);
	pTerrain ->scaleTexture(1.0f, 100.0f);
Heightmap:
Image

Any ideas? Spintz? Guys?
bearSoft
Posts: 165
Joined: Fri Apr 01, 2005 9:55 pm
Location: Denmark

Post by bearSoft »

have u seen this thread?
http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=10116
perhaps the 2^n+1 is something for u?

( I havent upgraded yet.. Seams to me that 0.14 is somewhat grumpy -especially the needs to recompile if AABBox shal work correctly..
NICO says that 0.12 header must substitute 0.14 header.. the recompile..
I have NO idea how to set up dev to recompile the dll
waiting for 0.14.1 :)
Regards.
Tech: win98se| 320mb ram| abitbe6| 433mhzceleron| atiRadeon7000.64mb| soundblaster125| dx9.0b | devCPP | IRR 0.12.0 |
Spintz
Posts: 1688
Joined: Thu Nov 04, 2004 3:25 pm

Post by Spintz »

Yeah aabbox need recompiling and something is really fubared with the terrain when it's large. I have no problems with the terrain in IrrSpintz. I've ported my current terrain scene node from IrrSpintz over to Irrlicht-0.14 and the terrain is still messed up. There are some thing really wrong with 0.14, and I'm not positive it's the terrain, at least not directly. I'm thinking the terrain just makes the problem noticeable.
Image
krama757
Posts: 451
Joined: Sun Nov 06, 2005 12:07 am

Post by krama757 »

Hmm, so stick to 0.12 until things get cleaned up, got it :)

THanks guys.
Spintz
Posts: 1688
Joined: Thu Nov 04, 2004 3:25 pm

Post by Spintz »

This problem should also happen in Irrlicht-0.12. The problem, I believe, is that Irrlicht only supports 16 bit indices. So if the vertex buffer has more than 65536 vertices, strange things will happen.
Image
krama757
Posts: 451
Joined: Sun Nov 06, 2005 12:07 am

Post by krama757 »

Nope, using the same code works fine in IrrSpintz 0.12.
Post Reply