Resize terrain

Problems building or running the engine, queries about how to use features etc.
Post Reply
User avatar
spookyboo
Silver Sponsor
Silver Sponsor
Posts: 1141
Joined: Tue Jul 06, 2004 5:57 am
x 151
Contact:

Resize terrain

Post by spookyboo »

During runtime I'm trying to load a new heightmap in the TerrainSceneManager with a different page size (the first heightmap is 513x513, the second heightmap is 256x256). I get an error trying to load the new heightmap, because the size differs. All goes well if the heightmap size remains the same. I don´t know how to solve this, because I don´t want to change any TerrainSceneManager code. I was thinking of unloading a resource first (the old heightmap), and then loading the new heigthmap manually. I don´t know whether this will work, but it feels a bit clumsy.

Is there another way to do this?
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 67
Contact:

Post by sinbad »

Are you sure it's not just that your new heightmap should be 257x257?
User avatar
spookyboo
Silver Sponsor
Silver Sponsor
Posts: 1141
Joined: Tue Jul 06, 2004 5:57 am
x 151
Contact:

Post by spookyboo »

Hm, 2^8+1 is indeed 257. I'm afraid I used the wrong size :oops:
I'll try it again tonight.
Post Reply