private void setSlime(final UIPanel panel) {
panel.setTooltipText("Slime: Built with two bubble functions of different sizes\n"
+ "and blended with a mapping function.");
panel.setTooltipPopTime(25);
final Texture tex = new Texture2D();
// Build up our function
final Function3D largeSlimeBase = new CloudsFunction3D(Functions.simplexNoise(), 1, 4.0, 0.5, 2.12);
final Function3D largeSlime = Functions.scaleBias(largeSlimeBase, 1, 0.5);
final Function3D smallSlimeBase = new CloudsFunction3D(Functions.simplexNoise(), 1, 24.0, 0.5, 2.14);
final Function3D smallSlime = Functions.scaleBias(smallSlimeBase, 0.5, 0);
final RidgeFunction3D slimeMap = new RidgeFunction3D(Functions.simplexNoise(), 3, 2.0, 2.207);
final MapperFunction3D slimeMapper = new MapperFunction3D(slimeMap, -1, 1);
slimeMapper.addFunction(largeSlime, 0, 0, 0);
slimeMapper.addFunction(smallSlime, .125, 1, 1);
slimeMapper.addFunction(largeSlime, 1.75, 0, 0);
final Function3D finalSlime = new TurbulenceFunction3D(slimeMapper, 1 / 32.0, 2, 8.0);
final ReadOnlyColorRGBA[] slimeColors = new ReadOnlyColorRGBA[256];
slimeColors[0] = new ColorRGBA(160 / 255f, 64 / 255f, 42 / 255f, 1);
slimeColors[127] = new ColorRGBA(64 / 255f, 192 / 255f, 64 / 255f, 1);
slimeColors[255] = new ColorRGBA(128 / 255f, 255 / 255f, 128 / 255f, 1);
GeneratedImageFactory.fillInColorTable(slimeColors);
Image img = GeneratedImageFactory.createLuminance8Image(finalSlime, wside, hside, 1);
img = GeneratedImageFactory.createColorImageFromLuminance8(img, false, slimeColors);
tex.setImage(img);
tex.setTextureKey(TextureKey.getRTTKey(MinificationFilter.Trilinear));
tex.setMagnificationFilter(MagnificationFilter.Bilinear);
tex.setMinificationFilter(MinificationFilter.Trilinear);
applyTexture(tex, panel);
}