You're blocking ads, which pay for BlenderNation. Read about other ways to support us.

Water/Underwater & Sky Shader

36

Martins Upitis presents an updated version of his amazing Game Engine Water Shader.

Update: the .blend file of this demo is now available for download.

Martins writes:

This is an update video to one of my oldest projects in the making. previous video. Nothing much has changed since the last video, I just have a better computer now and I recorded it in a higher quality and framerate.

The water shader is based on my own observations.
it features:

  • reflection with accurate fresnel refectance model
  • refraction with chromatic aberration
  • projected caustics on geometry from the water surface based on normals
  • seamless transition to underwater (no fake fog added)
  • accurate water volume with light scattering
  • incident and light ray color extinction based on water color and sunlight
  • simple coastline detection based on terrain`s height-map

does not yet feature:

  • displaced water geometry
  • underwater particles
  • underwater light rays from caustics

Sky model is based on Preetham, but implementation is from Simon Wallner, with a significant (artistic) changes done by myself.

I have also included an overly exaggerated experimental glitter shader and a completely procedural "water droplets on lens" shader.

sound files from freesounds.org

Link

About Author

Bart Veldhuizen

I have a LONG history with Blender - I wrote some of the earliest Blender tutorials, worked for Not a Number and helped run the crowdfunding campaign that open sourced Blender (the first one on the internet!). I founded BlenderNation in 2006 and have been editing it every single day since then ;-) I also run the Blender Artists forum and I'm Head of Community at Sketchfab.

36 Comments

  1. Its work like this that while I understand Ton and the devs about the game engine, It makes me feel like with a little extra TLC and attention there would be no point to distance the game engine from the potential it holds.

    And I know, that while it will not be considered a "Game" engine per say, I am still sure that once its better integrated the community will find a way to still make "Games" with it.

    The thing I have always noticed while using the BGE is that it doesnt handle memory usage or processes very efficiently. But imagine if it did? Either way, cheers to your hard work, its amazing.

    Nate L.

  2. This looks great! I remember not too long ago when water was impossible to do in real time. I haven't seen other BGE oceans/water, but I'd agree with Brian. I think with some minor tweaks or additions like foam, this would really put it over the top. Nice work!

  3. Almost a magical experience! I even saw droplets on the camera lens.

    Absolutely amazing that this can be rendered in real-time!

  4. I've got a question. Since cycles render engine doesn't support volumetric materials, how did you made fading effect? Raylength maybe?

  5. Very nice but the audio has the sound of waves however, there's no waves !

    It would be fantastic to see waves, with some foam, as was available back in 2.49b.

  6. WOW... I thought it was a real video at first...

    are the sparkles post processing? or are they part oft he shader? (they look so nice...)

    • hmm.. no edit option?
      some spelling: "they part oft he shader?" should be "they part of the shader?"

      also the glare on the sun (post or real time?)

      • hi, the sparkles are a post-process shader made by rendering the visible scene to a texture. the texture then is projected to the plane positioned in front of camera, texture tresholded to show only bright parts and then another pass blurs them in 3 directions. And there is another seperate glare shader for the sun :) made completely different than the sparkles. All real time.

  7. Thanks Martins,
    this runs smooth as silk 60 fps on my p.c., very nice work!
    I hope I can use the new BGE book to get more into the game engine, this is awesome.

  8. Looks awesome, and of course I had to see if I could find the edge of the world, hehe. Long trek.
    One oddity: While in the Blender window, it showed as in the video, the full-screen view reflected a lot of checkerboard texture. Pretty strange, since they should show the same view.

  9. fluxcapacitance on

    By far my favorite effect was being able to move the sun around and to see how it interacted with the mountain (as opposed to the beams in the water, etc.). A lot of applications would work great with this, even if we can't literally surf a wave or interact.

  10. Wonderful! I kept looking at this and thinking " I wanna see this on the Occulus Rift!" Scuba diving without the need to safety drills and air tanks!!

  11. wonderful work, just one problem, when you are underwater, the image does not shift and waver about, that's when you are out of the water looking into the water or under the water looking out of it, eg the blob at 56 seconds seems to waver - I suppose maybe its a jelly blob, then its should move,

  12. polygonesrus on

    holy f ' n shit . after all these years working with blender i still cant believe the awsome tool's that people put out there . for free , long live the blender nation . and all the great people who work to make it what it is .

Leave A Reply

To add a profile picture to your message, register your email address with Gravatar.com. To protect your email address, create an account on BlenderNation and log in when posting a message.