Newbie Question - using quads for imagebasedheightmaps

Hi all,



I am new to jME and am working through tutorials(and have a good demo working - jME is cool!!!) and am stuck at a point. Currently I am working at generating random environments by creating 2D random mazes(through maze generator), saving them as pngs' and then creating dynamic geometry.



I have used imagebasedheightmaps but textures are really lacking. I would like to explore another way to generate the geometry for 2D images. When I enquired regarding the feasibility of the project previous to starting it, one of the ways presented to do this was to generate a cube(box) for every wall of the 2D Maze. Also it might be possible to do it with quads.



I do not have enough experience and through tutorials I still cant figure out how to use this for imagebasedheightmaps or for generating 3D geometry for 2D images. I would welcome and appreciate suggestions, links, etc on how to achieve this or other ways to do it.



Dev

You can't generate a 2D maze using ImageBasedHeightmap. Heightmaps are used mostly to represent natural terrain, such as mountains, valleys, cliffs, etc. You can try generating geometry by putting boxes where the pixels are filled in the image, then using GeometryTool.minimizeVerts to merge coplanar faces of the cubes.

Hi,



That seems like a sane idea. I already have a working model of Imagebasedheightmap generated from a 2D maze. It works ok as mentioned previously the textures are lacking and I feel once I add player models, it would slow down a bit. On the net there are a lot of .exe programs that come with 3 jpegs(floor, wall and sky) and a .bmp(maze). Once you double click the .exe file, you have a 3D maze generated. I know these arent as simple as they look.



But surely there must be more ways(and hopefully simpler) of developing geometry for 2D images. Thats the bottom line - I have a 2D image, currently I am using imagebasedheightmap to achieve this and am looking at alternate ways to do this using jME!



Thanks for your suggestion!



Dev