Height Map from Mesh
There is a way...one solution would be to find what height the terrain/mesh is at a certain point, then simply output this to a file.
Just render an orto-view of the mesh from above and save the depthbuffer to an image-file. There is your heightmap!!
/Mike
/Mike
I haven't tried it, but it could work like this (after switching to top view ortho mode)
If that works, it would be enough information to build up a grayscale image file.
Greets
Chris
float pixels[<screenwidth>][<screenheight>];glReadPixels(0,0,<screenwidth>,<screenheight>,GL_DEPTH_COMPONENT,GL_FLOAT,&pixels);
If that works, it would be enough information to build up a grayscale image file.
Greets
Chris
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement