Heightmap stretches when imported?

I have followed all the directions on this site about using gimp to generate heightmaps, and checked and double checked to make sure I’m doing it exactly as it says. http://www.newton64.ca/blog/?p=2710

However, no matter what I do, my terrain comes out stretched and at an angle… I have included a screenshot of what my heightmap looks like (in a png form) and then what comes out. Any ideas on how to fix this?


Heightmap dimensions need to be power of two plus one.

–Eric

I have it at 513 x 513 is that not correct?

That’s correct. Maybe you’re importing it as 8 bit when it’s supposed to be 16 bit, or vice versa.

–Eric

I’ve tried both 8 and 16 bit. I’ve tried re-sizing then terrain map. Ive even tried it on both “mac” and “windows” setting’s and nothing fixes it, just changes it to a different weird stretch.

From the looks of it, I’d say you’re importing it as the wrong size. I saved your png as raw from Photoshop and it imports as an 8-bit heightmap correctly. I then tried importing it as 512x512 (when it’s really 513x513) and got results that look like your screenshot.

–Eric

I’ve tried importing it as both 512x512 and 513x513. Both yeild the same effect for me. Were you able to make it work under other circumstances? Because I’m starting to wonder if its just Gimp causing the issue, and if so, where would I go to quickly (and for free) get it converted into a proper raw heightmap that unity will recognize?

I’ve attached the raw file I exported from Photoshop.

–Eric

1527123–87925–$Heightmap.raw.zip (70.9 KB)

just to let you know. Photoshop CS2 is free and legal available at Adobes webside. Yes it is dated but in my opinion still superior to Gimp

Ah thank you both, I appreciate it tons.