[SOLVED] Terrain not saving
I really like the ETM and have been able to get the 2.3.1 demo up and running under Ogre Eihort, but when I click "O" button, the terrain is not saved and pressing "P" just clears everything out as it is loading the default. I have tried reconfiguring the path to be sure it is outputting to the "media" directory under the installation, but nothing is ever outputted. A search for the files only yields the unmodified originals that came with the package so nothing is ever being saved.
When you say you "reconfigured the path", what exactly did you do? If you changed the path in the resources.cfg, then this can't work. As it is, the output path for the files is hardcoded in the program code, and the path that's specified there must exist, otherwise output can't work.
Of course, if you changed the path in the program code, then I'm not really sure what's going on. Make sure that the path is actually correct as seen from the working dir from which the sample is executed.
I have done both.
std::string PATH = "C:/Ogre/etm-2.3.1/media";
// In saveTerrain()
image.save(PATH + "ET/ETterrain.png");
// other resources set this same way
In ogre's "resources.cfg" added
I copied the ET_Sample.exe file over to the engine/lib directory of my ogre home and ran it from there for easy testing.
The terrain resources should save to that directory when I press "O" as indicated in the code. The app pauses for a few milliseconds, but nothing is outputted as those files are not updated. Ogre is able to find those resources (as you have included defaults with the installation) because pressing "P" resets the terrain. They are simply not being saved.
That's because you forgot a slash.
PATH + "ET/ETterrain.png" expands to "C:/Ogre/etm-2.3.1/mediaET/ETterrain.png", and I'll bet that the directory mediaET does not exist. Therefore writing to the indicated file will (silently) fail.
D'oh! Thanks for pointing that out
I'm at work now but when I get back home I will fix this and let you know if it is working now.
That did it! It works now!