ProjectedGrid and legacy water effects from jME 2 (14 posts)

Topic tags: ProjectedGrid, Water
  • Profile picture of matthias matthias6p said 3 months, 3 weeks ago:

    Hello,

    has anyone been working on porting the ProjectedGrid and the JME 2 water effects to JME 3?
    Because I have started doing so, more or less as a personal exercise…

    I think it’s time to share the information and show a screenshot that might look familiar :)

    It’s work in progress and there are some features still missing.
    Anyway, feel free to check it out:

    https://github.com/mschell/jme3test

    Greetings,
    Matthias

  • Profile picture of normen normen1291p said 3 months, 3 weeks ago:

    Hehe cool. Nobody was working on this as the water has pretty much been replaced with post process water really.. The projected grid has been worked on in some way but the “real” solution will involve the lighting shader.

  • Profile picture of matthias matthias6p said 3 months, 3 weeks ago:

    Sure, I thought so! I especially missed the jme 2 water effects, as they are more suitale for offshore scenes and have a simple interface to the wave height field.
    But I will definitly check out how you can get similar results out of the awesome post process filter…
    That will naturally be the next thing to go from here.

    @normen said:
    The projected grid has been worked on in some way but the “real” solution will involve the lighting shader.

    Sorry, I didn’t quite get what you mean. You can apply any material to the projected grid in the code here. What is not “real” then?

  • Profile picture of normen normen1291p said 3 months, 3 weeks ago:

    I mean the solution we will use for jME3.

  • Profile picture of Lockhead Lockhead8p said 3 months, 3 weeks ago:

    Would it be possibly to get the grid information? I mean for buoyancy etc like sloshing objects.

  • Profile picture of matthias matthias6p said 3 months, 3 weeks ago:

    Yes, the grid info is totally separated from the graphics via the HeightGenerateor interface.

    public interface HeightGenerator {
        public float getHeight( float x, float z, float time );
    }
    
  • Profile picture of Lockhead Lockhead8p said 3 months, 3 weeks ago:

    The code was a little bit messy but i got it to work. Looks nice so far. I will try to play later in the week with it.

  • Profile picture of matthias matthias6p said 3 months, 3 weeks ago:

    Agreed, some parts really need a refactoring! I didn’t want to change too much before I got it to work. Thats the reason why…

  • Profile picture of Lockhead Lockhead8p said 2 months, 3 weeks ago:

    So one week turned into four.
    I made a little video and combined your waves with my buoyancy. Now the object reacts to the wave height. Please ignore the occasional flickering and the not so good reflections. Never found good params.

  • Profile picture of staugaard staugaard38p said 2 months, 3 weeks ago:

    Very cool :)

    Are you sharing the code or is it TOP SECRET-agent 007-level :)

  • Profile picture of nehon nehon591p said 2 months, 3 weeks ago:

    I missed this post very good work @Lockhead !
    This is based on jme2 projected grid water?
    So you ported it to jme3?

  • Profile picture of Tumaini Tumaini79p said 2 months, 3 weeks ago:

    Very nice! :)
    What OpenGL extensions will this water require?
    I can’t seem to use the other water effects with my Intel card (reporting as OpenGL 2.1 but probably missing some features), so I’d be very interested to know what this effect requires, as the water effects in jME2 worked well with it.

  • Profile picture of Lockhead Lockhead8p said 2 months, 3 weeks ago:

    The credits for porting the water goes to matthias (see the first post). I only utilized his work in my project ;) .
    Also he made his work available for all. See the first post.

  • Profile picture of matthias matthias6p said 1 month, 3 weeks ago:

    Cool to see your results, it looks nice :)
    For objects close to the water surface like your ROV, the reflection map shows some annoying artifacts. It used to be like that also in jme2…
    No clue how to fix it without too much effort… When I find time to continue on that project again I will do some research here.