Lines Matching defs:terrain
32 package jme3test.terrain;
47 import com.jme3.terrain.geomipmap.TerrainLodControl;
48 import com.jme3.terrain.geomipmap.TerrainQuad;
49 import com.jme3.terrain.geomipmap.lodcalc.DistanceLodCalculator;
50 import com.jme3.terrain.heightmap.AbstractHeightMap;
51 import com.jme3.terrain.heightmap.ImageBasedHeightMap;
59 * Uses the terrain's lighting texture with normal maps and lights.
65 private TerrainQuad terrain;
95 // First, we load up our textures and the heightmap texture for the terrain
97 // TERRAIN TEXTURE material
98 matTerrain = new Material(assetManager, "Common/MatDefs/Terrain/TerrainLighting.j3md");
103 matTerrain.setTexture("AlphaMap", assetManager.loadTexture("Textures/Terrain/splat/alpha1.png"));
104 matTerrain.setTexture("AlphaMap_1", assetManager.loadTexture("Textures/Terrain/splat/alpha2.png"));
106 // HEIGHTMAP image (for the terrain heightmap)
107 Texture heightMapImage = assetManager.loadTexture("Textures/Terrain/splat/mountains512.png");
110 Texture grass = assetManager.loadTexture("Textures/Terrain/splat/grass.jpg");
116 Texture dirt = assetManager.loadTexture("Textures/Terrain/splat/dirt.jpg");
122 Texture rock = assetManager.loadTexture("Textures/Terrain/splat/road.jpg");
128 Texture brick = assetManager.loadTexture("Textures/Terrain/BrickWall/BrickWall.jpg");
134 Texture riverRock = assetManager.loadTexture("Textures/Terrain/Pond/Pond.jpg");
140 Texture normalMap0 = assetManager.loadTexture("Textures/Terrain/splat/grass_normal.jpg");
142 Texture normalMap1 = assetManager.loadTexture("Textures/Terrain/splat/dirt_normal.png");
144 Texture normalMap2 = assetManager.loadTexture("Textures/Terrain/splat/road_normal.png");
170 * Here we create the actual terrain. The tiles will be 65x65, and the total size of the
171 * terrain will be 513x513. It uses the heightmap we created to generate the height values.
174 * Optimal terrain patch size is 65 (64x64).
178 terrain = new TerrainQuad("terrain", 65, 513, heightmap.getHeightMap());//, new LodPerspectiveCalculatorFactory(getCamera(), 4)); // add this in to see it use entropy for LOD calculations
179 TerrainLodControl control = new TerrainLodControl(terrain, getCamera());
181 terrain.addControl(control);
182 terrain.setMaterial(matTerrain);
183 terrain.setModelBound(new BoundingBox());
184 terrain.updateModelBound();
185 terrain.setLocalTranslation(0, -100, 0);
186 terrain.setLocalScale(1f, 1f, 1f);
187 rootNode.attachChild(terrain);
190 //terrain.generateDebugTangents(debugMat);
228 terrain.setMaterial(matWire);
230 terrain.setMaterial(matTerrain);