Forceshield – my very first shader

Home Forum Development User Code & Projects Forceshield – my very first shader

This topic contains 39 replies, has 13 voices, and was last updated by  mifth 2 years ago.

Viewing 15 posts - 1 through 15 (of 40 total)
  • Author
    Posts
  • #21805
    +13

    ficik
    19p
    Participant

    I just wrote my very first shader.. uff. It’s force field which can display up to 8 hits.
    demo:
    http://www.youtube.com/watch?v=uu2nbaBM9Pk

    #147129

    madjack
    629p
    Participant

    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?

    #147130

    ficik
    19p
    Participant

    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 :)

    #147131

    madjack
    629p
    Participant

    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.

    #147132

    ficik
    19p
    Participant

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

    #147133

    ficik
    19p
    Participant

    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):
    http://www.youtube.com/watch?v=urzMiUeHsCc

    I just changed model and it works

    #147134

    madjack
    629p
    Participant

    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.

    #147135

    oxplay2
    165p
    Participant

    Very very nice :)

    the real forceshield! Just Rate your post! :D

    #147136

    glaucomardano
    292p
    Participant

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

    #147137
    +1

    ficik
    19p
    Participant

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

    #147128

    James Mundy
    627p
    Participant

    nice work man, i like it :)

    #147138

    mifth
    359p
    Participant

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

    #147139

    ficik
    19p
    Participant

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

    #147140

    mifth
    359p
    Participant

    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.

    #147141

    ficik
    19p
    Participant

    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.

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

You must be logged in to reply to this topic.