Export to Raw 8 bits error

Started by ssr, November 05, 2007, 01:51:30 pm

Previous topic - Next topic


I'm using 0.9, always exported heightmap to raw 8 bit format file. It worked fine for long time. Now when I export, the file has some sort of built in error, when I tried to open it in my program it gives an error saying unsupported format. Then I tried to convert it to text to check its error, there again it gives an error - binary should be able to divide by 8. Now I don't what to do. Any help will be highly appreciated. Attached raw file.



Had a quick play with the file here, Changed suffix to .raw. Opened fine in Photoshop CS2 (Mac).

Size of opened image was not square. The RAW import in TG 0.9 requires square files as far as i know...usually one pixel larger than you would normally expect for binary sizes. e.g. the file you posted was 264*250 px. I resized that to 257*257 and was able to import into TG 0.9. Unable to ascertain whether the resulting terrain is the one you think it is...it's a very ridged terrain after I import.

Hope this helps




Thank you Chris,
Obviously the terrain is not the one I wanted to create, I have created this file as a square 257 x 257, attached .ter file for the same from which I exported to 8bit raw file which is the one corrupted while exporting. I never had this problem before. Unfortunately even the one I have installed ( latest downloaded 0.9 ) in a indifferent computer is doing the same. It look like all my comps are haunted. Is it possible for you to use the file I have attached to export a 8bit raw file and post it here.
Thanks in advance


Here's the .raw file.

You will need to replace the .txt suffix with .raw (the forum doesn't accept .raw as attachments)

You may also need to adjust vertical scaling to your own preference.




Thanks Chris, I really appreciate your help.


Manually fixing files output by Terragen doesn't fix the bug inherent in the program.

Terragen appears to be outputting [Bytes required to generate RAW image - 1] bytes when you export to a RAW format (8 bit or 16 bit intel ordered).

It would also help to list somewhere on the site exactly how the RAW format is to be read (how are those bits supposed to be interpreted?). I am disappointed to say the least that a tool so obviously tailored to aid in the creation of heightmaps for virtually any game engine could be so light on documentation.

I am using Vista 64.


Terragen's main purpose is actually landscape rendering. Its terrain generation and editing tools are actually quite primitive by comparison to other dedicated tools such as World Machine, Geocontrol, or Leveller. As much as TG 0.9 can be used for this purpose, and if you find it suitable to your needs then there is no reason not to use it, it is still very limited in this regard and this is somewhat by design. Development of TG 0.9 - which is now discontinued - tended to focus on rendering and overall scene design features rather than terrain editing as many other purpose-built terrain editors clearly eclipsed what TG could do itself. I would recommend looking at some of the other tools, a few of which - like TG 0.9 - are available in a free version and most of which can support 8 bit raw import/export. A good free option would be Wilbur: http://www.ridgecrest.ca.us/~jslayton/software.html You could also use one of these applications to convert a .ter export from Terragen into the format you need, avoiding the apparent issues in TG's own raw export.

- Oshyan