How does one draw the Heightmap in Ogre itself ?

Red15

24-10-2008 00:50:30

I have created a heightmap from a raw image i had lying around, now what is the easiest way to get this rendered in Ogre?

Also on a slightly off-topic note: When I am creating a body using following code :

NxOgre::Resources::ResourceSystem::getSingleton()->addMeshAs("file://media/models/Dock.nxs", "dock");
NxOgre::Resources::Mesh* dockmesh = NxOgre::Resources::ResourceSystem::getSingleton()->getMesh("dock");
mDock = mScene->createBody("dock;Dock.mesh", new NxOgre::TriangleMesh("dock"), Ogre::Vector3(0,100,0), "weight: 500000");


Ogre crashes horribly, anyone got any quick pointers for this ? Like with the time-controller vs timecontroller thing? *nudge*nudge*wink*wink* )

Thx

betajaen

24-10-2008 00:57:03

Say no more, nudge nudge.

Take out "dock;dock.mesh" and replace with "dock.mesh", see if that works.

The Ogre Terrain SceneManager should be able to render that raw file, assuming you have the materials and terrain.cfg set up properly.

Red15

24-10-2008 01:03:43

...replace with "dock.mesh", see if that works.
Not quite yet

...assuming you have the materials and terrain.cfg set up properly.
Materials are set up, but what about the terrain.cfg ? What do I need to put in ? (Haven't yet gotten to using a terrain manager in Ogre)

Edit: Ok, just found out.... guess we're even now :)

betajaen

24-10-2008 01:08:57

I just noticed; Replace that mass with "static: yes".

Red15

24-10-2008 21:41:31

No luck, it still crashes, also what if i want this object to be dynamic ?

Can only Convex meshes be dynamic then ?

On the terrain topic: any heightfile of decent size seems to crash the RemoteDebugger, is that normal or does that mean something is wrong with it ? If you want I can attach/upload the source/generated files somewhere for retrospection if you want (Same for the .mesh and .nxs files for the dock)

Edit : Ok just noticed something about heightmaps : 512x512 is plenty, bigger then that and the remotedebugger crashes :?