Ocean FX

Moving onto the next steps of my project I wanted to experiment further with fluids, more specifically I wanted to replicate some of what I had seen of Dynamic Oceans in a few showreels. To undertake this I utilised the ‘Intro to Dynamic Oceans’ tutorial on Pluralsight. One problem I did run in to whilst making notes on this series of videos, was that once again, it was using an older version of Houdini, which had a completely different set of shelf tools for oceans, as well as a vastly different node layout when using the tools. Luckily, SideFX has a very thorough user guide, which helped me get to grips with some of the changes made in version 16. The tutorials themselves covered most, but not all of the tools available under the oceans tab, going in to a good amount of detail of the parameters which affect the simulations, as well as how to edit the materials applied when rendering. Overall, a very good set of tutorials, which enabled me to go forward and produce a good set of experiments and tests.

Aims

  • Get to grips with the ocean tools and produce test renders
  • Time my renders to enable me to plan ahead for my final output
  • Evaluate my tests and gather feedback from my peers

Prior to undertaking these experiments, I was under the impression that creating an ocean in Houdini would operate very simarlily to creating a FLIP tank, consisting of volumes and particles. However, to my surprise, when using the ocean shelf tool, no DOP network is created, this is because there are actually no dynamics to create. An ocean in Houdini is simulated by first creating a grid, the points of which are then deformed and moved at random to emulate waves.

An ocean grid as it appears in the viewport.

An ocean grid as it appears in the viewport.

The ocean spectrum node under the ocean_surface container is probably the most important node when it comes to controlling the appearance of the simulation, from here you can first control the size and resolution of the grid, the ‘Resolution Exponent’ controls how much detail is in the initial grid, the higher the value of this parameter will obviously create a much more detailed ocean surface. This parameter should also be directly tied to the number of columns and rows in the initial grid, through trial and error it was discovered that the exact value of rows and columns should be 2^ of the resolution exponent, through simply using relative references.

It’s important to note that after doing this I experienced a much slower playback in the viewport, a quick and easy way of remedying this was to use the ‘Downsampling’ parameter under the Ocean Evaluate node, at it’s default the value is a downsample of 2, basically this means that a resolution exponent value of 9 with a downsampling value of 2 will result in the viewport showing a resolution exponent of 7. Raising the downsampling will result in much faster performance in the viewport, without affecting the resolution when it comes to rendering.

Going deeper into the parameters in the ocean spectrum node, the depth value affects the uniformity of small and larger waves within the ocean, deeper oceans have a strong dispersion relationship, meaning larger, low frequency waves will move faster than smaller waves, a low value in the parameter will make both sizes of waves more uniform.

Another interesting feature here is ‘Loop Over Time’, this is essentially what it says on the tin, this can cause your ocean to loop perfectly, setting your Loop period to the length of your scene will mean that there will be no noticeable ‘cut’ between the last and first frame. This is an incredibly useful feature, in an example, if you wanted an ocean in the background of a scene, you can effectively have it loop infinitely whilst only having to actually render around 10 seconds of simulation, which would obviously save a lot of time rendering.

The speed parameter, suprisingly does not actually affect the speed of the waves, instead it controls the rise and fall of the ocean, higher values here will create larger, low frequency waves. This parameter works in tandem with another parameter ‘Scale’ which affects the size of all waves in the scene, large and small.

Directional bias affects how much individual waves will stick to the direction parameter, a high value here will make all waves more uniform in direction, so when creating my ocean I thought it a good idea to leave this value relatively low, as having completely uniform waves would most likely look quite unrealistic.

‘Chop’ affects how sharp the crest of a wave will be, and also works in tandem with the size & speed parameters, a mismatch of all of these values together can create quite a messy looking grid, as some crests will intersect into eachother.

Lastly for the ocean spectrum, is the minimum wave length, which sets the minimum size of all waves in the scene, any waves that are smaller than this value will be smoothed out of the mesh, when creating a calm, placid body of water I imagine this would be quite a useful tool, but for the purpose of a turbulent, choppy ocean, I decided to leave this value at 0.

After playing around with these values for a while, I decided to attempt to render out my ocean to get a nice proof of concept as to what to improve and change for my final output. The rendering process itself was initially quite troubling, as when I first attempted a render my ocean came out as a flat grid with no displacement map or texture. Following a tutorial didn’t really provide any help with this, since most of them were using different versions of Houdini. After some experiementing and troubleshooting I found that I had to bake out my displacement maps under the ROP output driver under the ocean_surface node. Once I had done this, I was once again surprised, it was very, very slow. To render one frame of my ocean at 1280 x 720 took 20 minutes. After some quick maths, I decided that it was probably for the best that I not attempt to a full render of 240 frames, since my best estimate on render time would be around 3 days. Further steps from this will most likely lead me to using one of the university lab computers to complete this render, as leaving my PC out of commission for that amount of time wouldn’t be very productive.

A frame of my ocean.

A frame of my ocean.

Evaluating my render, there are definitely some things I would improve. Mainly I want to further play around with the materials of the surface of the ocean and change the color ramps within, definitely increasing the blue values of the deeper sections. Secondly I would also change the displacement values of the foam and crests to make them more apparent, whilst it is a nice subtle effect currently, I really want to emulate realism in this scene, most likely I’ll try to accomplish this by using a lot of reference images to perfect the look. Overall, a decent first attempt at making an ocean, while the render times are certainly a hurdle to overcome, I believe myself to be making good progress in this area.

Leave a Reply

Your email address will not be published. Required fields are marked *