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
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
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.
[/quote]
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
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.
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.
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)
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
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…
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 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.