Dishonored: Animation, Pre-Production and Water Shader
Events
Subscribe:  iCal  |  Google Calendar
7, Mar — 12, Jun
Breda NL   23, Apr — 26, Apr
24, Apr — 27, Apr
Vilnius LT   3, May — 5, May
Los Angeles US   10, May — 11, May
Latest comments
by sourabh gupta
2 hours ago

Packers and Movers in Agra ✔ Charges List ✔✔ Get Estimate Compare & Setect ✔✔✔ Get a list of 8 Best Packers and Movers in Agra. Free quotes from multiple Movers and Packers Agra. All companies are physically verified. https://1-support.in/packers-and-movers-agra/

by sourabh gupta
2 hours ago

Packers and Movers in Kanpur ✔ Charges List ✔✔ Get Estimate Compare & Setect ✔✔✔ Get a list of 8 Best Packers and Movers in Kanpur. Free quotes from multiple Movers and Packers Kanpur. All companies are physically verified. https://1-support.in/packers-and-movers-kanpur/

by sourabh gupta
2 hours ago

Packers and Movers in Varanasi ✔ Charges List ✔✔ Get Estimate Compare & Setect ✔✔✔ Get a list of 8 Best Packers and Movers in Varanasi. Free quotes from multiple Movers and Packers Varanasi. All companies are physically verified. https://1-support.in/packers-and-movers-varanasi/

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

Be the First to Comment!

avatar
wpDiscuz
Related articles