Hi Dave,
I suggest you try this:
Generate your heightfield, lightmap, texture, etc in L3DT without any import/export stuff. Save the project when you're done. Then, select the heightfield (view->show map->heightfield), and open the export wizard (file->export->active map). In the export wizard, select your RAW format, then click on the 'options...' button, and disable the 'InvertY' option by double clicking on it. Click OK, set your file name, and click OK again to save the file. This disabled the y-axis flipping, which is on by default. Speaking of that...
Dave wrote:...Don't ask me why.
This one is in the FAQ under '
Why is the y-axis inverted in my map file?'. L3DT follows the right-handed coordinate system convention from the physical sciences (my degree is in physics, after all), but the majority of apps follow the left-handed system, which is more popular in computer science (for which I have no qualification whatsoever). To 'fix' this difference, L3DT by default automatically inverts the y-axis of the RAW files, under the assumption that other programs use left-handed systems. If this is causing problems with TSE, then it seems that Atlas is right-handed also. Thus, the 'InvertY' option in the RAW exporter should be disabled for TSE use.
Dave wrote:Anyway, the problem is that when I export the heightmap as a RAW file and flip it in Paintshop Pro, L3DT screws up when I re-import the heightmap. It displays parts of the map in two sections at the top of the HF screen, and the bottom of the HF shows as completely flat.
That sounds like there is a mismatch in the RAW format used by PSP and L3DT - most likely PSP is saving as an 8-bit RAW, whereas L3DT defaults to a 16-bit RAW. You can change the expected RAW mode when importing by clicking on the 'options...' button in the import wizard, double clicking on the 'Mode (ComboSelector)' option, and selecting the 'BYTE (spanned)' option.
Of course, I wouldn't recommend you use PSP at all for manipulating heightfields, as it doesn't support 16-bit data (Photoshop does, somewhat). This is why you get those steps in the heightfield afterwards; PSP is converting 65536 height levels (16-bit) from the L3DT export into only 256 levels (8-bit). Similarly, it's a bad idea to use BMP formats, or PNG in any other mode than 16-bit greyscale.
I hope this helps.
Cheers,
Aaron.