name = namer.getName(x, z); logger.log(Level.FINE, "Loading heightmap from file: {0}", name); final Texture texture = assetManager.loadTexture(new TextureKey(name));
public HeightMap getHeightMapAt(Vector3f location) { // HEIGHTMAP image (for the terrain heightmap) int x = (int) location.x; int z = (int) location.z; AbstractHeightMap heightmap = null; //BufferedImage im = null; try { String name = namer.getName(x, z); logger.log(Level.FINE, "Loading heightmap from file: {0}", name); final Texture texture = assetManager.loadTexture(new TextureKey(name)); // CREATE HEIGHTMAP heightmap = new ImageBasedHeightMap(texture.getImage()); heightmap.setHeightScale(1); heightmap.load(); } catch (AssetNotFoundException e) { logger.log(Level.SEVERE, "Asset Not found! ", e); } return heightmap; }
name = namer.getName(x, z); logger.log(Level.FINE, "Loading heightmap from file: {0}", name); final Texture texture = assetManager.loadTexture(new TextureKey(name));