For this week’s Blog, I am going to talk about trueSKY’s Volumetric Water. I will be covering a range of features, from basic implementation to water masking.
Adding to your scene
Implementing volumetric water into your scene is quick and easy thanks to trueSKY! The first thing you need to do is make sure you have initialized trueSKY in your scene, so you have a trueSKY Actor/Object in your scene. Then, enable “Render Water” on your trueSKY Object. This option decides if we should render any water at all, while each water instance has their own render option.
Next, we need to add a trueSKY water instance. Search for True Sky Water, and then drag it into your scene.
Now we have Water! You can adjust the size of this with the scale, to fit an area of your choice. If you want to scale the water over a large area, it may be recommend to enable Boundless Ocean. This removes the bounds on the water, making it extend infinitely. For large areas, this will produce a performance boost opposed to mapping out that area.
A vital part of water is the waves it generates. trueSKY’s volumetric water allows for many different ways to customise the waves while still producing high quality, realistic results. The easiest way would be to alter the Beaufort Scale. This is a simplified option, where the larger the value, the stronger and larger the waves are. Below is an image comparing a Beaufort Scale of 1 to 11.
Alternatively, you can manually customise each of the water variables. To do this, enable “Advanced Water Options” in the details tab. Keep in mind, this will disable the Beaufort Scale while it is enabled. For a quick example, if I wanted to make stormy ocean waves, I would:
Stormy Ocean Waves
Firstly set Wind Dependency to a lower value, around 0.2. Immediately you should see the ocean is more erratic, as the waves are not all going in the same direction.
If I wanted to be quick, I could set Beaufort Scale to 11 and be done. Instead, I am going to enable advanced water options. I am also going to set Maximum profile buffer to 4096, to make sure my buffer is large enough for higher quality waves. If you can see the water “flashing”, you likely need to increase the size of your buffer.
Now I can increase the Wind Speed to 30, which will produce larger waves. For Amplitude, I would set Wave Amplitude to 1.2. I have not increased this too far because when there is very large waves, it can cause noticeable points to appear. Finally, I am going to set Max Wavelength to 75. This allows my waves to be much larger. This is just a quick example of a stormy ocean setting. Foam is another variable that can only be accessed when advanced water options has been enabled. Foam forms on the peaks of waves, and we have a slider to adjust how strong the foam effect is. To produce a lot of foam, you will need a lot of waves that are reaching their peak.
Here is a quick video demonstrating some of the different settings:
Buoyancy allows objects to float in the water. We can do this by firstly adding a Buoyancy component to an object. Next, we add probes to the object. For basic buoyancy, probes should be scaled and placed to roughly fill out the volume of an object. Here is an example of a boat with probes attached.
When adding probes, make sure that you add a trueSKY Buoyancy component as a child of a mesh, then trueSKY Probes as children of that. Keep in mind the mass of the object, so it is realistic compared with the object’s size. Plus, for the object to be affected by the waves, make sure you Enable Wave Grid.
Still not floating? Double check your weight settings, small objects with a high mass and small probes will sink (as expected!).
To make life easier, trueSKY Water will automatically create splashes for objects when they come into contact with the water. Simply apply the buoyancy and probe components to the object and then you they will create splashes. Plus, if objects move through the water, they will create wakes and ripples!
For areas void of water, even below the surface, then you need to use masking. A good example for this would be a sunken ship at the bottom of the ocean. To do this, just attach the trueSKY Masking Component. You can use the default cube, or insert your own mesh to use.
Using the settings, you can choose a custom mesh to mask out, or you can enable total mask, which will mask out all water from the area, regardless of depth. Here is a custom sphere mesh with a total mask.
Alter Waves at run-time
Similar to trueSKY, we have functions specific to the Int, Float and vector properties that can be altered at run time. The easiest way to do this would be through the use of Unreal’s Blueprint System. Below is an example of increasing waves through button press, and changing the colour of the water on collision.
I hope you have learnt something from this weeks blog, which was decided by our community. To have your say, Join our Slack Channel.
This week, we are taking a look at an upcoming game called Valiant Effort, by Sharp End Studio Inc. Valiant Effort will take you back to the Second World War, where you will become a member of the 419 “Moose” squadron. Aiming to give you the sense of fear and thrill experienced by the true members of the squadron, Valiant Effort aims to build you up from a cadet in training, through to running a bombing raid. Having partnered with the Canadian Warplane Heritage Museum, the team at Sharp End Studio has access to original equipment and planes using during that era, allowing them to craft accurate replications with outstanding detail.
To further push their immersion further, Valiant Effort will feature VR levels, allowing you to take control of a plane from the eyes of a pilot!
Featuring a single player campaign along with cooperative missions, Valiant Effort hopes to provide you with a unique and thrilling experience, while allowing us to remember those who were lost in the pursuit of peace.