Water Plugin(Unreal Plugin)

Banner

About

Description

I created a plugin for "Method Of Loci" to improve water interactions. It added water ripples when objects touched the water, improvinng the feel of the game. I then implemented this on the GPU to learn Unreal Engine's custom shader handling and for performance reasons. Later, we added buoyancy to make the water feel more realistic.


Skills used

  • C++
  • Unreal Engine 5
  • HSLS

Challenges

At the beginning, I lacked experience in implementing custom compute shaders, in Unreal Engine. After knowing how to, I looked into understanding the wave function. This had to be converted into code that was hard but feasable. Although it was a relatively small project, completing it within a specified timeframe presented a challenge. Despite the difficulty, I successfully accomplished the task.

Another hard thing was making the water infinite size. meaning you could create it as big as you want and still have the same size ripples.


Result

Features worked on

Render Target Ripple

To create the ripple effect, I implemented the wave function and rendered it to a 2D texture. The approach involved placing a small dot at the standing position of the object and calculating the wave pattern from there. This was all done on a render target.

Water Material

The water material needed specific features, using the render target at runtime to display ripples. It was essential for the material to comprehend the placement of these ripples within the water. This allowed me to create water that appeared infinite in size.