Archive - Surf’s Up RSS Feed

Another refactoring

After some technical discussions with one of the guys at SideFX, I’ve done some rework of the basic setup in order to facilitate ‘pasting’ my wave onto a ocean surface. The wave needs to be a NURBS surface and I had turned it into a polygon surface in order to get enough detail to spawn particles. So, I reworked the setup so it supports both needs.

One of the things that is important in a wave setup like this is that you create a unified texture space that uniformly spans both the ocean surface as the animated wave. This texture space also needs to warp and stretch with the wave surface in order to create realistic displacement and foam movement (so a simple projection is out). Luckily both these issues are fairly easily solved in Houdini. There is a Paste sop that is able to literally ‘paste’ the wave (the feature) onto the ocean surface (the base).

In order to get the UV space of both elements to line up and deform properly I’ve used the ‘ray’ sop. With this sop you can project rays from one surface (the wave) onto another (the ocean surf), you can then suck up attributes from the target surface (ocean surface), which in my case is the UV attribute. This way the wave inherits the UV space of the ocean surface regardless of the relative position of the wave on this surface. Really cool stuff…

this ‘only’ leaves the warping and stretching.. for this I have a non-distorted version of the wave (basically a flat surface) that has the same topology of the animated wave (in the surf’s up paper this is called the ‘pref’), this flat version is the one used in the ray sop. The UV attributes are then copied to the animated wave which is then pasted on the ocean surface. The attached file shows the result with a grid texture to show how the wave interacts with the ocean surface and UV space.

So far so good… of course this is without all the problems I encountered in different area’s before it actually worked. The nice thing about this is that by editing the ‘flat’ pref surface I can tune the stretching of the surface on the wave.

WavePrefTest

Cheers,
Erik

Post to Twitter

Forces and particle generation

I’ve solved a fairly hairy problem that was pestering me while the solution obviously was very simple. I couldn’t for some reason get my force attribute on the lip of the wave drive the amount and velocity of lip spray particles. In the end it was a matter of better distributing the value of the force attribute as it is applied to the ‘surface attribute’ distribution mode of the particle source (a big thanks to the really great support team at sidefx for helping here).
I’ve started using a lot more ramps to control the distribution of values of attributes in the setup as they give me a lot more control and also do this much easier.
In the mean time, I’ve added a custom VEX SOP that displaces the lip to create the shape of the water breaking up where it falls down with the most force. So the displacement is controlled by the force attribute. I created custom VEX SOP because I had problems with the displacement slipping as the surface morphed. Watching the fxPHD rnd101 class 6, gave me the solution to tacke this. I had to make sure the P(oint) locations in my ‘shader’ were locked to the unmorphed ‘texture’ (UV) coordinates…
I’ve added a subdivide that is also driven by the force attribute after the displacement which smooths out the details and brings birth locations of the particles closer to the ultimately subdivided (in the render) surface, so the particles match up with the full highres subdivided render results.
The turbulence that randomizes the displacement in turn gets fed back into a ‘force_mod’ attribute that adds texture to the force. This ‘force_mod’ attribute now drives both the amount of particles of the lip spray and the velocity of these particles.
All this adds a lot more natural look to the lipspray. I’ve also eliminated the ‘curtain like’ lip spray that fell straight down from the lip in the previous version. After looking at a lot of reference footage this turned about to be totally wrong. Looking at the current render, I notice that the camera angle kind of hides some of the randomness. Think I’ll render a version looking just straight out at the wave.
Lastly, I think I’ve found the right tools to combine this strip of wave geo onto a bigger water surface: the paste sop. This sop allows to add detail surfaces on a base surface while fully integrating texture space and only adding detail to the geo where needed. Looks promising (I actually think this is the exact tool they used in Surf’s Up to do this).

Any way, still lots of stuff to do, but making progress so I’m happy!

WaveTest6

Cheers,
Erik

Post to Twitter

Time for some render tests

I’ve done a render to get a better view on how the lipspray particles are behaving. This was rendered with a overall density of around 120000 particles. It will need quite some more to get the right effect. Obviously there’s some work on integrating the particles with the surface of the lip as you can still see rectangular source shapes. I also will need to look into getting the particles to self shadow a bit more.

I haven’t done any work on shading the water surface itself however. The surface needs a lot of displacement work as well.. but as I said this was primarily a particle render test. I’m really happy with the render speed so far as it took less than an hour to render this on a single MacPro (2008, 8x3Ghz). Especially considering this includes some serious motion blur. I need to increase the pixel filtering some more though.
One thing I’m going to look into is instancing more particles in the render, which should increase density with less performance impact as only visible particles will be used to instance such render-time particles.

Here’s the link to the render:

WaveTest5

Cheers,
Erik

Post to Twitter

First refactoring

I’ve completely reworked my setup. Its now building a mesh by lofting my control curves together into a stable mesh. So the wave is no longer ‘moving’ through a grid mesh.
This means that I’ll have to create the effect of the wave slipping under the water surface by manipulating UV cordinates and such when rendering.
It however does provide a nice and stable mesh which makes it much easier to define different zones for rendering later and it also helps a lot for defining the lip for generating lipspray and the whitewater. So the particle systems are much easier to control now. Sometimes it helps a lot to read about how other did something before
The system is now fully procedural, so you can basically specify the size and resolution of the wave and the resolution of the control rollers. The rest is automatically generated by Python and a Foreach loop within the sop network.
The resolution on the control rollers did provide an interesting challenge… I needed to smoothly interpolate between the rollers and the actually mesh resolution. It so happens to be that Houdini doesn’t have a nice function which can do a cubic interpolation which you can use in an expression. It has such functions for keyframe interpolation but not generically. So I ended up have the control rollers drive a curve, which then does the interpolation (after subdividing it once) I’m going to look for a python function that can do cubic interpolation directly or write one myself as this will make the setup easier.
Lastly, I’ve included a force attribute to the wave which specifys the force with which the lip of the wave is crashing down (this was also hard to do with the previous setup). This force now drives the lip-spray system and will be very important for the whitewater as well.

Anyway, another step forward:

WaveTest3

WaveTest4

Cheers,
Erik

Post to Twitter

Houdini: Surf’s Up

I’ve started working today on a wave system ala Surf’s Up: WaveTest1.

It’s virtually completely procedural. You just pass in a grid size, amount of columns and rows and animate the wave position and the big rollers (see WaveTest2) to animate the breaking of the wave. The only thing that’s not totally automatic right now is the generation of the rollers, there are now always 5 of them. I think I’ll need to add some Python to make that number flexible as well.

The lip-spray currently is based on upwards velocity of the water surface in combination with the height of the surface. I’m not sure if that’s the best recipe although it looks fairly ok as it is now.

If I wasn’t already very happy with Houdini, I am now.. I was able to create this from scratch in about 5 hours. As I’m only starting to learn Houdini in ernest I couldn’t be happier!

Next up:
- improve the curves for the deformation
- add the settling down of the wave
- adding the whitewater where the lip crashes into the water, and the spray that swirls around in the tube. – the probably much harder part.. shading.
- After that I might put a surfer on there and work on all the splashes and wake he/she generates.

In terms of fun, this is only a little notch below actually surfing yourself…

Cheers,

Erik

Post to Twitter

Page 4 of 4«1234