FakeParticleBlow Shader.

Home Forum Development Contribution Depot (jME3) FakeParticleBlow Shader.

This topic contains 16 replies, has 6 voices, and was last updated by Avatar of Paul Geraskin mifth 7 months, 1 week ago.

Viewing 15 posts - 1 through 15 (of 17 total)
  • Author
    Posts
  • #19533
    +3
    Avatar of Paul Geraskin
    mifth
    234p

    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:

    http://code.google.com/p/jme-glsl-shaders/

    #131823

    nehon
    1236p

    That’s nice!

    #131824
    Avatar of tehflah
    tehflah
    39p

    Hello!

    Ahah! Awesome! Wonder if I could get some torches with that…. Like 40 of them! :p MOAR FIYA! :p

    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! :p
    ~FlaH

    #131825
    Avatar of Paul Geraskin
    mifth
    234p

    You can download my j3o with the code and the shader from http://code.google.com/p/jme-glsl-shaders/ .

    #131826
    Avatar of Paul Geraskin
    mifth
    234p

    FakeParticleBlow update:

    Features:
    1 gpu animation (now you don’t need simpleUpdate(float tpf)).
    2 X/Y animation direction.
    3 Animation direction changer.

    http://code.google.com/p/jme-glsl-shaders/

    #131827
    Avatar of Paul Geraskin
    mifth
    234p

    g_time has some bugs.

    Please, download new version: http://code.google.com/p/jme-glsl-shaders/

    #131828
    Avatar of zzuegg
    zzuegg
    121p

    @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.

    #131829
    Avatar of Paul Geraskin
    mifth
    234p

    nothing special. just planes. I exported them to obj. you can try ogre/blender/obj models. Your material should be transparent and additive.

    #131830
    Avatar of John Christian
    johncl
    13p

    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.

    #131831
    Avatar of Paul Geraskin
    mifth
    234p

    Texture coordinates are moved for particles.png.
    You can change speed in material.

    #131832
    Avatar of Paul Geraskin
    mifth
    234p
    #131833
    Avatar of H
    H
    67p

    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.

    #131834
    Avatar of Paul Geraskin
    mifth
    234p

    @H said:
    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.

    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

    #131835
    +1
    Avatar of Paul Geraskin
    mifth
    234p

    Or you can try like that if you want to get green/yellow/blue fog (not transparency):

    But you will need to set more planes geometries. As there will be AlphaAdditive material.

    #131836
    Avatar of H
    H
    67p

    @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

Viewing 15 posts - 1 through 15 (of 17 total)

You must be logged in to reply to this topic.