Electricity shaders

@erlend_sh said:
Awesome work. Let us know if you run into any problems with the AssetPack creation. We'd love for more contributors to get into the habit of making Plugins and AssetPacks as a means to more effectively share their work with all jME3 users.


So I have some assets like shaders, materials, matdefs, textures and also some code. Now I wonder if should create an assetpack or a plugin...

Seemingly assetpacks can only place stuff into the Projects Assets folder, and not the Source Packages folder, is this correct? So using an assetpack would mean I place the code into Misc and require users to cut&paste that into their source folder.
An additional issue is that right now I'm working on a filter, and hence want to add a AbstractNewFilterAction. This means I need to create a plugin, doesn't it?
I also can't get asset preview working for my materials, it only works for models I presume? Also my attempt to add a dummy model using my materials with the electricity shaders in order to get a preview did not work out, for some reason it scrapped everything but the model, which then appeared invisible due to the missing stuff.
And while I'm at it:
http://i.imgur.com/c5fMX.png
Another thing: How can I remove assets from the asset browser?

Now for plugins: I see that there's the Core-Data which has assets placed in it, as well as the jme3-test-data library mentioned in the Hello Assets tutorial, however adding that library to an project did not make textures and stuff appear in the sdk, so I wonder if there is a pain-free way for users to access assets in plugins like they can access stuff in assetpacks...?


Right now it seems the best way would be to split this contribution up into an assetpack containing the assets and a plugin containing the code and require users to download both to get them working, with no preview whatsoever besides the applets I released here. Is this the appropriate way?
  1. Yes, you need to create a plugin for a new filter
  2. Yes, only models can be previewed atm
  3. For the dummy model to work the shaders would have to be accessible in the assetpack project under the right path as well. Also they would have to be copied along with the model then.
  4. Yes, the AssetPack project support is pretty alpha still
  5. Data cannot be accessed from other plugins, only classes. You can however access the ProjectAssetManager of both the AssetPack projects and the normal ones.
  6. Yes, there would be no preview but people can add your assetpack items to their projects at least :slight_smile: Another way would be to create a j2se library, so basically a jar library like the “jme3” one thats referenced for every BasicGame project. This way you could also update the shader in the plugin and peoples project would update as well as they only reference the jar with the shader…
  1. maybe we could add custom filter support, like we have for custom controls. So there would be no need to create plugins for new Filters as long as they follow the bean standard, so you can list and edit its properties through reflection.
1 Like
@nehon said:
1) maybe we could add custom filter support, like we have for custom controls. So there would be no need to create plugins for new Filters as long as they follow the bean standard, so you can list and edit its properties through reflection.

Probably yeah.. Question is how to get the instances.. Similar to the Controls I guess, by scanning the code..

yep, it works fine, i did it for custom user data and custom ParticleInfluencer (I just did a shameless copy of you code from control actually :p)

@cvlad , when are you going to publish your shaders?

I’m sorry to keep you waiting, but things didn’t exactly work out as I planned them and right now I’m learning for exams, once they are over I will continue tinkering with jme.

Ok, i get you. Waiting for your cool stuff. :slight_smile:

I’m waiting too :slight_smile:

hello @cvlad !

I just want to ask if you can release some of your ready shaders to public? We now have shaderBlow plugin in the JME and we can put your shaders to the ShaderBlow plugin where all users can use it directly.

Thanks.

i somehow missed this, @cvlad, it looks really awesome :slight_smile:

http://homepages.uni-paderborn.de/cvlad/electricity.zip

5 Likes

@cvlad i want to say you big RESPECT form me and our community! You did really great job! Your shaders are awesome!

I commited them to my repo for testing and fixing, but they will be soon in the official ShaderBlow.

[video]http://www.youtube.com/watch?v=JDTES95HnPE&feature=youtu.be[/video]

2 Likes

Oh that’s nice indeed!

Very nice :slight_smile:

I did it!

I refactored and committed the code of the Electricity shaders!
http://code.google.com/p/jmonkeyplatform-contributions/source/detail?r=785 - my commit

There is an example (Electricity.java). Just get the code and run this class:
http://code.google.com/p/jmonkeyplatform-contributions/source/browse/trunk/shaderblowlib/ShaderBlow/test-src/com/shaderblow/test/electricity/Electricity.java?spec=svn785&r=785

@cvlad , thank you a lot! Have a try my version of your shaders. I fixed many issues for ATI cards and did some changes.

1 Like

What happened to Electricity5Material.java? The point of the 5th shader was to use layers, which was enabled through that class.
General explanations of the ideas behind the shaders:
Create lines. Modify those lines randomly.

  1. Shader: Creates lines around the model using fresnel term.
  2. Shader: Creates lines horizontally using vertex positions.
  3. Shader: Creates lines using texture coordinates.
  4. Shader: Creates lines by extracting value regions from blurred noise.
  5. Shader: Creates lines like fur/grass shaders do using layers.
1 Like
@cvlad said: What happened to Electricity5Material.java? The point of the 5th shader was to use layers, which was enabled through that class.

Ok, iadded it too. But it takes pretty much fps. And the result is not so cool.
http://code.google.com/p/jmonkeyplatform-contributions/source/detail?r=786