    private void processLine(String s) throws IOException {
        if (s==null) return ;
        if (s.length()==0) return;
        String[] parts=s.split(" ");
        parts=removeEmpty(parts);
        if ("#".equals(parts[0])) return;
        if ("v".equals(parts[0])){
            addVertextoList(parts);
            return;
        }else if ("vt".equals(parts[0])){
            addTextoList(parts);
            return;
        } else if ("vn".equals(parts[0])){
            addNormalToList(parts);
            return;
        } else if ("g".equals(parts[0])){
            if (parts.length >= 2 && materialNames.get(parts[1]) != null
                   && materialNames.get(parts[1]) != null)
                curGroup = (MaterialGrouping) materialNames.get(parts[1]);
             else
                setDefaultGroup();
            return; 
        } else if ("f".equals(parts[0])){
            addFaces(parts);
            return;
        } else if ("mtllib".equals(parts[0])){
            loadMaterials(parts);
            return;
        } else if ("newmtl".equals(parts[0])){
            addMaterial(parts);
            return;
        } else if ("usemtl".equals(parts[0])){
            if (materialNames.get(parts[1])!=null)
                curGroup=(MaterialGrouping) materialNames.get(parts[1]);
            else
                setDefaultGroup();
            return;
        } else if ("Ka".equals(parts[0])){
            curGroup.m.setAmbient(new ColorRGBA(Float.parseFloat(parts[1]),Float.parseFloat(parts[2]),Float.parseFloat(parts[3]),1));
            return;
        } else if ("Kd".equals(parts[0])){
            curGroup.m.setDiffuse(new ColorRGBA(Float.parseFloat(parts[1]),Float.parseFloat(parts[2]),Float.parseFloat(parts[3]),1));
            return;
        } else if ("Ks".equals(parts[0])){
            curGroup.m.setSpecular(new ColorRGBA(Float.parseFloat(parts[1]),Float.parseFloat(parts[2]),Float.parseFloat(parts[3]),1));
            return;
        } else if ("Ns".equals(parts[0])){
            curGroup.m.setShininess(Float.parseFloat(parts[1]));
            return;
        } else if ("d".equals(parts[0])){
            curGroup.m.setAlpha(Float.parseFloat(parts[1]));
            ColorRGBA alpha = new ColorRGBA(1,1,1,curGroup.m.getAlpha());
            curGroup.m.setAmbient(curGroup.m.getAmbient().mult(alpha));
            curGroup.m.setDiffuse(curGroup.m.getDiffuse().mult(alpha));
            curGroup.m.setSpecular(curGroup.m.getSpecular().mult(alpha));
            if (curGroup.m.getAlpha() < 1.0f)
               curGroup.createAlphaState();
            return;
        } else if ("map_d".equals(parts[0])) {
               curGroup.createAlphaState();
               return;
        } else if ("map_Kd".equals(parts[0]) || "map_Ka".equals(parts[0])){
            Texture t=new Texture();
            t.setImageLocation("file:/"+s.substring(6).trim());
            curGroup.ts.setTexture(t);
            curGroup.ts.setEnabled(true);
            return;
        }
    }

    private void processLine(String s) throws IOException {
        if (s==null) return ;
        if (s.length()==0) return;
        String[] parts=s.split(" ");
        parts=removeEmpty(parts);
        if ("#".equals(parts[0])) return;
        if ("v".equals(parts[0])){
            addVertextoList(parts);
            return;
        }else if ("vt".equals(parts[0])){
            addTextoList(parts);
            return;
        } else if ("vn".equals(parts[0])){
            addNormalToList(parts);
            return;
        } else if ("g".equals(parts[0])){
            if (parts.length >= 2 && materialNames.get(parts[1]) != null
                   && materialNames.get(parts[1]) != null)
                curGroup = (MaterialGrouping) materialNames.get(parts[1]);
             else
                setDefaultGroup();
            return; 
        } else if ("f".equals(parts[0])){
            addFaces(parts);
            return;
        } else if ("mtllib".equals(parts[0])){
            loadMaterials(parts);
            return;
        } else if ("newmtl".equals(parts[0])){
            addMaterial(parts);
            return;
        } else if ("usemtl".equals(parts[0])){
            if (materialNames.get(parts[1])!=null)
                curGroup=(MaterialGrouping) materialNames.get(parts[1]);
            else
                setDefaultGroup();
            return;
        } else if ("Ka".equals(parts[0])){
            curGroup.m.setAmbient(new ColorRGBA(Float.parseFloat(parts[1]),Float.parseFloat(parts[2]),Float.parseFloat(parts[3]),1));
            return;
        } else if ("Kd".equals(parts[0])){
            curGroup.m.setDiffuse(new ColorRGBA(Float.parseFloat(parts[1]),Float.parseFloat(parts[2]),Float.parseFloat(parts[3]),1));
            return;
        } else if ("Ks".equals(parts[0])){
            curGroup.m.setSpecular(new ColorRGBA(Float.parseFloat(parts[1]),Float.parseFloat(parts[2]),Float.parseFloat(parts[3]),1));
            return;
        } else if ("Ns".equals(parts[0])){
            curGroup.m.setShininess(Float.parseFloat(parts[1]));
            return;
        } else if ("d".equals(parts[0])){
            curGroup.m.setAlpha(Float.parseFloat(parts[1]));
            ColorRGBA alpha = new ColorRGBA(1,1,1,curGroup.m.getAlpha());
            curGroup.m.setAmbient(curGroup.m.getAmbient().mult(alpha));
            curGroup.m.setDiffuse(curGroup.m.getDiffuse().mult(alpha));
            curGroup.m.setSpecular(curGroup.m.getSpecular().mult(alpha));
            if (curGroup.m.getAlpha() < 1.0f)
               curGroup.createAlphaState();
            return;
        } else if ("map_d".equals(parts[0])) {
               curGroup.createAlphaState();
               return;
        } else if ("map_Kd".equals(parts[0]) || "map_Ka".equals(parts[0])){
            Texture t=new Texture();
            t.setImageLocation("file:/"+s.trim().substring(6));
            curGroup.ts.setTexture(t);
            curGroup.ts.setEnabled(true);
            return;
        }
    }
