Closed limbryan closed 4 years ago
All examples are in raisimOgre repo.
An example of heightmap creation using a png is under "examples/src/primitives/heightMapFromPng.cpp". That using the raisim text format was absent but I just added it to the same file and pushed.
png file just defines pixel values for each coordinate. How big the map is and how high each pixel increment represents are defined by the user at the construction time. X, Y sizes are defined by "xSize" and "ySize" arguments respectively. In the case of the above black and white png file, black pixel value is 0 and white pixel value is 255. If you set the "heightScale" = 0.1, the black pixels will be 0m high and white pixels will be 25.5m high.
I just pushed the description of the format in the header file "World.hpp".
Hi,
Have been trying for a few weeks to read in heightmaps from png and and textfile but have not been able to get it to work. Went through the source code and saw that both formats were accepted and seems the easiest to load in more complex terrain that is self defined.
For both these formats, is there a certain format or form of png/txtfile that needs to be parsed in. Would appreciate examples of textfiles and png files that it accepts or more documentation and help on these issues if possible.
Thank you!