logger.log(Level.FINE, "Loading heightmap from file: {0}", name); final Texture texture = assetManager.loadTexture(new TextureKey(name)); heightmap = new ImageBasedHeightMap(texture.getImage());
ImageRaster raster = getImageRaster(); heightData[index++] = calculateHeight(raster.getPixel(w, h, colorStore))*heightScale*backwardsCompScale; heightData[index++] = calculateHeight(raster.getPixel(w, h, colorStore))*heightScale*backwardsCompScale; heightData[index++] = calculateHeight(raster.getPixel(w, h, colorStore))*heightScale*backwardsCompScale; heightData[index++] = calculateHeight(raster.getPixel(w, h, colorStore))*heightScale*backwardsCompScale;
/** * Loads the image data from top left to bottom right */ public boolean load() { return load(false, false); }
heightmap = new ImageBasedHeightMap(heightMapImage.getImage(), 0.25f); heightmap.load(); } catch (Exception e) {
ImageRaster raster = getImageRaster(); heightData[index++] = calculateHeight(raster.getPixel(w, h, colorStore))*heightScale*backwardsCompScale; heightData[index++] = calculateHeight(raster.getPixel(w, h, colorStore))*heightScale*backwardsCompScale; heightData[index++] = calculateHeight(raster.getPixel(w, h, colorStore))*heightScale*backwardsCompScale; heightData[index++] = calculateHeight(raster.getPixel(w, h, colorStore))*heightScale*backwardsCompScale;
/** * Loads the image data from top left to bottom right */ public boolean load() { return load(false, false); }
heightmap = new ImageBasedHeightMap(heightMapImage.getImage(), 0.25f); heightmap.load(); } catch (Exception e) {
heightmap = new ImageBasedHeightMap(heightMapImage.getImage(), 0.25f); heightmap.load(); } catch (Exception e) {
heightmap = new ImageBasedHeightMap(heightMapImage.getImage(), 0.25f); heightmap.load(); } catch (Exception e) {
heightmap = new ImageBasedHeightMap(heightMapImage.getImage(), 0.25f); heightmap.load();
heightmap = new ImageBasedHeightMap(heightMapImage.getImage(), 0.25f); heightmap.load(); } catch (Exception e) {
heightmap = new ImageBasedHeightMap(heightMapImage.getImage(), 1f); heightmap.load();
AbstractHeightMap heightmap = null; try { heightmap = new ImageBasedHeightMap(heightMapImage.getImage(), 0.5f); heightmap.load(); heightmap.smooth(0.9f, 1);
Texture heightMapImage = assetManager.loadTexture( "Textures/Terrain/splat/mountains512.png"); heightmap = new ImageBasedHeightMap(heightMapImage.getImage()); heightmap.load();
AbstractHeightMap heightmap = null; try { heightmap = new ImageBasedHeightMap(heightMapImage.getImage(), 0.25f); heightmap.load();
heightmap = new ImageBasedHeightMap(heightMapImage.getImage(), 1f); heightmap.load();
heightmap = new ImageBasedHeightMap(heightMapImage.getImage(), 1f); heightmap.load();
Texture heightMapImage = assetManager.loadTexture( "Textures/Terrain/splat/mountains512.png"); heightmap = new ImageBasedHeightMap(heightMapImage.getImage());
heightmap = new ImageBasedHeightMap(heightMapImage.getImage(), 1f); heightmap.load();
heightmap = new ImageBasedHeightMap(heightMapImage.getImage(), 0.3f); heightmap.load(); heightmap.smooth(0.9f, 1);