Bug in file output to PGM?

I have been using Worldmachine to generate terrain for the game Far Cry, which will import RAW and PGM grayscale heightfields. After some time using the file output module to produce PGMs, I noticed that the terrain was a lot flatter than it should be.

Now Far Cry has a height scale of 0-256, which should correspond to World Machine’s 0-1.0 scalar values. However, using PGM output I was consistently getting the highest points of the terrain at around 128 in Far Cry’s editor.

So it would seem reasonable to conclude that world machine is only exporting to 8-bit resolution, using only the first 8 bits of each pixel defined in the PGM.

Might be a good idea to check this one - 16-bit raw files come out correctly, by comparison, so I’ve had to switch to that.

Incidentally, it would be nice if WM didn’t force in file extensions, as there are many programs that don’t use the .r16 extension for 16-bit raw images.

Its not a bug, WM outputs 16 bit PGMs :slight_smile: a range of 0-65535

ybazwpv@cinematiko.bid