GeoMipTerrain - problem loading heightmap

Hi,

Trying to generate a terrain from a heightmap with GeoMip Terrain I currentley experience an error I don’t understand.
I set the heightmap via:

terrain->set_heightfield(Filename("terrain.png"));

When I start the application it gives me an error:

I don’t understand why this error occurs. I am sure, no, I know for certain that the file exists in Panda’s “model” folder.

However, I also tried to load a Bitmap but it would give me the same result.
If anyone can tell me what I’m doing wrong, he may speak :wink:

It doesn’t automatically search the model path. You can do this with:

Filename image = get_model_path().find_file("terrain.png");
if (image.empty()) {
  cerr << "Couldn't find terrain.png.\n";
} else {
  terrain->set_heightfield(image);
}

David

Thank you!
It works, now :smiley:

I’d vote to integrate it into GMT, so it behaves just like the rest of panda loader system.