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.
kazimoto
Posts: 7 Joined: Thu Dec 01, 2005 2:46 am
Post
by kazimoto » Wed Jan 11, 2006 1:20 am
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 » Wed Jan 11, 2006 1:54 am
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 » Wed Jan 11, 2006 8:33 am
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 » Wed Jan 11, 2006 6:53 pm
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 » Thu Jan 12, 2006 8:49 am
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 » Thu Jan 12, 2006 9:22 am
/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
Spintz
Posts: 1688 Joined: Thu Nov 04, 2004 3:25 pm
Post
by Spintz » Fri Jan 13, 2006 1:46 am
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.