BuggySwires load hightfields by .xhf

deshan

26-03-2011 18:29:56

Hi

I have tried to load a hightfield with using xhf in buggyswires but haven't succeeded.

In bloddymess this was done as following.
NxOgre::HeightField* hf = NxOgre::HeightFieldManager::getSingleton()->load("media:hf.xhf");
NxOgre::HeightFieldGeometry* hfg = new NxOgre::HeightFieldGeometry(hf, Vector3(1500,100,1500));
mScene->createSceneGeometry(hfg);


Here how to?

Tried and failed with following

NxOgre::HeightField* hf = NxOgre::HeightFieldManager::getSingleton()->load(NxOgre::Path("ogre://hf.xhf"));

NxOgre::HeightFieldGeometryDescription d;
d.mHeightField = hf;

currentScene->createSceneGeometry(d);


Any help?

Thanks
~deshan

deshan

27-03-2011 14:43:19

Ok

This is what I am trying to do.

Previously with bloddymess I have kept all of my game world boundaries in a .raw image.

eg-

1. Using a photoshop like software I defined boundaries on a gray scale image and then exported it to .raw file.

2. Then this .raw file converted to .xhf like following

flour convert in:Boundaries.raw, into:heightfield, out:Boundaries.hxf, width:128, height:128

3. Then made a hightfield using above method.

That was extremely easy work. And worked really fine.

Now I am not sure whether new flour support input .raw files. I guess it's not. Seems it has to be a .flower file.

So does any one know how to make a .flower flormat file using a .raw image file?

Because it is easy for me to keep all boundaries in a .raw image file instead making another Terrain for boundaries.

[EDIT]
NEVER MIND,

I decided to modify the terrain it self to maintain the user boundaries, instead of keep them in a image. Thanks to ogitor it seems to be much easier than i thought initally.


[/EDIT]