terrain rendering problems

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
kazimoto
Posts: 7
Joined: Thu Dec 01, 2005 2:46 am

terrain rendering problems

Post by kazimoto »

I played around with the terrain rendering example (example 12) and found out that if I scaled the terrain large enough the camera can sometimes fly through the terrain! Anybody knows what I missed? I changed this part only

Code: Select all

	// add terrain scene node
	scene::ITerrainSceneNode* terrain = smgr->addTerrainSceneNode( 
		"../../media/terrain-heightmap.bmp");

	terrain->setScale(core::vector3df(200.0f, 16.0f, 200.0f));
	terrain->setMaterialFlag(video::EMF_LIGHTING, false);

	terrain->setMaterialTexture(0, driver->getTexture("../../media/terrain-texture.jpg"));
	terrain->setMaterialTexture(1, driver->getTexture("../../media/detailmap3.jpg"));
	
	terrain->setMaterialType(video::EMT_DETAIL_MAP);

	terrain->scaleTexture(1.0f, 40.0f);
krama757
Posts: 451
Joined: Sun Nov 06, 2005 12:07 am

Post by krama757 »

So with a collision triangle selector you can still fly through the terrain eh?

I guess it wasnt made to handle extremely large terrains. Some wierd things happen when you make triangles too big :)
zenoid
Posts: 40
Joined: Wed Jul 20, 2005 1:16 pm
Location: france
Contact:

Post by zenoid »

same result here, plus there are strage visual artifacts displayed far from the camera.
krama757
Posts: 451
Joined: Sun Nov 06, 2005 12:07 am

Post by krama757 »

Yea I think thats the geomipmapping not being able to reduce triangles properly. Thats the "popping effect" no?

You would have to reduce the LOD if you dont want to see that...or just change the distances.
kazimoto
Posts: 7
Joined: Thu Dec 01, 2005 2:46 am

Post by kazimoto »

Erm, so, I guess the only way is to use a bunch of terrain scene node instead of a single huge node? Dang, hehe
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

/me also tries
looks to me like you can fall through triangles that are bigger than your collision sphere :(
terrain collision is probably overkill anyway, maybe you should ditch the terrain selector and use this or something-
http://irrlicht.sourceforge.net/phpBB2/ ... hp?p=63079
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
Spintz
Posts: 1688
Joined: Thu Nov 04, 2004 3:25 pm

Post by Spintz »

I'll take a look, never tried scales that large, wonder if the scale causes the calculations to get too large and screws them up.
Image
Post Reply