Forceshield – my very first shader (28 posts)

  • Profile picture of ficik ficik17p said 8 months, 1 week ago:

    I just wrote my very first shader.. uff. It’s force field which can display up to 8 hits.
    demo:

  • Profile picture of madjack madjack496p said 8 months, 1 week ago:

    Nice! This is something I could use. :D

    What is configurable in it? Does it use the model’s bounds? Could I use that? I imagine the color is also configurable and the textures?

  • Profile picture of ficik ficik17p said 8 months, 1 week ago:

    Texture, color, minimal visibility, effect duration and size are configurable. It’s control set to sphere, which sets material on it.
    Hits are registred as contact point position using this control and effect animation is based on distance from contact point and time. So if you set contact point on object it shows animation like above. If you put it in front of it it should display same effect with smaller radius.
    Link to ugly and poorly documented code :)

  • Profile picture of madjack madjack496p said 8 months, 1 week ago:

    Ah, nice. :)

    The only wish I’d have is to be able to override the mesh so if I wanted to use, for example, an oval surrounding a ship, or a cube (anyone can thing of Borgs?) it could be done.

    Except for that, great job.

  • Profile picture of ficik ficik17p said 8 months, 1 week ago:

    Box or oval should be possible to use. Only problem is that it has to be higher-poly because distace is calculated from vertex.

  • Profile picture of ficik ficik17p said 8 months, 1 week ago:

    I just made cube in blender (for some strange reason I could not export create highpoly cube, so it’s some kind of bended cube) and here’s result (texture mapping is wrong, it can be fixed):


    I just changed model and it works

  • Profile picture of madjack madjack496p said 8 months, 1 week ago:

    That’s real nice. I like!

    Just a tiny bit of criticism here though. It would be much better if the mouse was “free” and you could move the camera around when you clicked on the “field”. As it is now, with the camera moving, it’s hard to properly see the effect. :) Just saying. It’s not a big deal.

    As for your other post about higher vertex count, that shouldn’t be a problem if you specify it in the Javadoc.

  • Profile picture of oxplay2 oxplay256p said 8 months, 1 week ago:

    Very very nice :)

    the real forceshield! Just Rate your post! :D

  • Profile picture of glaucomardano glaucomardano252p said 8 months, 1 week ago:

    @ficik: How did you get to run that scene fast with the HoverCraft added? Because the HoverCraftTest is very slow with its HullCollisionShape.

  • Profile picture of ficik ficik17p said 8 months, 1 week ago:

    @glaucomardano there is no glow and HoverCraft has no collisionShape :)

  • Profile picture of thetoucher thetoucher350p said 8 months, 1 week ago:

    nice work man, i like it =)

  • Profile picture of mifth mifth132p said 8 months, 1 week ago:

    @ficik , would you like to share your shader?

    I did a JME shader library: http://code.google.com/p/jme-glsl-shaders/

    I can add your shader or add you as a member of the shader library project.

  • Profile picture of ficik ficik17p said 8 months, 1 week ago:

    @mifth it would be honor to me :)

    But don’t add it now. I need to fix few things and improve comments. I’ll post new version soon.

  • Profile picture of mifth mifth132p said 8 months, 1 week ago:

    COOOOLLL!!! Would you like to be a member of a project or just paste a code here?
    If you want to be a member, so I need your email to give you an access.

  • Profile picture of ficik ficik17p said 8 months, 1 week ago:

    I’m not going to work on more shaders or keep improving this one. I’ve got right now what I need for my game. So for now code-pasting would be enought. Maybe next time, but thanks.