Home › Forum › Development › Contribution Depot (jME3) › FakeParticleBlow Shader.
This topic contains 16 replies, has 6 voices, and was last updated by
mifth 7 months, 1 week ago.
-
AuthorPosts
-
Hi guys.
My shader contribution.
Effect for fire or engine of a ship. Such an effect is used in eve online for ship engines.http://www.youtube.com/watch?v=hdQop4yZ-lA&feature=channel_video_title
Shader repository:
That’s nice!
Hello!
Ahah! Awesome! Wonder if I could get some torches with that…. Like 40 of them!
MOAR FIYA!
You know though, is there going to be any j3o’s included with jME for effects like this? Because I study the way a lot of games do their effects and it usually is some variation or combination of some very simple geometries + awesome shaders/textures like this. Seems like there would be a lot of applications for the one @mifth has presented here.
Or maybe he already submitted it in the build. RIDUNNO!
~FlaHYou can download my j3o with the code and the shader from http://code.google.com/p/jme-glsl-shaders/ .
FakeParticleBlow update:
Features:
1 gpu animation (now you don’t need simpleUpdate(float tpf)).
2 X/Y animation direction.
3 Animation direction changer.g_time has some bugs.
Please, download new version: http://code.google.com/p/jme-glsl-shaders/
@mifth: i really like this shader but i have a few questions. Is there anything special in the mesh you use? I am asking because anytime i don’t use your default mesh the shader draws nothing at all. I only get a blank mesh. If i change the code back to your model everything is fine again.
nothing special. just planes. I exported them to obj. you can try ogre/blender/obj models. Your material should be transparent and additive.
A very cool shader and definitely a GPU saving one.
– Looking at the shader, do you move the particles.png as a filter over a static mask.png in high speed? Perhaps its possible to modify the images a bit and move it more slowly and you can also use it for simple torch fires. That would be cool.I see the mesh is a simple billboard fan which could also be very useful for anglebased billboards.
I wish I had more knowledge but conceptually I know it would be possible to have a shader that took a texture mesh and spread it out a similar fan and faded each quad in and out depending on the angle to the camera. This way it would be possible to have e.g. a tree billboard that shows different pre-rendered versions. I think they have something like that in Wolfire.
Texture coordinates are moved for particles.png.
You can change speed in material.Hi @mifth,
FakeParticleBlow seems to have a problem with the fog. The mask texture is not apply when you set fogColor. Set fogColor to red and the move the camera away from the particle object and you will see the problem, all the plane is colored. The issue is happen on my pc at least. Can you check please?
I will try to research more about this tomorrow.Also, can you check if skybox fog is working on your pc? Do you have a testcase for skyfog on FakeParticleBlow?
P.S: I will try to test blow effect on FakeParticleBlow shader tomorrow too.
FakeParticleBlow seems to have a problem with the fog. The mask texture is not apply when you set fogColor. Set fogColor to red and the move the camera away from the particle object and you will see the problem, all the plane is colored. The issue is happen on my pc at least. Can you check please?
I will try to research more about this tomorrow.Also, can you check if skybox fog is working on your pc? Do you have a testcase for skyfog on FakeParticleBlow?
P.S: I will try to test blow effect on FakeParticleBlow shader tomorrow too.
Ok, i fixed fog in the java code.
You will need to set fog to black. As there is additive material.
http://code.google.com/p/jmonkeyplatform-contributions/source/detail?r=508
Or you can try like that if you want to get green/yellow/blue fog (not transparency):
Java12mat.getAdditionalRenderState().setBlendMode(BlendMode.AlphaAdditive);final ColorRGBA fogColor = ColorRGBA.Blue.clone();But you will need to set more planes geometries. As there will be AlphaAdditive material.
@mifth said:
Ok, i fixed fog in the java code.You will need to set fog to black. As there is additive material.
http://code.google.com/p/jmonkeyplatform-contributions/source/detail?r=508
Thanks
There is an error on FakeParticleBlow.vert:
ERROR: 0:52: error(#143) Undeclared identifier pos
ERROR: 0:52: error(#224) Illegal length of matrix field selection xyz
WARNING: 0:52: warning(#402) Implicit truncation of vector from size 1 to size 3.Take a look when you have time please
Update: This error happens when I use SkyFog
-
AuthorPosts
You must be logged in to reply to this topic.