WorldGeometry and collisions

dreamer

12-06-2009 09:44:46

I created a xhf file, use it as a hightfield in Nxogre:

NxOgre::ResourceSystem::getSingleton()->openArchive("pmodels", "file:C:/OgreSDK/media/physxmodels");
NxOgre::HeightField* hf = NxOgre::HeightFieldManager::getSingleton()->load("pmodels:heightfield.xhf");
NxOgre::HeightFieldGeometry* hfg = new NxOgre::HeightFieldGeometry(hf, NxOgre::Real3(0, 1, 0));
hfg->setTerrainCentering(NxOgre::Enums::TerrainCentering_CenterAbove);
mScene->createSceneGeometry(hfg);


I shoot some cubes, But it seems nothing happened, I can't see the hight field, nor can i see the collisions.
If I use the NxOgredebuger, the error is: OGRE EXCEPTION(7:InternalErrorException):Vertex Buffer:Out of memory in GLHardwareVertexBuffer::lock at f:\codingextra\ogre\shoggoth_vc9\ogre\rendersystems\gl\src\ogreglhardwarevertexbuffer.cpp(line 127).

Who can help me?

dreamer

12-06-2009 14:02:35

The reason is too much load for the graphics card.

question 2:
The result looks odd


question3:
Then, I drop a cube to the terrain, when the cube touch the terrain, the program stop

why?

betajaen

12-06-2009 14:39:09

I can't see your images, but there is a known bug in the terrain code in 1.5.4 that confuses height and depth. There was a fixed posted in this forum a week back. It's probably even on this page.

dreamer

12-06-2009 15:10:18

thanks

spacegaier

14-06-2009 20:44:34

This is the post betajaen talked about:

viewtopic.php?p=58921#p58921

And my corrected version:

viewtopic.php?f=6&t=10140&p=59690#p59690