• Register

This is Socuwan, a game which in 2017 will be an MMO of epic proportions! Craft, skill and battle your way to fame and glory in a world that is heavily based around PvP. This is a quirky and unique indie MMORPG being created by the community, for the community. Socuwan is a quirky indie MMORPG for Windows, Linux and Mac. It is highly community driven, both in terms of gameplay and development, with around three quarters of the content in the game being made by the community!

This week I worked on rendering water, and created a tranquil lake!

Posted by on

I've always been daunted by the thought of having to program water for my game, but this week I finally went for it and programmed the wet stuff! Check out my dev log video below, or read more about how I created the water under the video.

Features:

  • Reflection: By adding a couple of extra render parses I was able to create some neat effects for reflection and refraction. The reflection is rendered to a texture by moving the camera under the plane of the water and rendering everything above the water's plane. This texture could then be clipped to the water's surface in a subsequent render parse.

  • Refraction: Another render parse was used to render everything under the water's surface to another texture. This texture would act as the refraction texture and is also clipped to the water's surface in the final render parse.

  • Fresnel Effect: The reflection and refraction textures are blended together using the Fresnel calculation. This means that when you look straight down into the water it appears very transparent, but when you look across the water's surface at a low angle it appears almost completely reflective.
  • Distortion: To give the illusion that the water surface is moving I used a du/dv map. This map is similar to a bump map, but the red and green value at each pixel represent the x and y texture coordinate offset at any given point on the water's surface. By moving two of these maps over each other and taking the average of the two maps before using the values to distort the reflection and refraction textures the water appears to move.
  • Specular Highlights: Finally, I wanted the water to appear shiny, and to shimmer in the sunlight. For this I used bump mapping and 2 moving normal maps to get the normal at each point on the water's surface. I used these normals in a fairly standard specular lighting formula to create the specular highlights.
Water and SoundEffects

So that's it for another week! Thank you very much for reading :) Next week I'm working on adding sound and music into the game! If you want to see more of my dev log videos then check out my Youtube channel, or you can see a load more pictures and updates on my Twitter page.

Post comment Comments
Urch
Urch - - 120 comments

Your dev log videos are great! Especially considering I am currently studying the development and design of games and one day hope to create some of my own, having every part of your development progress explained is fantastic. So thanks for the knowledge and keep up the good work!

Reply Good karma Bad karma+2 votes
my_medieval_soul
my_medieval_soul - - 79 comments

I found out about you yesterday and watched everyone of your videos in one day on youtube. Keep up the good work!

Reply Good karma Bad karma+2 votes
TKAzA
TKAzA - - 3,154 comments

Great devlog, nice to see how things are created.

Reply Good karma Bad karma+1 vote
Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: