Dishonored: Animation, Pre-Production and Water Shader
Events
Subscribe:  iCal  |  Google Calendar
Kyiv UA   22, Sep — 23, Sep
Valletta MT   23, Sep — 29, Sep
24, Sep — 27, Sep
Tokyo JP   25, Sep — 27, Sep
San Diego US   27, Sep — 30, Sep
Latest comments

Then stop scrolling. My Florida Green’s doctor can help get you registered and lead you towards your medicine. Enjoy this break from social media with a newly legalized joint. Contact My Florida Green today to ‘get legal’ with your medical marijuana card in Sarasota.

Thats really cool talk :)

Wow it's so refreshing to see projects inspired by serious cinema and even more literature, most 3D artist I know probably never heard of Tarkovsky and wouldn't go through an Art film that is "foreign", 2.5 hours and has really slow shots. It's a shame, there's so much inspiration out there waiting to be taken from all the brilliant XX century Masters of cinema... Keep up the good work, I really hope to see more stuff from you.

Dishonored: Animation, Pre-Production and Water Shader
5 April, 2018
News
Report

Let’s study the second article in the series of posts on the game design techniques behind Dishonored by Calvin Simpson. The second one focuses on guard characters, animation, pre-production, and the water shader. 

Animation

I started animating the guard character’s locomotion moveset to get it in and tested in-engine as quick as possible. These animations will be developed & tweaked over the course of the project as other tasks with higher priority are completed.

The rig and skinning also went through some tweaks as I started animating – which is expected to happen and luckily biped provides enough control for this to have not affected anything negatively.

Animation.png

Water Shader

As I decided to take inspiration from the second level in Dishonored 2 which has you arrive by boat at a port I needed to develop a water shader to reflect the ocean as that would play a large part in immersing the player in the world.

20180131155346_1.jpg

I researched into how to generate the noise function required to get that effect as utilizing sin gives uniform peaks and valleys which is undesirable for what I needed as the water seems to sharpen as it reaches its peak and softens in the valleys. In my research I found out about a Gerstner wave function from here – https://80.lv/articles/tutorial-ocean-shader-with-gerstner-waves/, where I utilized the shader function shown there and integrated it into my own setup with 4 layers of Gerstner noise to displace the tessellated plane.

I also used the standard techniques of combining two normal maps being panned at different speeds and tiled at different rates to create noise on the surface. I did, however, opt to utilize just the standard opaque PBR shader for this as I don’t intend for the player to go underwater, and the consistency of the water is too dense to show anything underneath – though if the need arises I could still integrate translucency support.

Also, a big part of keeping this shader physically accurate was reconstructing the normals per fragment (pixel) which I accomplished using GPU derivatives to read neighboring pixels due to the way the array processor of the GPU processes blocks of 4 pixels (p.xy, p.x+1, p.y+1, p.xy+1) – so I used this to force the shader to buffer the result of the Gerstner wave displacement, then I retrieved the cross product of the delta of the neighboring heights, and then transformed the resulting vector back into tangent space combine the panning normal maps. This was all necessary as displacing a mesh does not recalculate the normal as that is pre-baked into the vertex stream (in the mesh), so to properly calculate light (especially with the amplitude of the waves being quite high) I needed to do this.

Vertex Normal Reconstruction.png

And as usual, I exposed as many pertinent parameters as I could to best control the look-dev via material instancing.

MI.png

This is the shader code so far – though as I bring in more environmental assets into the game it will change to meet the needs.

Shader.png

I used mesh gradient fields to find the pseudo intersection of meshes with the water to generate foam around them – though I intend to further push this, where I could also use this to generate a dynamic flow map to push the texture and even noise around objects.

If the need arises I also intend to look at rendering to a depth texture for a specific section of the level to apply dynamic buoyancy to objects in the water such as boats etc using vertex displacement.

Calvin Simpson, 3D Artist

The article was originally published here.

Leave a Reply

avatar