Here are some tools i made to assist in terrain creation / heightmap conversions for BeamNG and Torque3D in general Link : http://danieljon.es/dummiesman/ NOTE : This tool is not official BeamNG content and is not supported by BeamNG. Thanks to @daniel_j for providing hosting
After writing the tool(s) can you authoritatively say whether there is any loss moving back and forth between TER and PNG?
There is. A PNG can only have 255 depth, whereas a TER can have 65535. I should probably make a TER > RAW , since RAW has 65535 depth as well.
Whoosh. That went right over my head. To clarify (if necessary), for my part I was referring to the 16-bit per channel PNG files generated by T3D for exporting heightmaps.
I think this idea stems from changing the height map around in the process, and the fact that the actual terrain is a combination of both the pixel values and a scaling factor. This scaling factor isn't stored in the height map, and it's an arduous task to mentally recalculate all the time. I haven't had any issues with going back and forth, as long as I didn't use Torque3D's terrain tools. PNG is capable of various precisions. The height map import/export format for Torque3D is a 16-bit, single-channel (gamma) PNG. This format is also supported for import and export in both L3DT and World Machine. It might be interesting to note that PNG happily supports 16-bit-per-channel RGBA, for a whopping 64 bit format. And yes, I do agree the nomenclature is confusing. Programmers use bits-per-pixel (so 8 bits per red, green and blue is called 24-bit), while image editing software often uses bits-per-channel (the same format is called 8-bit). Both fail to paint the full picture, though. Just look at the old 16-bit RGB format: 5 bits for red, 6 for green and 5 again for blue.
"back and forth" vs "didn't use Torque3D's terrain tools" - Just so I'm clear, do you mean that you did nothing but preview/test in T3D or that you only did terrain painting / something else?
I did nothing that changed the shape of the terrain. This sounds somewhat useless - why export if you already have the exact same height map from when you imported it - but it's important in that T3D's import and export functions seem to be lossless. I've also had success after making changes to the terrain in T3D, but this has been somewhat more involved, especially when editing the lowest or highest points of the map.
That's what I wanted to know. When I was changing a heightmap in an image editor + T3D I ended up setting an arbitrary low point and high point in a corner of the map. Unattractive, but it kept scaling issues at bay while I worked.
Previously the PHP config wasn't allowing much to happen . PHP Configuration should be good now though Also, source : https://github.com/Dummiesman/tertools