diff --git a/engine/src/blender/com/jme3/scene/plugins/blender/landscape/LandscapeHelper.java b/engine/src/blender/com/jme3/scene/plugins/blender/landscape/LandscapeHelper.java index 3449ac19a..4639a2f10 100644 --- a/engine/src/blender/com/jme3/scene/plugins/blender/landscape/LandscapeHelper.java +++ b/engine/src/blender/com/jme3/scene/plugins/blender/landscape/LandscapeHelper.java @@ -169,6 +169,14 @@ public class LandscapeHelper extends AbstractBlenderHelper { pixelIO.write(image, 3, pixel, x, y); } } + + LOGGER.fine("Creating bottom texture."); + pixelIO.read(image, 0, pixel, 0, 0); + for (int y = 0; y < size; ++y) { + for (int x = 0; x < size; ++x) { + pixelIO.write(image, 2, pixel, x, y); + } + } texture = new TextureCubeMap(image); } diff --git a/engine/src/blender/com/jme3/scene/plugins/blender/textures/GeneratedTexture.java b/engine/src/blender/com/jme3/scene/plugins/blender/textures/GeneratedTexture.java index f99a8f307..2e173e796 100644 --- a/engine/src/blender/com/jme3/scene/plugins/blender/textures/GeneratedTexture.java +++ b/engine/src/blender/com/jme3/scene/plugins/blender/textures/GeneratedTexture.java @@ -34,7 +34,7 @@ import com.jme3.texture.TextureCubeMap; /* package */class GeneratedTexture extends Texture { private static final int POSITIVE_X = 0; private static final int NEGATIVE_X = 1; - // private static final int POSITIVE_Y = 2; + private static final int POSITIVE_Y = 2; private static final int NEGATIVE_Y = 3; private static final int POSITIVE_Z = 4; private static final int NEGATIVE_Z = 5; @@ -167,8 +167,8 @@ import com.jme3.texture.TextureCubeMap; textureGenerator.getPixel(pixel, forwardU, 0, upS); pixelIO.write(image, NEGATIVE_Y, ImageUtils.color(pixel, horizontalColor, zenithColor), x, y);// top - // textureGenerator.getPixel(pixel, forwardU, 1, upS); - // pixelIO.write(image, POSITIVE_Y, ImageUtils.color(pixel, horizontalColor, zenithColor), x, y);//bottom + textureGenerator.getPixel(pixel, forwardU, 1, 1 - upS); + pixelIO.write(image, POSITIVE_Y, ImageUtils.color(pixel, horizontalColor, zenithColor), x, y);// bottom sideV = FastMath.clamp(sideV - delta, 0, 1); forwardV = FastMath.clamp(forwardV - delta, 0, 1);