Problem With Loading Assests and SDK Glitch [Solved]

Ok, I opened it up in Scene Composer and I opened properties and it said that it had no texture mapped to it. This is probably because I applied my texture in the code doing

Geometry lightModel = (Geometry) assetManager.loadModel("Models/Public_Props/LIGHT_METAL_HANGING/LIGHT_METAL_HANGING.j3o");
lightModel.setMaterial(assetManager.loadMaterial("Materials/Public_Prop_Materials/LIGHT_METAL_HANGING/LIGHT_METAL_HANGING_MATERIAL.j3m"));

After I found that out I just changed the property to say that it was mapped to the material that I wanted but it didnā€™t display anything. I also made sure I had that little light icon on.

Screenshot of the Scene Composer:

Why do that in code when you can do it in the SDK :slight_smile:
Using less code will make your game easily maintainable.

Good now restart JME and just load the model in your game[quote=ā€œcats00cats, post:21, topic:39196ā€]
Geometry lightModel = (Geometry) assetManager.loadModel(ā€œModels/Public_Props/LIGHT_METAL_HANGING/LIGHT_METAL_HANGING.j3oā€);
[/quote]

Do not forget to add a Directional Light.Try with different light directions and finally rotate the camera around your object.

It was still black when I restarted but I found something when I restarted the SDK.

Could not get FileObject for Models/lightMetalHanging/lightMetalHanging.obj when trying to update original data for LIGHT_METAL_HANGING. Possibly deleted.

I used to have my light model named lightMetalHanging and had that path also but I changed it so I am not sure why it would give me this message. Maybe this has something to do with the problem?

Make sure the .j3m file is correctly referencing your diffuse map.I.E. The path to the image is correct.
Then select the geometry in the Scene Explorer and use the ā€œgenerate tangentsā€ tool.
All you have to do now is load the model in game.

Man dude I donā€™t even know if its a problem with the material, it might be a problem with my sdk. I checked and I convirmed it was the right path. I couldnā€™t find the generate tangents tool, I am not very familiar the the scene composer (was my first time using it today).

I restarted the sdk and also found another error message. It says:

Error in assetpack, could not load assetpack.xml!

Seems like it could be a problem

No ā€œError in assetpack, could not load assetpack.xml!ā€ is not a problem,you can safely ignore it.

No worries,may I suggest you watch this tutorial on the SDK.
It was made by one of the core JME3 Developers,Normen.
It covers much of the basics so pay attention.

Finally got it. I had to generate those tangents like you said. I saw him do it way near the end so Iā€™m glad I watched it all. Anyways here is my texture lights in all their blazing glory :slight_smile:

Thank you so much for putting up with my naiveness on the whole matter and helping me get through these problems guys :+1:

1 Like