Hi, i’m very new to jmonkeyengine ad i’m really loving it!
So, i’ve activated shaderblow plugin to use the Toon edge effect with the Glass shader. The problem is that i really don’t know how i can use that feature. The error message is always asset not found exception…
Can someone publish a real step by step guide for a newbie like me?
Really, i don’t know what kind of code i could ever post…i’ve made all kind of cut and paste with no success! For example, can i see the shaderblow’s assets somewhere in the default libraries? I’ve found anything…i’m walking in the fog!
@gnerpo said:
The error message is always asset not found exception...
@Pixelapp said:
Please post your exception so I can help.
@gnerpo said:
Really, i don't know what kind of code i could ever post...i've made all kind of cut and paste with no success! For example, can i see the shaderblow's assets somewhere in the default libraries? I've found anything...i'm walking in the fog!
Which part of that was unclear? You get an exception… please post more than “I got an exception”. There should have been more information in the message (like the asset that wasn’t found) along with perhaps a stack trace. The part you’ve included is only maybe 10% of the useful information.
@author normenhansen
*/
public class Main extends SimpleApplication {
public static void main(String[] args) {
Main app = new Main();
app.start();
}
@Override
public void simpleInitApp() {
Box b = new Box(1, 1, 1);
Geometry geom = new Geometry(“Box”, b);
Material mat = new Material(assetManager, "ShaderBlow/Materials/Glass/newMaterial.j3m");
//mat.setColor("Color", ColorRGBA.Blue);
geom.setMaterial(mat);
DirectionalLight sun = new DirectionalLight();
sun.setDirection(new Vector3f(-0.1f, -0.7f, -1.0f));
rootNode.addLight(sun);
rootNode.attachChild(geom);
}
}
[/java]
And here is the j3m file:
[java]
Material My Material : ShaderBlow/MatDefs/Glass/Glass.j3md {
MaterialParameters {
Now it’s all solved but there’s another question. I’ve imported the shaderblow folder in my asset folder and everything worked fine. But, i supposed i don’t need to do that (copy entire folder) because i’ve activated the shaderblow plugin…! There is a more correct way to have shaderblow using the plugin, without copying the shaderblow folder?
There is a more correct way to have shaderblow using the plugin, without copying the shaderblow folder?
Indeed! You already added the plugin, which contains the assets. If you are using the sdk it shows you on assetManager.loadMaterial("") the possible assets.
So you can just the delete the assets you copied in your assetsfolder from shaderblow and it should work aswell.