Terrain area wont render (Irr-Spintz)

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
Warchief

Terrain area wont render (Irr-Spintz)

Post by Warchief »

Im having problems with Terrain. Sometimes, when i move the camera, terrain areas that should be rendered, are not actually being rendered.

Image

Link to larger image: http://img22.imageshack.us/my.php?image=problem3ku.jpg


The picture shows what i mean.

Code: Select all

ITerrainSceneNode*	m_terreno;

char sueloPath[256];
sprintf(sueloPath, "%ssueloHeightmap.jpg", PATH_COMUN);
m_terreno = SMGR_PTR->addTerrainSceneNode( sueloPath );
// Escala
m_terreno->setScale(vector3df(0.25f, 0.1f, 0.25f));
m_terreno->setPosition(vector3df(-45.0f*escala, -2.2f*escala, -45.0f*escala));
m_terreno->setMaterialFlag(EMF_LIGHTING, false);
// Textura
m_terreno->setMaterialTexture(0, RES_LOADER->GetTexturaTerreno(0));
// Sin textura de detalle
m_terreno->setMaterialTexture(1, RES_LOADER->GetTexturaTerreno(1));
m_terreno->setMaterialType(EMT_DETAIL_MAP);		
m_terreno->scaleTexture(1.0f, 50.0f);
Im using Irrlicht-Spintz. Is there something i am missing?
Thanks in advance.
krama757
Posts: 451
Joined: Sun Nov 06, 2005 12:07 am

Post by krama757 »

Does escala change very often? Since you change the position of the map, you also have to recalculate the triangle selector and stuff when you do this.

I think this might be a problem...but dont take my word Im still new.
Spintz
Posts: 1688
Joined: Thu Nov 04, 2004 3:25 pm

Post by Spintz »

That has to do with the frustrum culling. It's a bug, I'll look into it, thanks :)
Image
Warchief

Post by Warchief »

It also happens when camera is initialized at Z axis (plane x=0). So i think its not really about the camera movement, but a small bug in calculations, as Spintz suggested.

I'll be waiting for solution. Thanks.
Post Reply