ShaderBlow moved to the official JME Contribution repository ;) [is real, it's not a rumour]

@H said:
Hi @mifth
I have moved test code to test-src folder. I checked all test and they seem to work fine, but I was not able to run GPUAnimationFactory. It throw an error when I start the test. I will check tomorrow.

Please check commit's comment: http://code.google.com/p/jmonkeyplatform-contributions/source/detail?r=480

I will rename some test clases according Java good practice convetions in a few minutes and I will commit that too.
I going to move test assets to test-data folder tomorrow. It was a hard day today, not enough free time.

Update: test classes renamed and package structure start with com.shaderblow for core classes and com.shaderblow.test for test classes.
Please, take a look and let me know what you think
It's 2 a.m here, I'm going to bed now 8)


GOOD JOB!!!

I committed refraction post processor. And i moved the code to the proper place.
Check my commits with "[Shader]" comment:
http://code.google.com/p/jmonkeyplatform-contributions/source/list

Commited refactoring on assets: http://code.google.com/p/jmonkeyplatform-contributions/source/detail?r=498



I moved test assets to test-data folder (it should be displayed as Test Assets on JDK). The folders into test-data were renamed adding “Test” prefix. I add the prefix bc AssetManager did not find the asses when there are more than 1 folder with the same name in the classpath (I’m not 100% sure about this but it is the reason that came first to my mind, I need to check deeper). It was a hard task but this new structure will be a great help in order to build the plugin I think.



At first I tryed to move core assets to src/ShaderBlow/… in order to use “ShaderBlow” as prefix for all the core assets (i.e: FragmentShader GLSL150: ShaderBlow/Filters/GrayScale/GrayScale15.frag)

But I rolled back bc the Material Definitions from ShaderBlow/MatDefs were not displayed on Material Definition dropdown on the Material Editor.



Check this post too

http://hub.jmonkeyengine.org/groups/general/forum/topic/sdk-is-it-posible-to-set-up-the-sdk-in-order-to-load-j3md-files-from-a-jar-library-to-the-material-definition-dropdown-on-the-material-editor/

@H said:
I think we need to do some refactoring to ShaderBlow. Something similar to how jme3 has currenly.
Create a test package and move all the tests there. So, we will have core code and tests code in different packages. The we need to split assets too (core assets and tests assets), perhaps we need to create a testAsset folder/package.
After that, we need to package (build jar file) core code and core assets in one jar and test code and test asset in other jar.
Then create a plugin for those 2 jar or a plugin for each.. I don't know which approach is the best. (I'm not 100% sure how to do it but there are a lot of pleople out there eager tp help on this ;) )

@mifth: What do you thinks bout this?
Core members, @normen, @erlend_sh, anyone: any idea/suggestion will be very appreciate!!


YOU DID REALY COOL MAGIC!!! I LOVE IT!!!

About j3md. I think we need to try register/unregester assetManager locator folder.
Like this:
[java]
assetManager.registerLocator("assets", FileLocator.class);
[/java]

Just put this line in the code and j3md will be loaded.

About materials (j3m):

if the materials do not work in JDK Material Editor, so we should delete all j3ms and create them in the code examples.

Just like that:

[java]

Material mat = new Material(…);

mat.setTexture(…);

mat.setFloat(…);

mat.setBoolean(…);

[/java]

This quickly turned into a plugin development topic, so I moved it out of “General” and into “Community Plugins”. Carry on :stuck_out_tongue:

I also found cool stuff for future development:



http://www.youtube.com/watch?v=Nm0mOffXzig



I think it's possible to convert Ogre filters to JME filters.
@mifth said:
About materials (j3m):
if the materials do not work in JDK Material Editor, so we should delete all j3ms and create them in the code examples.
Just like that:
[java]
Material mat = new Material(...);
mat.setTexture(...);
mat.setFloat(...);
mat.setBoolean(...);
[/java]


I think SDK Material Editor should scan the project classpath in order to find j3md files and add those files to the Material Definition dropdown. i.e: you can add a jar file to your project with a lot of j3md files and it will be nice to create a material using SDK Material Editor. j3m file and SDK Material Editor are really cool features and users should use them. j3m reduces the lines of code a lot too.
Check this topic for further information.

I think we should keep j3m files and wait till SDK Material Editor is updated with this functionality (I will try to implement it myself but I'm not familiar with netbean / netbean plugin development, so I will need time to research and learn).

I think the new structure of ShaderBlow is good enough to create a plugin with it. We can move to that (and continue adding shaders, filters, etc).
@H said:
I think SDK Material Editor should scan the project classpath in order to find j3md files and add those files to the Material Definition dropdown. i.e: you can add a jar file to your project with a lot of j3md files and it will be nice to create a material using SDK Material Editor. j3m file and SDK Material Editor are really cool features and users should use them. j3m reduces the lines of code a lot too.
Check this topic for further information.

I think we should keep j3m files and wait till SDK Material Editor is updated with this functionality (I will try to implement it myself but I'm not familiar with netbean / netbean plugin development, so I will need time to research and learn).

I think the new structure of ShaderBlow is good enough to create a plugin with it. We can move to that (and continue adding shaders, filters, etc).



Ok, i agreed about j3m.


About j3md loading: did you try to put this line to the examples code?
[java]
assetManager.registerLocator("assets", FileLocator.class);
[/java]

This line will load MatDefs.
@mifth said:
About j3md loading: did you try to put this line to the examples code?
[java]
assetManager.registerLocator("assets", FileLocator.class);
[/java]

This line will load MatDefs.


j3md loading works fine in the examples code. No need for that line. You just need to make sure that the folder that contains the assets is added to the project classpath. assets folder is added to project's classpath by default on SDK, you need to add it manually on eclipse.
I use eclipse and the SDK (netbean), I feel more confortable writting code using eclipse but SDK has very nice features (Material Editor, sceneViewer, etc)
@H said:
j3md loading works fine in the examples code. No need for that line. You just need to make sure that the folder that contains the assets is added to the project classpath. assets folder is added to project's classpath by default on SDK, you need to add it manually on eclipse.
I use eclipse and the SDK (netbean), I feel more confortable writting code using eclipse but SDK has very nice features (Material Editor, sceneViewer, etc)



I have an exception without this line:

[java]
03.10.2012 19:31:43 com.jme3.audio.lwjgl.LwjglAudioRenderer initInThread
INFO: AudioRenderer supports 64 channels
03.10.2012 19:31:43 com.jme3.audio.lwjgl.LwjglAudioRenderer initInThread
INFO: Audio effect extension version: 1.0
03.10.2012 19:31:43 com.jme3.audio.lwjgl.LwjglAudioRenderer initInThread
INFO: Audio max auxilary sends: 4
03.10.2012 19:31:43 com.jme3.material.MaterialDef <init>
INFO: Loaded material definition: Unshaded
03.10.2012 19:31:43 com.jme3.scene.Node attachChild
INFO: Child (BitmapFont) attached to this node (null)
03.10.2012 19:31:43 com.jme3.scene.plugins.ogre.MeshLoader load
WARNING: Cannot locate TestModels/LightBlow/jme_lightblow.material for model TestModels/LightBlow/jme_lightblow.mesh.xml
03.10.2012 19:31:44 com.jme3.scene.plugins.ogre.MeshLoader applyMaterial
WARNING: Cannot locate Material for model TestModels/LightBlow/jme_lightblow.mesh.xml
03.10.2012 19:31:44 com.jme3.scene.Node attachChild
INFO: Child (jme_lightblow-geom-1) attached to this node (jme_lightblow-ogremesh)
03.10.2012 19:31:44 com.jme3.app.Application handleError
SEVERE: Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main]
com.jme3.asset.AssetNotFoundException: MatDefs/MatCap/MatCap.j3md
at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:278)
at com.jme3.material.plugins.J3MLoader.loadFromRoot(J3MLoader.java:486)
at com.jme3.material.plugins.J3MLoader.load(J3MLoader.java:533)
at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:283)
at com.jme3.asset.DesktopAssetManager.loadMaterial(DesktopAssetManager.java:345)
at com.shaderblow.test.matcap.TestMatCap.simpleInitApp(TestMatCap.java:20)
at com.jme3.app.SimpleApplication.initialize(SimpleApplication.java:225)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(LwjglAbstractDisplay.java:130)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:207)
at java.lang.Thread.run(Thread.java:679)
03.10.2012 19:31:44 com.jme3.renderer.lwjgl.LwjglRenderer cleanup
INFO: Deleting objects and invalidating state
03.10.2012 19:31:44 com.jme3.input.lwjgl.LwjglMouseInput destroy
INFO: Mouse destroyed.
03.10.2012 19:31:44 com.jme3.input.lwjgl.LwjglKeyInput destroy
INFO: Keyboard destroyed.
03.10.2012 19:31:44 com.jme3.system.lwjgl.LwjglAbstractDisplay deinitInThread
INFO: Display destroyed.
[/java]

Developing plugins as well as building the SDK itself should now be much easier with the RC2 release btw :slight_smile:

1 Like
@normen said:
Developing plugins as well as building the SDK itself should now be much easier with the RC2 release btw :)


Cool!!

PS: I get "Error: You did not enter a CAPTCHA phrase. Press your browser's back button and try again" msg when I want to post a comment on the "jMonkeyEngine3 SDK RC2 released!" post. There is not captcha though!!!!
@mifth said:
I have an exception without this line:

[java]
03.10.2012 19:31:43 com.jme3.audio.lwjgl.LwjglAudioRenderer initInThread
INFO: AudioRenderer supports 64 channels
03.10.2012 19:31:43 com.jme3.audio.lwjgl.LwjglAudioRenderer initInThread
INFO: Audio effect extension version: 1.0
03.10.2012 19:31:43 com.jme3.audio.lwjgl.LwjglAudioRenderer initInThread
INFO: Audio max auxilary sends: 4
03.10.2012 19:31:43 com.jme3.material.MaterialDef &lt;init&gt;
INFO: Loaded material definition: Unshaded
03.10.2012 19:31:43 com.jme3.scene.Node attachChild
INFO: Child (BitmapFont) attached to this node (null)
03.10.2012 19:31:43 com.jme3.scene.plugins.ogre.MeshLoader load
WARNING: Cannot locate TestModels/LightBlow/jme_lightblow.material for model TestModels/LightBlow/jme_lightblow.mesh.xml
03.10.2012 19:31:44 com.jme3.scene.plugins.ogre.MeshLoader applyMaterial
WARNING: Cannot locate Material for model TestModels/LightBlow/jme_lightblow.mesh.xml
03.10.2012 19:31:44 com.jme3.scene.Node attachChild
INFO: Child (jme_lightblow-geom-1) attached to this node (jme_lightblow-ogremesh)
03.10.2012 19:31:44 com.jme3.app.Application handleError
SEVERE: Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main]
com.jme3.asset.AssetNotFoundException: MatDefs/MatCap/MatCap.j3md
at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:278)
at com.jme3.material.plugins.J3MLoader.loadFromRoot(J3MLoader.java:486)
at com.jme3.material.plugins.J3MLoader.load(J3MLoader.java:533)
at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:283)
at com.jme3.asset.DesktopAssetManager.loadMaterial(DesktopAssetManager.java:345)
at com.shaderblow.test.matcap.TestMatCap.simpleInitApp(TestMatCap.java:20)
at com.jme3.app.SimpleApplication.initialize(SimpleApplication.java:225)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(LwjglAbstractDisplay.java:130)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:207)
at java.lang.Thread.run(Thread.java:679)
03.10.2012 19:31:44 com.jme3.renderer.lwjgl.LwjglRenderer cleanup
INFO: Deleting objects and invalidating state
03.10.2012 19:31:44 com.jme3.input.lwjgl.LwjglMouseInput destroy
INFO: Mouse destroyed.
03.10.2012 19:31:44 com.jme3.input.lwjgl.LwjglKeyInput destroy
INFO: Keyboard destroyed.
03.10.2012 19:31:44 com.jme3.system.lwjgl.LwjglAbstractDisplay deinitInThread
INFO: Display destroyed.
[/java]


It's weird!! Add the line then. I will check when I come back to home (like in 6 hours).
@H said:
Cool!!

PS: I get "Error: You did not enter a CAPTCHA phrase. Press your browser's back button and try again" msg when I want to post a comment on the "jMonkeyEngine3 SDK RC2 released!" post. There is not captcha though!!!!

Does it work now?
@normen said:
Does it work now?

Nop (at least for me, I see one comment from zarch)
@H said:
Nop (at least for me, I see one comment from zarch)

Hm, funny.. I can post also with my test user account...
Edit: disabled captcha completely now as a login is needed anyway, does it work now? ^^
@normen said:
Hm, funny.. I can post also with my test user account...
Edit: disabled captcha completely now as a login is needed anyway, does it work now? ^^


It works now, thanks!!!

@H , I committed some fixes for loading j3md and I added new simpleRefractionFilter:

http://code.google.com/p/jmonkeyplatform-contributions/source/detail?r=499

You guys should probably make a new thread in here where you give an overview of ShaderBlow. What it contains (now you can use your cool project headers again mifth :smiley: ), developer credits, wiki links and changelog. Maybe we’ll develop a “plugin entry template” eventually.

@erlend_sh said:
You guys should probably make a new thread in here where you give an overview of ShaderBlow. What it contains (now you can use your cool project headers again mifth :D ), developer credits, wiki links and changelog. Maybe we'll develop a "plugin entry template" eventually.


We are refactoring the code in order to release ShaderBlow as a plugin/library. It will be ready soon. SDK Material editor was updated in order to get j3md files from classpath (check this thread). I need to test that and start to work on building the plugin.

Perhaps @mifth can start moving ShaderBlow doc from http://code.google.com/p/jme-glsl-shaders/ to https://wiki.jmonkeyengine.org/legacy/doku.php/sdk:plugin:shaderblow :)
He is working on reflectionPostProcesor