- Home ›
- Forum ›
- Development ›
- User Code & Projects ›
- ProjectedGrid and legacy water effects from jME 2
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:
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.
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?
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.
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.
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.
I am using the ProjectedGrid as well in my ship simulator and until now, without problems. However, since my simulator is getting some more features, I start to notice some issues:
I have created a ProjectedGrid with sizeX=100 units and sizeY=100 units (my ship is around 1 unit). As soon as I start to come closer to the edges, flickering occurs and the waves are getting ‘less detailed’. Also, white areas will occur in the waves (as if there is no water at all, but the ship keeps bouncing as it should on the waves, so the waves are still calculated, just not displayed properly).
Below you can see this in a video I made. I decreased the size of the grid to 20×20 units to speed up the process (it makes the waves ugly, but this is just for testing)and I have cut some parts out of the video. In the HUD you can see in red the travelled distance (in world units). In the last part, I disconnected the camera from the ship (it is connected with a CameraNode and switched back to the FlyCam: Same artefacts.
In the video:
00:00 – 00:20 –> Some flickering from the beginning. This has to do with the fact that I reduced the sice of the grid to only 20 units.
00:20 – 00:43 –> Little bit more flickering
00:43 – 01:17 –> Strange visual artefacts at guns (barrels showing through), some white areas alongside the edge of the screen (01:08 and further, travelled 400 units).
01:17 – 01:50–> Ship and guns are flickering as well. More white areas, also at bottom of screen.
01:50 – end –> Disconnected camera to show same results. Ship seems to rol normally on the waves, but all parts are flickering.
Strange thing is that also the parts of the ship (pay attention to the barrels of the guns) show weird behaviour, so not only the water. This makes me wonder if it has to do with the regular camera and not with the ProjectedGrid? I see the same issues when I set the wave height to 0 (I made several sea states (from no waves to a big storm).
Any idea what can cause these artefacts? I have tried to understand what exactly the code is doing, but the only thing I have managed so far is to get the ProjectedGrid working and to create different sea stated during runtime. Understanding the process of creating the actual waves and shaders is one bridge too far…
You must be logged in to reply to this topic.