Java Code Examples for com.jme3.asset.TextureKey#setGenerateMips()

The following examples show how to use com.jme3.asset.TextureKey#setGenerateMips() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TestBrickTower.java    From MikuMikuStudio with BSD 2-Clause "Simplified" License 6 votes vote down vote up
public void initMaterial() {
    mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
    TextureKey key = new TextureKey("Textures/Terrain/BrickWall/BrickWall.jpg");
    key.setGenerateMips(true);
    Texture tex = assetManager.loadTexture(key);
    mat.setTexture("ColorMap", tex);

    mat2 = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
    TextureKey key2 = new TextureKey("Textures/Terrain/Rock/Rock.PNG");
    key2.setGenerateMips(true);
    Texture tex2 = assetManager.loadTexture(key2);
    mat2.setTexture("ColorMap", tex2);

    mat3 = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
    TextureKey key3 = new TextureKey("Textures/Terrain/Pond/Pond.jpg");
    key3.setGenerateMips(true);
    Texture tex3 = assetManager.loadTexture(key3);
    tex3.setWrap(WrapMode.Repeat);
    mat3.setTexture("ColorMap", tex3);
}
 
Example 2
Source File: TestBrickWall.java    From MikuMikuStudio with BSD 2-Clause "Simplified" License 6 votes vote down vote up
public void initMaterial() {
    mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
    TextureKey key = new TextureKey("Textures/Terrain/BrickWall/BrickWall.jpg");
    key.setGenerateMips(true);
    Texture tex = assetManager.loadTexture(key);
    mat.setTexture("ColorMap", tex);

    mat2 = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
    TextureKey key2 = new TextureKey("Textures/Terrain/Rock/Rock.PNG");
    key2.setGenerateMips(true);
    Texture tex2 = assetManager.loadTexture(key2);
    mat2.setTexture("ColorMap", tex2);

    mat3 = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
    TextureKey key3 = new TextureKey("Textures/Terrain/Pond/Pond.jpg");
    key3.setGenerateMips(true);
    Texture tex3 = assetManager.loadTexture(key3);
    tex3.setWrap(WrapMode.Repeat);
    mat3.setTexture("ColorMap", tex3);
}
 
Example 3
Source File: TestUrlLoading.java    From jmonkeyengine with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
@Override
public void simpleInitApp() {
    // create a simple plane/quad
    Quad quadMesh = new Quad(1, 1);
    quadMesh.updateGeometry(1, 1, true);

    Geometry quad = new Geometry("Textured Quad", quadMesh);

    assetManager.registerLocator("https://raw.githubusercontent.com/jMonkeyEngine/BookSamples/master/assets/Textures/",
                            UrlLocator.class);
    TextureKey key = new TextureKey("mucha-window.png", false);
    key.setGenerateMips(true);
    Texture tex = assetManager.loadTexture(key);

    Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
    mat.setTexture("ColorMap", tex);
    quad.setMaterial(mat);

    float aspect = tex.getImage().getWidth() / (float) tex.getImage().getHeight();
    quad.setLocalScale(new Vector3f(aspect * 1.5f, 1.5f, 1));
    quad.center();

    rootNode.attachChild(quad);
}
 
Example 4
Source File: HelloPhysics.java    From MikuMikuStudio with BSD 2-Clause "Simplified" License 6 votes vote down vote up
/** Initialize the materials used in this scene. */
public void initMaterials() {
  wall_mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
  TextureKey key = new TextureKey("Textures/Terrain/BrickWall/BrickWall.jpg");
  key.setGenerateMips(true);
  Texture tex = assetManager.loadTexture(key);
  wall_mat.setTexture("ColorMap", tex);

  stone_mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
  TextureKey key2 = new TextureKey("Textures/Terrain/Rock/Rock.PNG");
  key2.setGenerateMips(true);
  Texture tex2 = assetManager.loadTexture(key2);
  stone_mat.setTexture("ColorMap", tex2);

  floor_mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
  TextureKey key3 = new TextureKey("Textures/Terrain/Pond/Pond.jpg");
  key3.setGenerateMips(true);
  Texture tex3 = assetManager.loadTexture(key3);
  tex3.setWrap(WrapMode.Repeat);
  floor_mat.setTexture("ColorMap", tex3);
}
 
Example 5
Source File: TestBrickTower.java    From jmonkeyengine with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
public void initMaterial() {
    mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
    TextureKey key = new TextureKey("Textures/Terrain/BrickWall/BrickWall.jpg");
    key.setGenerateMips(true);
    Texture tex = assetManager.loadTexture(key);
    mat.setTexture("ColorMap", tex);

    mat2 = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
    TextureKey key2 = new TextureKey("Textures/Terrain/Rock/Rock.PNG");
    key2.setGenerateMips(true);
    Texture tex2 = assetManager.loadTexture(key2);
    mat2.setTexture("ColorMap", tex2);

    mat3 = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
    TextureKey key3 = new TextureKey("Textures/Terrain/Pond/Pond.jpg");
    key3.setGenerateMips(true);
    Texture tex3 = assetManager.loadTexture(key3);
    tex3.setWrap(WrapMode.Repeat);
    mat3.setTexture("ColorMap", tex3);
}
 
Example 6
Source File: TestBrickWall.java    From jmonkeyengine with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
public void initMaterial() {
    mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
    TextureKey key = new TextureKey("Textures/Terrain/BrickWall/BrickWall.jpg");
    key.setGenerateMips(true);
    Texture tex = assetManager.loadTexture(key);
    mat.setTexture("ColorMap", tex);

    mat2 = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
    TextureKey key2 = new TextureKey("Textures/Terrain/Rock/Rock.PNG");
    key2.setGenerateMips(true);
    Texture tex2 = assetManager.loadTexture(key2);
    mat2.setTexture("ColorMap", tex2);

    mat3 = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
    TextureKey key3 = new TextureKey("Textures/Terrain/Pond/Pond.jpg");
    key3.setGenerateMips(true);
    Texture tex3 = assetManager.loadTexture(key3);
    tex3.setWrap(WrapMode.Repeat);
    mat3.setTexture("ColorMap", tex3);
}
 
Example 7
Source File: TestCylinder.java    From jmonkeyengine with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
@Override
public void simpleInitApp() {
    Cylinder t = new Cylinder(20, 50, 1, 2, true);
    Geometry geom = new Geometry("Cylinder", t);

    Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
    TextureKey key = new TextureKey("Interface/Logo/Monkey.jpg", true);
    key.setGenerateMips(true);
    Texture tex = assetManager.loadTexture(key);
    tex.setMinFilter(Texture.MinFilter.Trilinear);
    mat.setTexture("ColorMap", tex);

    geom.setMaterial(mat);
    
    rootNode.attachChild(geom);
}
 
Example 8
Source File: TestOnlineJar.java    From MikuMikuStudio with BSD 2-Clause "Simplified" License 6 votes vote down vote up
@Override
public void simpleInitApp() {
    // create a simple plane/quad
    Quad quadMesh = new Quad(1, 1);
    quadMesh.updateGeometry(1, 1, true);

    Geometry quad = new Geometry("Textured Quad", quadMesh);
    assetManager.registerLocator("http://jmonkeyengine.googlecode.com/files/town.zip",
                       HttpZipLocator.class);

    TextureKey key = new TextureKey("grass.jpg", false);
    key.setGenerateMips(true);
    Texture tex = assetManager.loadTexture(key);

    Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
    mat.setTexture("ColorMap", tex);
    quad.setMaterial(mat);

    float aspect = tex.getImage().getWidth() / (float) tex.getImage().getHeight();
    quad.setLocalScale(new Vector3f(aspect * 1.5f, 1.5f, 1));
    quad.center();

    rootNode.attachChild(quad);
}
 
Example 9
Source File: TestAttachDriver.java    From MikuMikuStudio with BSD 2-Clause "Simplified" License 6 votes vote down vote up
public void setupFloor() {
    Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
    TextureKey key = new TextureKey("Interface/Logo/Monkey.jpg", true);
    key.setGenerateMips(true);
    Texture tex = assetManager.loadTexture(key);
    tex.setMinFilter(Texture.MinFilter.Trilinear);
    mat.setTexture("ColorMap", tex);

    Box floor = new Box(Vector3f.ZERO, 100, 1f, 100);
    Geometry floorGeom = new Geometry("Floor", floor);
    floorGeom.setMaterial(mat);
    floorGeom.setLocalTranslation(new Vector3f(0f, -3, 0f));

    floorGeom.addControl(new RigidBodyControl(new MeshCollisionShape(floorGeom.getMesh()), 0));
    rootNode.attachChild(floorGeom);
    getPhysicsSpace().add(floorGeom);
}
 
Example 10
Source File: TestUrlLoading.java    From MikuMikuStudio with BSD 2-Clause "Simplified" License 6 votes vote down vote up
@Override
public void simpleInitApp() {
    // create a simple plane/quad
    Quad quadMesh = new Quad(1, 1);
    quadMesh.updateGeometry(1, 1, true);

    Geometry quad = new Geometry("Textured Quad", quadMesh);

    assetManager.registerLocator("http://www.jmonkeyengine.com/wp-content/uploads/2010/09/",
                            UrlLocator.class);
    TextureKey key = new TextureKey("planet-2.jpg", false);
    key.setGenerateMips(true);
    Texture tex = assetManager.loadTexture(key);

    Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
    mat.setTexture("ColorMap", tex);
    quad.setMaterial(mat);

    float aspect = tex.getImage().getWidth() / (float) tex.getImage().getHeight();
    quad.setLocalScale(new Vector3f(aspect * 1.5f, 1.5f, 1));
    quad.center();

    rootNode.attachChild(quad);
}
 
Example 11
Source File: TestBoneRagdoll.java    From MikuMikuStudio with BSD 2-Clause "Simplified" License 5 votes vote down vote up
public void initMaterial() {

        matBullet = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
        TextureKey key2 = new TextureKey("Textures/Terrain/Rock/Rock.PNG");
        key2.setGenerateMips(true);
        Texture tex2 = assetManager.loadTexture(key2);
        matBullet.setTexture("ColorMap", tex2);
    }
 
Example 12
Source File: PhysicsTestHelper.java    From jmonkeyengine with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
/**
 * creates the necessary inputlistener and action to shoot balls from the camera
 *
 * @param app the application that's running
 * @param rootNode where ball geometries should be added
 * @param space where collision objects should be added
 */
public static void createBallShooter(final Application app, final Node rootNode, final PhysicsSpace space) {
    ActionListener actionListener = new ActionListener() {

        @Override
        public void onAction(String name, boolean keyPressed, float tpf) {
            Sphere bullet = new Sphere(32, 32, 0.4f, true, false);
            bullet.setTextureMode(TextureMode.Projected);
            Material mat2 = new Material(app.getAssetManager(), "Common/MatDefs/Misc/Unshaded.j3md");
            TextureKey key2 = new TextureKey("Textures/Terrain/Rock/Rock.PNG");
            key2.setGenerateMips(true);
            Texture tex2 = app.getAssetManager().loadTexture(key2);
            mat2.setTexture("ColorMap", tex2);
            if (name.equals("shoot") && !keyPressed) {
                Geometry bulletg = new Geometry("bullet", bullet);
                bulletg.setMaterial(mat2);
                bulletg.setShadowMode(ShadowMode.CastAndReceive);
                bulletg.setLocalTranslation(app.getCamera().getLocation());
                RigidBodyControl bulletControl = new RigidBodyControl(10);
                bulletg.addControl(bulletControl);
                bulletControl.setLinearVelocity(app.getCamera().getDirection().mult(25));
                bulletg.addControl(bulletControl);
                rootNode.attachChild(bulletg);
                space.add(bulletControl);
            }
        }
    };
    app.getInputManager().addMapping("shoot", new MouseButtonTrigger(MouseInput.BUTTON_LEFT));
    app.getInputManager().addListener(actionListener, "shoot");
}
 
Example 13
Source File: TestEnvironmentMapping.java    From jmonkeyengine with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
@Override
public void simpleInitApp() {
    final Node buggy = (Node) assetManager.loadModel("Models/Buggy/Buggy.j3o");

    TextureKey key = new TextureKey("Textures/Sky/Bright/BrightSky.dds", true);
    key.setGenerateMips(true);
    key.setTextureTypeHint(Texture.Type.CubeMap);
    final Texture tex = assetManager.loadTexture(key);

    for (Spatial geom : buggy.getChildren()) {
        if (geom instanceof Geometry) {
            Material m = ((Geometry) geom).getMaterial();
            m.setTexture("EnvMap", tex);
            m.setVector3("FresnelParams", new Vector3f(0.05f, 0.18f, 0.11f));
        }
    }

    flyCam.setEnabled(false);

    ChaseCamera chaseCam = new ChaseCamera(cam, inputManager);
    chaseCam.setLookAtOffset(new Vector3f(0,0.5f,-1.0f));
    buggy.addControl(chaseCam);
    rootNode.attachChild(buggy);
    rootNode.attachChild(SkyFactory.createSky(assetManager, tex,
            SkyFactory.EnvMapType.CubeMap));

    FilterPostProcessor fpp = new FilterPostProcessor(assetManager);
    BloomFilter bf = new BloomFilter(BloomFilter.GlowMode.Objects);
    bf.setBloomIntensity(2.3f);
    bf.setExposurePower(0.6f);
    
    fpp.addFilter(bf);
    
    DirectionalLight l = new DirectionalLight();
    l.setDirection(new Vector3f(0, -1, -1));
    rootNode.addLight(l);
    
    viewPort.addProcessor(fpp);
}
 
Example 14
Source File: ModelImportDialog.java    From jmonkeybuilder with Apache License 2.0 5 votes vote down vote up
/**
 * Copy textures from the external model.
 *
 * @param texturesFolder    the textures folder.
 * @param overwriteTextures true if need to overwrite existing textures.
 * @param textures          the found textures.
 */
@BackgroundThread
private void copyTextures(@NotNull final Path texturesFolder, final boolean overwriteTextures,
                          @NotNull final Array<Texture> textures) {

    if (textures.isEmpty()) {
        return;
    }

    final ObjectDictionary<String, String> oldKeyToNew = DictionaryFactory.newObjectDictionary();
    final Array<AssetKey<?>> newTextureKeys = ArrayFactory.newArray(AssetKey.class);

    for (final Texture texture : textures) {

        final TextureKey textureKey = (TextureKey) texture.getKey();
        if (newTextureKeys.contains(textureKey)) continue;

        final String newKey = oldKeyToNew.get(textureKey.getName(), makeCopyTextureFunction(texturesFolder, overwriteTextures));

        final TextureKey newTextureKey = new TextureKey(newKey, textureKey.isFlipY());
        newTextureKey.setGenerateMips(textureKey.isGenerateMips());
        newTextureKey.setTextureTypeHint(textureKey.getTextureTypeHint());

        texture.setKey(newTextureKey);
        newTextureKeys.add(newTextureKey);
    }
}
 
Example 15
Source File: TestBoneRagdoll.java    From jmonkeyengine with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
private void initMaterial() {
    matBullet = new Material(assetManager,
            "Common/MatDefs/Misc/Unshaded.j3md");
    TextureKey key2 = new TextureKey("Textures/Terrain/Rock/Rock.PNG");
    key2.setGenerateMips(true);
    Texture tex2 = assetManager.loadTexture(key2);
    matBullet.setTexture("ColorMap", tex2);
}
 
Example 16
Source File: RenderImageJme.java    From jmonkeyengine with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
public RenderImageJme(String filename, boolean linear, NiftyJmeDisplay display){
    TextureKey key = new TextureKey(filename, true);

    key.setAnisotropy(0);
    key.setGenerateMips(false);

    texture = (Texture2D) display.getAssetManager().loadTexture(key);
    texture.setMagFilter(linear ? MagFilter.Bilinear : MagFilter.Nearest);
    texture.setMinFilter(linear ? MinFilter.BilinearNoMipMaps : MinFilter.NearestNoMipMaps);
    image = texture.getImage();

    width = image.getWidth();
    height = image.getHeight();
}
 
Example 17
Source File: MTLLoader.java    From MikuMikuStudio with BSD 2-Clause "Simplified" License 5 votes vote down vote up
protected Texture loadTexture(String path){
    String[] split = path.trim().split("\\p{javaWhitespace}+");
    
    // will crash if path is an empty string
    path = split[split.length-1];
    
    String name = new File(path).getName();
    TextureKey key = new TextureKey(folderName + name);
    key.setGenerateMips(true);
    Texture texture = assetManager.loadTexture(key);
    if (texture != null){
        texture.setWrap(WrapMode.Repeat);
    }
    return texture;
}
 
Example 18
Source File: SkyFactory.java    From jmonkeyengine with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
/**
* Create a sky using the given cubemap or spheremap texture.
*
* @param assetManager from which to load materials
* @param textureName the path to the texture asset to use    
* @param envMapType see {@link EnvMapType}
* @return a new spatial representing the sky, ready to be attached to the
* scene graph    
*/  
public static Spatial createSky(AssetManager assetManager, String textureName, EnvMapType envMapType) {
    TextureKey key = new TextureKey(textureName, true);
    key.setGenerateMips(false);
    if (envMapType == EnvMapType.CubeMap) {
        key.setTextureTypeHint(Texture.Type.CubeMap);
    }
    Texture tex = assetManager.loadTexture(key);
    return createSky(assetManager, tex, envMapType);
}
 
Example 19
Source File: TestMaterialCompare.java    From jmonkeyengine with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
public static void main(String[] args) {
    AssetManager assetManager = JmeSystem.newAssetManager(
            TestMaterialCompare.class.getResource("/com/jme3/asset/Desktop.cfg"));
    
    // Cloned materials
    Material mat1 = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
    mat1.setName("mat1");
    mat1.setColor("Color", ColorRGBA.Blue);

    Material mat2 = mat1.clone();
    mat2.setName("mat2");
    testEquality(mat1, mat2, true);

    // Cloned material with different render states
    Material mat3 = mat1.clone();
    mat3.setName("mat3");
    mat3.getAdditionalRenderState().setBlendMode(BlendMode.ModulateX2);
    testEquality(mat1, mat3, false);

    // Two separately loaded materials
    Material mat4 = assetManager.loadMaterial("Models/Sign Post/Sign Post.j3m");
    mat4.setName("mat4");
    Material mat5 = assetManager.loadMaterial("Models/Sign Post/Sign Post.j3m");
    mat5.setName("mat5");
    testEquality(mat4, mat5, true);
    
    // Comparing same textures
    TextureKey originalKey = (TextureKey) mat4.getTextureParam("DiffuseMap").getTextureValue().getKey();
    TextureKey tex1key = new TextureKey("Models/Sign Post/Sign Post.jpg", false);
    tex1key.setGenerateMips(true);
    
    // Texture keys from the original and the loaded texture
    // must be identical, otherwise the resultant textures not identical
    // and thus materials are not identical!
    if (!originalKey.equals(tex1key)){
        System.out.println("TEXTURE KEYS ARE NOT EQUAL");
    }
    
    Texture tex1 = assetManager.loadTexture(tex1key);
    mat4.setTexture("DiffuseMap", tex1);
    testEquality(mat4, mat5, true);
    
    // Change some stuff on the texture and compare, materials no longer equal
    tex1.setWrap(Texture.WrapMode.MirroredRepeat);
    testEquality(mat4, mat5, false);
    
    // Comparing different textures
    Texture tex2 = assetManager.loadTexture("Interface/Logo/Monkey.jpg");
    mat4.setTexture("DiffuseMap", tex2);
    testEquality(mat4, mat5, false);

    // Two materials created the same way
    Material mat6 = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
    mat6.setName("mat6");
    mat6.setColor("Color", ColorRGBA.Blue);
    testEquality(mat1, mat6, true);

    // Changing a material param
    mat6.setColor("Color", ColorRGBA.Green);
    testEquality(mat1, mat6, false);
}
 
Example 20
Source File: J3MLoader.java    From MikuMikuStudio with BSD 2-Clause "Simplified" License 4 votes vote down vote up
private Object readValue(VarType type, String value) throws IOException{
        if (type.isTextureType()){
//            String texturePath = readString("[\n;(//)(\\})]");
            String texturePath = value.trim();
            boolean flipY = false;
            boolean repeat = false;
            if (texturePath.startsWith("Flip Repeat ")){
                texturePath = texturePath.substring(12).trim();
                flipY = true;
                repeat = true;
            }else if (texturePath.startsWith("Flip ")){
                texturePath = texturePath.substring(5).trim();
                flipY = true;
            }else if (texturePath.startsWith("Repeat ")){
                texturePath = texturePath.substring(7).trim();
                repeat = true;
            }

            TextureKey key = new TextureKey(texturePath, flipY);
            key.setAsCube(type == VarType.TextureCubeMap);
            key.setGenerateMips(true);

            Texture tex = owner.loadTexture(key);
            if (tex != null){
                if (repeat)
                    tex.setWrap(WrapMode.Repeat);
            }
            return tex;
        }else{
            String[] split = value.trim().split(whitespacePattern);
            switch (type){
                case Float:
                    if (split.length != 1){
                        throw new IOException("Float value parameter must have 1 entry: " + value);
                    }
                     return Float.parseFloat(split[0]);
                case Vector2:
                    if (split.length != 2){
                        throw new IOException("Vector2 value parameter must have 2 entries: " + value);
                    }
                    return new Vector2f(Float.parseFloat(split[0]),
                                                               Float.parseFloat(split[1]));
                case Vector3:
                    if (split.length != 3){
                        throw new IOException("Vector3 value parameter must have 3 entries: " + value);
                    }
                    return new Vector3f(Float.parseFloat(split[0]),
                                                               Float.parseFloat(split[1]),
                                                               Float.parseFloat(split[2]));
                case Vector4:
                    if (split.length != 4){
                        throw new IOException("Vector4 value parameter must have 4 entries: " + value);
                    }
                    return new ColorRGBA(Float.parseFloat(split[0]),
                                                                Float.parseFloat(split[1]),
                                                                Float.parseFloat(split[2]),
                                                                Float.parseFloat(split[3]));
                case Int:
                    if (split.length != 1){
                        throw new IOException("Int value parameter must have 1 entry: " + value);
                    }
                    return Integer.parseInt(split[0]);
                case Boolean:
                    if (split.length != 1){
                        throw new IOException("Boolean value parameter must have 1 entry: " + value);
                    }
                    return Boolean.parseBoolean(split[0]);
                default:
                    throw new UnsupportedOperationException("Unknown type: "+type);
            }
        }
    }