So I’m trying to explore terrain building a bit and not having too much luck.
I’ve created a .pgm file from the PNMImage.write function and have confirmed it looks like a legitimate height map in a simple image viewer. But then my calls to generate terrain from this PNMImage isn’t working. It just takes a while to generate and then creates a white, flat square.
Code below
(o, and the image is 2049x2049)
GeoMipTerrain *terrain = new GeoMipTerrain("terrain");
terrain->set_heightfield(Filename("file.pgm"));
terrain->set_color_map(Filename("file.pgm")); // not necessary, but i figure it would show up gray scale
terrain->set_auto_flatten(GeoMipTerrain::AFM_light);
terrain->get_root().reparent_to(window->get_render());
terrain->generate();
Basically the same thing from the documentation, just added flatten to speed it up.