I've been working on the boats of Kainga and I decided to add wakes when the boats move through the water. Not being an expert at materials, I was surprised how well it turned out so I decided to share the step-by-step. I created this in Unreal Engine 4 but I'm sure you could follow along and adapt it for Unity as well. It's not too complex. The Result:The Mesh: First I started with a mesh, the shape of the boat's wake. I made this simple model in Blender. What's important is the UV fills the box top-to-bottom and, in my case, right-to-left. I duplicated the mesh and flipped the normals so that the mesh would be double-sided. Import the mesh into Unreal, and add it to your character. The Texture:Now it's time to make a noisy texture for the material. I created a looping pretzel shape in Photoshop seen below: I copy-pasted it a few times, and flipped it horizontally and vertically and added each variety to a different color channel: This is just to increase the randomness of the wake later on. You can use any noise image you'd like, just see what fits your needs. The Material:Make a basic masked material, I put "1" in the Base Color because my game is stylized and adding just 1 will result in a plain white color. If you want to add more detail, this is where it would go. I added our texture, connected it to a Panner with time and a speed of (1 , 0.1) so that it moves to the left and slightly up. I also had to rotate it 90 degrees. This should have just been done in photoshop! (Doh!) I duplicated all this, and panned the second one at a slightly different angle, (1.2 , 0.5) and added just 2 of their color channels together. Doesn't matter which ones, as long as they're not the same one. I added a gradient texture on the bottom that fills in the bottom half so that there's more volume to the wave. I also subtracted another one of the color channels from that to add a bit of variety: Finally, I use the gradient again on the top to fade away the hard edges. I made the gradient negative using the "1-x" node, then multiplied it to the whole thing before plugging it into the Opacity value. Small Additions:I added a second wave mesh in front to make a better splashing effect as seen below. The UVs are EXACTLY THE SAME so that the material still works the same way. (Note: The longer the segments of UV, the faster the water will "move" across that section) Here's how it looks on the model itself in the engine: That's it! Now you can put this mesh on pretty much anything, I scaled mine vertically based on the character's velocity/max movement speed, which makes it appear and grow based on the speed of the boat. It's pretty neat! For not too much work, you can really improve the look of the boat's movement.
Check out and wishlist Kainga on Steam if you like the looks! Thanks!
0 Comments
Leave a Reply. |
Erik RempenI create, design and develop video games I'm interested in playing. Archives:
Missions Production Buildings Making Wakes The Beastmaster Basic Units Basic Resources The Fire System Presentation Re-Imagined Creating Water Cliffside Stairs Watchtowers Melee and Ranged Units Unit Organization Farming Carrying Ladders Weather and "Seasons" Technology Ladders and Elevation landmasses Structure Design Animating 2D units in a 3D world Setting the Theme Setting the Focus |