Original Post
I have problem reading .raw file data into heightmap terrain. I've created a 8-bpp based grayscale image in photoshop cs, and i saved it as .raw file with a header size of 2513. 128*128 width-height. however, when i read into my program, it generated a weird terrain. here, i present the outcome and the original raw image that i'd created.
like what's shown in the pic, it seems like one quad of the image was generated in a different order. I'm sure my reading to the data is right and have no problem during execution, just wondering why it gave me such a weird-formed terrain in this way. My guess is that , arrangement of the data of the raw file structure that i creat with PS may be in different way or i may be using the wrong software to convert image into .raw file. Any remedy up to this? thanks =) btw, i'm reading in this way : heightmapY = fileHeightmap[ i * elementPerRow + j ]; EDIT: GDNet uses the HTML 'img' tag to embed images. [Edited by - jollyjeffers on January 5, 2007 3:27:21 PM]