Importing a Colorized Model

I’m trying to import a Model with a Material File, same name just .mtl at the end instead of .obj - but I dont find a way to get the mtl File on my Model. I tried to import it, converted it to a j3o binary and with the .setMaterial(…) Method. I dont know what to try now… When I open my Model with the 3dWindows Builder all the colors are there but I just dont get the mtl file in my game…

OK upload your .obj and your .mtl files so that we can help you.

I think I can only upload code and images?

I can’t be of any use ,unless you uploaded the .obj and .mtl first,plus the images.
Buy if you want to figure this out all by yourself I suggest you start by watching this tutorial which covers model importing with the default SDK.

Upload them to google drive, dropbox or some other file share site, but even better, use a version control system like github or bitbucket.

Here are the obj and mtl files

Your model displays fine in the Engine,
but its way too big in size.
That’s probably why you can’t see it.
I suggest you to scale it down in your 3D modeling program and also change its orientation by rotating it.

I can import it but I dont get the colors on it…

Anyway its displayed incorrectly. Thats what it should look like: What it should be - Imgur

Spatial model = assetManager.loadModel(“Models/ersterFahrer.obj”);
model.scale(0.0075f, 0.006f, 0.007f);
model.setLocalTranslation(-1.45f, 0.7f, 0.115f);
model.setLocalRotation(new Quaternion().fromAngleAxis(FastMath.PI/2, new Vector3f(0,1,0)));

This is how I imported it…

I didn’t have a look at the model but instead of loading the obj in the Engine, convert and scale/Rotate the Model in the sdk as seen in the posted video and then save it as .j3o which is the engines native format

Do not import .obj files… Convert them to a j3o file (you can use the SDK for that!).
After that you only need to create a material file for your car model and assign it to the car geometry.

I tried to load the model in the Engine as in the video but it seems that it doesnt contains normals so the preview screen is empty

It doesnt change anything it is just all black

Did you add light to the scene?

Yes its a working 3D Race simulation just with a dark car so you can see the details but no color. The rest of the scene(Terrain etc.) has color but the objects dont have

So you did convert it to j3o and applied a material to it (you should be able to view the car in the SDK)?

In case you use a normal map: Did you generate tangents?

You should really look up the tutorials!

It’s not just black,it’s just to big for you to see it.
You have to zoom out,a lot,to see it.
And about the colors,well according to the wiki:

"When I load the model in JME3, why does it look different than in the 3D editor?

3D models will never look identical in a game engine and in a mesh editor. Mesh editors are optimized for high-quality offline rendering, and many of the material and texture options simply do not work in a live rendering context such as games. Also, the shaders that render the materials in JME3 are different implementations than in your mesh editor’s renderer. Remind your graphic designers to focus on features that game engines support."

I tried to do that but it seems like my model doesnt contain normals…

Well its not very big it is actually pretty small according to other models in the game…

So how can I fix that the colours look a bit more like what I brushed in my meshs editor because it changes from red to very pink etc

When you say,

What do you use to import the model?

Edit: by import I mean into the SDK, not the actual game you write.