Getting Rid of "Missing Texture" Texture [SOLVED]

How do I get rid of this “Missing Texture” issue.

Keep in mind I have purposely removed some textures from these models. I just want this warning that the texture is missing to be gone.

I guess by this you mean you deleted the files and not that you removed the references, yes?

You need to find the materials that are using those textures and stop using those textures…

Yes its kind of on odd situation. I imported these models into my project from the worldforge pack.

I deleted the textures and it throws an error on load but this is expected. Can I not just set that specifiec “missing texture” image to something transparent?

Or would I use the scene visitor to just go over all the spatials and remove those references?

Personally, I’d load the model into the scene editor, fix it, then save it again. You might have to generate the materials, save the model, then edit those j3m files… which is probably something you want in the long run anyway.

Im actually just taking pictures of the scene. Its an Android application and I removed normal and shadow maps because I convert it to unshaded materials anyway.

I also don’t think the scene editor has a material editor for each model that I can easily edit it with.

I’m just looking for the quickest fix and I’m likely going to just visit the scene and remove those references, I guess it depends on when that texture is added and how it’s added.

I don’t think it will be too hard.

I’ll repeat myself only one time.

Good luck with your game!

Not a game it’s just trying to load a scene into a cinematic editor to make better pictures using the scenes. This was my fix.

private void fixMissingTexture(Spatial spatial) {

SceneGraphVisitor sgv = new SceneGraphVisitor() {

    @Override
    public void visit(Spatial spatial) {

        if (spatial instanceof Geometry) {
        
            Material mat = ((Geometry) spatial).getMaterial();
            
            if (mat.getParam("ShadowMap") != null) { 
                System.out.println("Clearing Shadow");
                mat.clearParam("ShadowMap");
            }
            
            if (mat.getParam("NormalMap") != null) {
                System.out.println("Clearing Normals");
                mat.clearParam("NormalMap");
            }
            
        }
        
    }

};

spatial.depthFirstTraversal(sgv);
}

Which would have taken 25 seconds in the scene editor and if you ever had to tweak anything else about the material then you could have just done it in the j3m.

…but I’m glad you got your issue worked out.

And by the way:
http://javadoc.jmonkeyengine.org/com/jme3/scene/SceneGraphVisitorAdapter.html