addTerrainSceneNode bug

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
idrose1025
Posts: 17
Joined: Mon May 08, 2006 8:58 am

addTerrainSceneNode bug

Post by idrose1025 »

Hello

I do not well English.

Understand

addTerrainSceneNode mistake discovery

Original image on screen indication

partial area disappear.

Want to understand method to do as do not disappear.

Want to know much informations about this.

안녕하세요

제가 addTerrainSceneNode를 이용해서

원본 이미지 가로 세로 256 사이즈 BMP맵을 화면에 표시햇다.

하지만 원본 이미지가 제대로 출력되지 않고 잇다.

왜 그런지 알고싶고. 또 고치고 싶기도 합니다.

이점에 관한 정보를 알고 계신다면. 알려주세요^^

감사합니다^^

Image
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

This will probably be due to far plane culling, i.e. the terrain is too large and is not drawn. Check out the camera scene node API for setting the far plane.
idrose1025
Posts: 17
Joined: Mon May 08, 2006 8:58 am

Post by idrose1025 »

These contents are not related with camera.

Part is not loaded loading file.

That decrease is not.
idrose1025
Posts: 17
Joined: Mon May 08, 2006 8:58 am

Post by idrose1025 »

Code: Select all

terrain = smgr->addTerrainSceneNode("image/map/mt_1.bmp");
	terrain->setScale(core::vector3df(SceleX, SceleY, SceleZ));
	terrain->setPosition(core::vector3df(0,0,0));
	//terrain->setMaterialFlag(video::EMF_LIGHTING, false);
	terrain->setMaterialFlag(video::EMF_FOG_ENABLE, true);
	terrain->setMaterialTexture(0, driver->getTexture("image/map/terrain-texture.jpg"));
	terrain->setMaterialTexture(1, driver->getTexture("image/map/detailmap3.jpg"));
	terrain->setMaterialType(video::EMT_DETAIL_MAP);
	terrain->scaleTexture(1.0f, 20.0f);

	scene::ITriangleSelector* selector
		= smgr->createTerrainTriangleSelector(terrain, 0);
	terrain->setTriangleSelector(selector);
	mainTriangleSelector->addTriangleSelector(selector);
	selector->drop();

	
	terrain2 = smgr->addTerrainSceneNode("image/map/mt_2.bmp");
	terrain2->setScale(core::vector3df(SceleX, SceleY, SceleZ));
	terrain2->setPosition(core::vector3df(256,0,0));
	//terrain->setMaterialFlag(video::EMF_LIGHTING, false);
	terrain2->setMaterialFlag(video::EMF_FOG_ENABLE, true);
	terrain2->setMaterialTexture(0, driver->getTexture("image/map/terrain-texture.jpg"));
	terrain2->setMaterialTexture(1, driver->getTexture("image/map/detailmap3.jpg"));
	terrain2->setMaterialType(video::EMT_DETAIL_MAP);
	terrain2->scaleTexture(1.0f, 20.0f);
SceleX = 1;
SceleY = 1;
SceleZ = 1;
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Maybe your heightmap is too large. Irrlicht does not render heightmaps larger than 256x256 pixels correct (due to a limitation in the index size, 16bit). This can cause terrible artifacts if still used.
strale
Posts: 119
Joined: Wed Nov 23, 2005 1:58 pm
Location: Lambrugo Italy
Contact:

Post by strale »

( im not an irrlicht expert)

......= createDevice(EDT_SOFTWARE, .........
instead use
......= createDevice(EDT_OPENGL, .................

could this ?

Bye
etcaptor
Posts: 871
Joined: Fri Apr 09, 2004 10:32 pm
Location: Valhalla
Contact:

Post by etcaptor »

At this moment you must use only bitmap not bigest than 256x256 and AND patch size not more than ETPS_17; In all other cases terrain will appear partitive.
ImageImage
Site development -Rock and metal online
--- etcaptor.com ------freenetlife.com
ProSoft
Posts: 59
Joined: Thu Sep 08, 2005 10:55 am
Location: Brasil

Post by ProSoft »

I found this problem to in Irrlicht 1.0.
Terrain is not all rendered. In Z, it starts from 16 to 255. In X axis, start on 0 and renders up to 239. As i said in another thread, im writing a loader for Scapemaker and found problems with my objects and waterplane being out of terrain. After a bit of debug, i found my loading is good, only terrain is not redering correct, then i simple dont load objects outside this boundaries i found.
idrose1025
Posts: 17
Joined: Mon May 08, 2006 8:58 am

Post by idrose1025 »

How do I repair?

ProSoft speech seems to be right.

Do you understand solution method?

Inform to me.

I do not well English.

I am much sorry.
Post Reply