Loading image heightmap for Ogre::Terrain rotates heightmap

Anything and everything that's related to OGRE or the wider graphics field that doesn't fit into the other forums.
Post Reply
User avatar
cool_thomas
Kobold
Posts: 29
Joined: Wed Oct 09, 2013 3:41 pm

Loading image heightmap for Ogre::Terrain rotates heightmap

Post by cool_thomas »

So I am having an issue, I make a large photo say 2048x2048 in photoshop for a heightmap to load for terrain, and then I slice/divide it and save 1024x1024 sections of it to make four terrain groups.

I do this because when I put anything higher than 1024 (or 1025 rather) for TerrainSize the terrain seems to be the same size, just the heightmap creates a higher scale.

Anyway, the sections of terrain work however for some reason Ogre rotates each heightmap image by 90 degrees, so I have to go into each image and manually rotate them 90 degrees so they will match up when they are loaded into the TerrainGroup.

Is there a reason for this, am I doing something wrong?

Any advice or feedback would be greatly appreciated.

Thanks.
User avatar
tod
Troll
Posts: 1394
Joined: Wed Aug 02, 2006 9:41 am
Location: Bucharest
x 94
Contact:

Re: Loading image heightmap for Ogre::Terrain rotates height

Post by tod »

I can confirm the image seems to be rotated, but I think in 3D that's something to be expected. You start creating the terrain from some corner, like XY or -X-Y, there is no left or right, it's all in your camera set-up. At least I think so. :D
User avatar
cool_thomas
Kobold
Posts: 29
Joined: Wed Oct 09, 2013 3:41 pm

Re: Loading image heightmap for Ogre::Terrain rotates height

Post by cool_thomas »

I suppose that makes sense about the 3D environment depending on from which corner its drawn. I don't understand how that relates to the camera setup though.

Is there a way then to specify from which corner the terrain takes in the image for heightmap? I know image objects have the flip property, but that doesn't help with rotating it 90 degrees counter clock wise.
User avatar
tod
Troll
Posts: 1394
Joined: Wed Aug 02, 2006 9:41 am
Location: Bucharest
x 94
Contact:

Re: Loading image heightmap for Ogre::Terrain rotates height

Post by tod »

I don't think you can specify how to load the heightmap. My idea would be to find some command line utility that can rotate all images in a batch and run that in post-production.
Post Reply