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.
Cheers,
Erik