Problem With Loading Assests and SDK Glitch [Solved]

I am making a zombie survival game and have spent the last few weeks making props and a map for my game. I have imported all the props into my jme3 sdk and have converted the filed to the j3o format. Now my files loaded fine when I put them directly into the Models folder. However, for organizational sake and because of the pure quantity of models I made I wanted to make some more folders into the Models folder and then put my models in those. However when I try to load my models from those folders the asset manager claims it couldn’t find them. To solve this I went back to the original tutorials and found out I needed to create a locator for these models and this fixed the problem fine. However, jme3 cannot find my image textures for the models even though they are in the same folder. I’m looking for a way to load these images that are not in the Textures folder. I also am having a very strange problem the the sdk itself. When I try to run my application from certain classes it seems to run a build that I previously had but not my current one. When I run it from other classes it runs the current build… I also have a no parameter constructor for one of my classes and it claims that this constructor requires an argument. This is very weird because I used to have the constructor require a parameter but it does not anymore meaning that it looks like that error checking part of the sdk is stuck in the past for me? I’ve tried doing Save All to sort of reload the classes and have closed the sdk and restarted it but that has not helped. I guess if no one knows why this is happening I will just have to reinstall the program…

Thanks for helping me with the texture problem and the sdk problem in advance :slight_smile:

It would be nice if you could format your text a little next time! But I try to go through this…

Is your “Models” folder the common “assets” folder or the “Models” folder inside the “assets” folder?

Note: Import all (game ready) models inside the assets folder, it’s enough for what you want to do!

You should either import the material directly from blender or create an own Material file (.j3m) for your model. (last is recommended)

Then you should Clean & Build your application.

Should be gone when you clean and build your project.

Hopefully I could help!

Best regards

I tried Cleaning and Building and I don’t know what happened but I somehow got duplicate classes with some being old and some being new. I also got back some classes I deleted months ago. I checked in the src folder for my project and it didn’t even have files for those deleted classes either…

I think what I will try to do is just reinstall the sdk and see if the problem fixes itself.
I’ll move all my models right into the assets folder when I’m done with that.

I do not know how to directly export a material (I’m using the student version of maya) so I will also look and see if I can do that.

On a side note my text is formatted nicely I think :wink:

LOL :joy: Yeah, save your files and try to reinstall the program. Something is really messed up. Make sure you download the 3.1 stable (SDK).


Hmm… What format do you export your models with? If it is not .blend you should create your own material files in the SDK anyway.


What I have been doing is exporting the files from maya in the obj format and then importing them to the sdk so it converts them to the j3o format.

If I create my material files in the sdk I will just have to see and make sure they are properly uv mapped onto the models.

Alright, sometimes it can happen that they are flipped, but you can check the “flip” box in the material editor, if necessary.

Good luck with your game!

Two Things: If its a subfolder of assets/ (which it should be since only then its packaged with the game) then you dont need an assetlocator, so specify the Paths, Maybe you forgot to also Change it in Code.

Second: If you just Move Textures you Really have to create a Material (its just a Click per geometry in the sdk and there are YouTube Videos about it), to tell it the new Texture path.

I reinstalled the sdk and everything seems to be working much better now. [quote=“Darkchaos, post:7, topic:39196”]
If its a subfolder of assets/ (which it should be since only then its packaged with the game) then you dont need an assetlocator, so specify the Paths, Maybe you forgot to also Change it in Code.

You are right on not needing an assetlocator, my sdk was just so messed up I guess I couldn’t read from the paths properly so I needed one. I deleted the parts of my program where I use that now.

Ill look into the materials tomorrow. Thanks for the help guys :slight_smile:

1 Like

Alright guys. I created a shaded j3m material file but when I put it on my light model it just seems to stay completely black. It is not a lighting issue because I have a light follow where ever I have my camera move to. My model renders fine when I make an unshaded material after I flip it. When I try to make a shaded material as I said before its all black. I’m going to show some images of just various things that may be important so finding out what I am doing wrong here…

My uv editor in maya

The unshaded model in game

My very simple material

and my shaded model in game. :confused:

I think the problem lies somewhere with my UV’s because I have created very basic textured boxes before and put them into my game but I never had to adjust their UV’s because the image I wanted was projected on them the way I wanted.

Thanks for the help with this this far :slight_smile:

Is there an option in Maya to set the texture coordinates to UV or something like that?

I’m not going to lie I’m not quite sure about what your asking. I looked up texture coordinated because I haven’t come across that term before and it seems they are pretty much the same thing as UV’s (I may be wrong here, I’m new to this stuff) Is there a purpose that you do that in (I’m assuming) blender? Such as once you do that you can now do something else such as export something a certain way? (Just guessing here)

Try to generate tangents for it (right click the scene hiearchy when you have the Model open).

Also when you open the Model in the sdk and Click the Light Switch what do you see?

For generating tangents are you talking about viewing the model in the sdk?

I opened the model in the sdk and I clicked what I assumed is the light switch (see below) and nothing changed for me.

Could you upload the model + texture maybe? I would take a look at it later.
Edit: The .obj file of course :blush:

Sure, I hope you can download it from drive down below.

Here is my image that is associated with it.

PS. I know my image isn’t perfectly applied to the light, this was more of a test mapping to make sure I could apply the textures to my models and have the react to light sources in jme3 :sweat_smile:

Your lighting material based model seems ok to me.

Have you added a Directional Light to your scene?

Weird, I have a PointLight in my scene that I am having follow around my camera, I will try and see if the texture shows up with the directional light.

Edit: The directional light does not seem to make a difference… :frowning:

Is there something you did in blender to apply the file or did you simply download the model and apply the texture inside of jme?

Yes that’s what I did.
I suggest you upload your .j3m material and your .j3o object.

Also make sure you’re not observing your model from its dark side when adding a Directional Light.Try rotating your camera around the model.

j3o Model:

j3odata (Not sure if you need this, I dont really know what it does)

and the Material

Yes they are loading fine for me.
So open your model in the Scene Composer.
In the Scene Explorer choose LIGHT_METAL_HANGING-geom-0.
Open Properties (on the right side) and make sure your material is referencing the correct .j3m file.

Other than that make sure you’re observing your model from the right side,and also try changing the direction of your light.