November 24, 2013

water/underwater & sky shader update #03

Yep, I haven`t been very active blogger lately.
I am very glad that company I am working for brought me to Amsterdam to Blender Conference this year. I even did a presentation there together with my colleague Michael Otto about GLSL shaders in Blender Game Engine. And for the presentation purposes I decided to demo my water/underwater shader there.
Just before the presentation I managed to tune up the shader and the scenery a bit.

so the changes since last update are:
- projected grid approach for the water surface (lousy implementation)
- per-vertex displacement mapping for waves
- basic but effective shoreline detection for water surface and ground
- added some subtle cloud layer and stars in the skies

this looks great, I would like to see a blend file soon. I actually think though, that version #2 has better looking wave patterns(choppier with more lateral movement). could this be implemented as a blender internal shader, or at least as a viewport glsl shader so I can render it and composite it into other renders?

I LOVE the work you put into your shaders. I believe video 3 does a better job of the mid distance refraction but I do think that there is too much specularity making the water look like GEL / PLASTICky. Great job on the atmosphere. Very inspirational. I hope you continue developing and I will donate because I love BGE (Linux guy here). Keep up the great work.

Awesome shader work as usual!How about instead of converting it to Unity, why not make it into a module for the fully open-source Torque3D engine ( http://www.garagegames.com/products/torque-3d ). They also now have a Linux and MacOSX port soon, and with its awesome terrain editing features, this king of water and sky simulation would really be the greatest combination of open-source game dev. efforts :)

MARTINS thanks I'll teach my game like this with your water ok I send you a video link and facebook page and some pictures thankshttps://www.youtube.com/watch?v=Mmviq40i6jE&list=UUdmD2jCm_Nicy38KcJtAxMAhttps://www.facebook.com/eusogames

hello Martin, could you take a look at this https://www.youtube.com/watch?v=6eINQYq7akg i have problems with this scene, i made floor reflective by using your earlier method with spinning plane refraction + reflection. So i'm using only reflections with 4 texture channels reflection 0, refraction 1(disabled), normal 2, diffuse 3 and i want to have specular on the floor as well. I have tried to edit the code by adding specular to the variables and texture channels but it didn't work. Maybe i should bake specular ? and then add it to the code ? Another problem is that while using 3 cameras i can't or don't know how to set multiple objects to reflect, for example, i want my TV also reflect a room so i tried to duplicate, rename the camera and watercamera and edit the code with changed names but it didn't work as well. I know multiple reflections can be done with cube maps but i don't know how to set it ptoperly :/

Can't wait to test this. I hope so this one won't have grey or blue, unreflective and unrefractive buffer as previous ones with underater shader had for me(the one without underwater looks good, but it crashes when I leave scene with it and return to that scene again...

martin, I've got an idea- you could make an add on that allows the player to tweak the water. You could add a special material option that allows the user to switch to water(similarry like switching between internal and nodes). Also a ground water checkbox in material tab for any other materials so the user can set which areas are large and used as gorund. In water material settings you can put a section for muliple versions of water(water 0.95, water 0.99, water surface 1.1 etc.). Also include all the tweaks and some extra data(for example, water distortion lens, shiny speculars, foam etc.). I hope you have time to make this because we all would love that...;) However, could you, please, take a look at this? https://www.youtube.com/watch?v=0JZqd7wAwGc