Model.j30 appears different in animation than in editor

The model was imported with these files:
rotor2.mesh.j3o
1_Metal_Panel.jpg
2_Metal_Rough.jpg
into
Projects Assets/Models/Rotor2

The model opens in the editor with the proper appearance, but when the animation runs it appears as a white silhouette. I can change the silhouette color with
Material mat2 = new Material(assetManager, “Common/MatDefs/Misc/Unshaded.j3md”);
mat2.setColor(“Color”, ColorRGBA.Red);

but Material mat2 = new Material(assetManager, “Models/Rotor2/1_Metal_Panel.jpg”); results in file not found error

The tutorials don’t say much about this, except that the model materials can be edited in the Properties when open in the editor. But there is no Materials section in the Properties when I open the model in the editor.

I want the model to appear with the same surface material and texture when it runs as it does in the editor.

A material is not the same as a texture - materials use textures but provide a lot more as well.

Read the materials tutorial and it goes through all of this.

I guess the main issue is that the texture disappears when the model is animated from what I get.

I gave up on this for while last night; back at it this morning.
I’ve been through the materials tutorial, could go through it again, but the problem is the model appears with materials in the editor, but not in the animation. The materials came in .jpg files when I imported the model. The tutorial says “Assign the .j3m material to the .j3o in the Properties>Geometry>Material section”, but I don’t see any way to access my .jpg material files in “Project Assets/Models/Rotor2” directory. The model is really simple, a shaft and rotor (extruded cylinders).

Is there a reference that explains how the materials files are linked to the model?

Perhaps it has something to do with the way that I’m running the animation. I used the HelloLoop code as a template and changed the cube Geometery to my rotor1 model.

As zarch said, you have some very basic misconceptions about materials vs. textures.

To point you in the right direction: A JPG is an image not a material. A JPG is an Image which can then be wrapped into a Texture.

Materials contain a range of different parameters including 0 or more Textures.

The Materials tutorial provides direction on how to change the appearance of a model. Any changes I make to the model in the editor are not present when I run the animation. The animation remains a white silhouette even though I have changed the appearance of the model in the editor. Changes I make in the editor are present when I reopen the model in the editor, so it seems they have been applied and saved.

Is there a reference source that explains why the appearance of the model is not carried over from the editor to the animation, or any suggestions on where I can start looking to resolve the issue?

I think you will have to show a screen shot because none of us have ever seen what you describe (as you’ve described it) and so cannot fathom why the SDK is behaving differently for you than everyone else.

I found the problem; I used HelloLoop as a template and the “Material mat2 = new Material(assetManager,” statement used to assign material to the cube was overriding the model materials. I took that line out and the animation displays properly. Thanks to everyone for their help.

General suggestion: Don’t try to copy-paste your game together from the examples or test files. Write your own code so you know what every line does.