Why terrain heightmap and texture are flipped ?

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
trg
Posts: 10
Joined: Tue Sep 20, 2005 7:33 pm

Why terrain heightmap and texture are flipped ?

Post by trg »

Hi !

When running the terrain example, I found that the heightmap and texture are horizontal flipped from the original image file. Anyone saw that and the solution to solve? Thanks!
Spintz
Posts: 1688
Joined: Thu Nov 04, 2004 3:25 pm

Post by Spintz »

It depends on the origin of your image you're using for your heightmap. Standard for BMP, is top left as 0,0, so 0,0 of your terrain would be defined by the top-left of the heightmap, and the maxX and maxZ of your terrain would be defined by the bottom-right.
Image
trg
Posts: 10
Joined: Tue Sep 20, 2005 7:33 pm

Post by trg »

I do not find these things on the tutorial terrain example. How to implement them. I want the rendered terrain on the 3D world looks like the original heightmap and texture image files (bmp and jpg).
Spintz
Posts: 1688
Joined: Thu Nov 04, 2004 3:25 pm

Post by Spintz »

Open MS Paint, or IrfranView, or GIMP, or Photoshop or whatever is your image editor of choice. Rotate or Flip your image so that the origin is in the right corner.
Image
trg
Posts: 10
Joined: Tue Sep 20, 2005 7:33 pm

Post by trg »

I dont ask how to flip/mirror an image or look for tool to do that.
So, anyway, the visual result in Irrlicht 3d is always difference from the source image! My left hand on source image is right one on Irrlicht 3d world. Or sometimes, an up-arrow on the source image becomes down on 3d. OMG!
Post Reply