shaderTag Archive -

Newly tuned rough area and some render fun

The last 1.5 days I’ve been busy with more setup work for the particles. I’ve further tuned the rough area on the lip of the wave to make it thinner and more oriented around the tip as I was getting to big an area on the front of the wave spewing out particles, which was not very realistic.

Today, I’ve done experiments on how much particles I can render efficiently. In that course I found that to my not so big surprise 540Mil particles is too much ;) . Densities around 200 mil particles are very doable. The biggest problem you run into is memory and when that fill up the render machine just starts throwing stuff back and forth to your harddisk which is death to render performance.

I got some interesting results from render time instancing which will be very useful for the big white water explosion particles. For the lipspray I think I’ll not end up using instancing too much. With a bit of luck I’ll be rendering some nice lipspray somewhere this weekend.

More details on the changes in my setup for the particles will follow when I’ve got some lip spray renders. I though it would be fun to end before the weekend with a nice fresh new look. As always render included:

new look

I’ve got a animated render cooking now, which I’ll post when its done tomorrow morning. Note that this was a quick setup and there are some changes to the colors which I’d like to do, but it was fun to get something nice looking out of it again after all the technical stuff…

Cheers,

Erik

Post to Twitter

New foundation for lip spray and lip foam

I wasn’t really happy with the results I was getting with lip spray particles with the wave setup. I tried hard to break up the generated particle streams so they would look more organic and turbulent. With just the particle system, I didn’t get near the results that I wanted. So, I decided to rework the data stream in the wave geo in order to already break up particle generation at birth instead of trying to do this breakup with fast flying particles using forces.
I’ve now come up with a new data set on the wave that’s much more turbulent and looks more like what I see in a lot of the reference images and movies. The water at the lip breaks up fairly much in the same pattern as the surface displacement on the water through which the wave is moving. So it was clear that I need to have the turbulence that generate this breakup to be based of the displacement of the ocean surface on which the wave is pasted. This in the end meant that I had to reconfigure the pasting of the wave on the ocean surface to already get the UV’s of the ocean surface onto my wave early up in my wave setup. Luckily this was fairly easy to achieve.
The next step was to create attributes on the lip of the wave that determines the area where the displacement has to be increased (and roughened) in order to generate the break up in the lip. I added a bunch of ramps which help configure the distribution of this area and its intensity more easily for good measure.
Last thing I did before I move back to particles was to enhance my wave shader to add ‘foam’ on the lip of the wave at the peaks of the additionally displaced and roughened area. This really enhances the look of the lip of the wave and will help bridge the clear water of the wave and the white particles coming of it (as is my current theory). Cool lesson learned from this is how to move data back and forth between displacement and surface shaders.

As always a test render of the results so far. Now, again, back to particles :)

Cheers,

Erik
Wave with lip foam test

Foam lip test2

Post to Twitter

Animation test

I’ve updated the wave animation and did some ‘underwater’ tweaks to solve some issues that were still in the wave. Most of these have to do with the force attributes which will drive the particle systems. I also fixed one render issue which turned out to be easily fixed with a higher reflection bias.

The blending between the wave control shapes still needs to be improved so the blending is more smooth as you can see the transitions between shapes in the wave is still a bit rough.

wavetest8

I got asked on a forum if I could share the water shader I used for these renders, so I made a quick OTL of it: zone based shader

It has a separate set of parameters for 5 separate zones in a surface, which you specify with a point attribute called ‘zones’ with values from 0-4. It helps if you smooth the zones attribute quite a lot. I haven’t included my current foam texture, nor does it have a material level parameter for specifying it, its truly a work in progress and I didn’t have time to make it all nice and polished yet.

Cheers,

Erik

Post to Twitter

Shading time!

Today, I’ve done a massive rewrite of the shader I was using so far. In the progress I’ve added attributes to the wave geometry that adds zones to the wave. The first image shows a visualisation of these zones. The zones are defined by the angle of the surface.

Yesterday night, I had finished an initial attempt at a ‘zone based shader’. The second image shows where I ended (hardly readable but shows complexity). I had a shader setup for each zone and blended the output from these afterwards. I could have predicted that this would perform horribly bad.. and it did. Turns out it obviously has to do the reflect and refract calculations (the most expensive) for all zones for each ray it calculates. For some pixels (those that reflect and refract more than one other surface (up to 3/4) would require up to 4*4*5 refract/reflect calculations!! rendering out a single frame took a looooong time.

This got me a little worried.

Just before the end of my day however, I figured I could just as easily just blend the five sets of all input parameters (one for each zone) and pipe the result back into a single shader path. This is where I ended up now and it renders crazilly fast and its really a lot of fun playing around with different settings for the wave zones. The third image shows the shader as it stands now.
Finally, the last image shows a rather crazy render with each zone having different colors and some other settings. Hardly an effect you’d strive for in a normal situation but it does prove the effectiveness of the rendering of the different zones.

RenderZones

ShaderNetwork

ShaderNetworkFinal

CrazyZoneExample
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

Page 3 of 3«123