Problem with terrain dividing to pieces!

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
MindFlayer
Posts: 3
Joined: Tue Jun 15, 2004 1:16 pm
Location: Finland

Problem with terrain dividing to pieces!

Post by MindFlayer »

Greetings all! I've recently found this marvellous engine, but ran into a problem while trying to do basic terrain demos. My problem is that the terrain gets split into smaller rectangular areas.

Here's some pictures to clarify the problem:
http://koti.mbnet.fi/~walzu/terra1.jpg
http://koti.mbnet.fi/~walzu/terra2.jpg
http://koti.mbnet.fi/~walzu/terra3.jpg


And Here's the terrain initialization code:

Code: Select all

	m_Terrain = GetScene()->addTerrainSceneNode(0, 0,
		GetVideo()->createImageFromFile("media/texmap.bmp"),
		GetVideo()->createImageFromFile("media/heightmap.bmp"),
		0,
		dimension2d< f32 >(10.0f, 10.0f), // stretchSize
		250.0f,
		dimension2d< s32 >(64, 64));	// defaultVertexBlockSize
Apparently the variable defaultVertexBlockSize alters the splitting somehow, but don't know exactly how to _fix_ the problem... :oops:
Kaeles
Posts: 37
Joined: Thu Jun 03, 2004 12:43 am
Location: oklahoma
Contact:

Post by Kaeles »

its not your fault, the terrainscenenode is broke...

just look up how to use the terrainmesh, and call it into an Ianimatedmeshscenenode, its in the docs, use the same stuff and it will work fine.... i had the same problem.. i think it has to do with the thing changing the hieghtmap into something like 513x513, or something, im not sure... but yea, use the terrainmesh and it will be fine :-D

btw, i already posted this same problem, not to be a jerk, but search the forums before you post, i found it answers alot of questions... lol lol
MindFlayer
Posts: 3
Joined: Tue Jun 15, 2004 1:16 pm
Location: Finland

Post by MindFlayer »

Now I feel stupid :oops: . I tried to use search, but couldn't find anything useful - maybe I wasn't paying enough attention... Anyway, it's working great now. Thanks a lot!
Post Reply