I finally got everything working in swing well and its going good. I am not trying to move some of the code I wrote in the pure JMonkey platform IDE into netbeans and incorporate it into the Swing Project. I have run into a problem with a custom material/shader that I wrote so that I can change the colors of a model. For now we are using Oto as our test rig to be replaced later. I am making the following initialization calls to make him:
dog = (Node) assetManager.loadModel(“Models/Oto/Oto.mesh.xml”);
//incorporate color changing with new shader
//TODO: allow shader to respond to directional lights.
Material nDogMaterial = new Material(assetManager, “/Materials/MyColoredTextured.j3md”);
The problem is that it is having trouble locating the MyColoredTextured.j3md file. I have tried the following path names:
Immediately under my project directory is the folder named “assets” and then below that is “Materials” and “Models”.
If I remove my custom material code, it loads Oto as would be expected and everything works exactly as we like (aside from the custom material that we need).
The code works perfectly when using the JMonkey IDE, so Im sure its just something really simple as it is using a directory different than the one I thought it would use as the root directory for its search for the file.
Why don’t you use the Swing GUI editor available for jMP? Just go to Tools->Plugins and under “Available Plugins” select the “Swing GUI Builder”. Anyway it seems like you’re missing the assets folder or jar in the classpath.
There is a swing GUI builder in jMP?!?!?!?
***Writes that down in his future notes section of paper.
Hmmm, missing the assets folder or jar in the class path…? Well I have an assets folder directly underneath the project and it can find the oto mesh and skeleton in there, which I beleive is the default location it begins looking. The jar file missing, do you mean jMonkeyEngine.jar file? because that one is added under my libraries, and it seems to find that ok for all the other JMonkey engine calls I am making.
Do I need to edit the JMonkeyEngine.jar file to incorporate my shader in some way?
Thanks for any further assistance,
Add the assets folder to the libraries.