Breakdown: Mud and Water of Spintires
Subscribe:  iCal  |  Google Calendar
Marina Del Rey US   10, Dec — 13, Dec
Las Vegas US   8, Jan — 12, Jan
Zürich CH   31, Jan — 4, Feb
Leamington Spa GB   31, Jan — 3, Feb
Bradford GB   6, Feb — 11, Feb
Latest comments

Good work bro!

i focus on the composition and framing of my images and the silhouettes of my objects more than on the quality or complexity of the models or materials.

by Duacan
1 days ago

hello Alexander, I really loved your these draw works. I loved cathedrals too.I started 3ds Max new. And I really really want to meet you, if you wanna to do. By the way, my name is Duacan, from Turkey. also Im working for learning and speaking German. Cause Deutschland is the my first country for living. Whatever, take care yourself, Tschüss. insta: 06optimusprime06

Breakdown: Mud and Water of Spintires
16 November, 2017

Pavel Zagrebelnyy has shared an article with some technical details behind rendering of Mud and Water in Spintires:MudRunner, a driving simulation game from Saber Interactive. The developer decomposed some screenshots from the game and then showed how you can recreate mud and water from Spintiers with your 3D tools.

Here is a small piece about mud to get you interested:

Game levels in MudRunner can be up to 1km x 1km in size. They are subdivided into a grid of 16m x 16m blocks. Each block contains a list of plants (trees, rocks, etc.), base terrain data, mud data (optional), and other data. Game only draws those blocks that are inside camera “frustum”. Only those blocks that are near the truck that player is driving are “active”. Game only performs plants physics simulation, mud simulation and water simulation for “active” blocks.

The mud simulation consists of mud-vehicle physics processing (performed by CPU) and rendering of the mud (performed by GPU). For a number of reasons (CPU and GPU are out of sync on PC, high detalization required for rendering is not required for physics, etc..), those two tasks operate on completely different sets of data. We won’t go into details of physics here, but in short, there is no rocket science involved, but it’s not something Havok (physics engine in MudRunner) can do out of the box.

In order to draw the mud, vertex shader takes in a simple 2d grid of vertices, then fetches two A8R8G8B8 textures that look like this:

Texture 1. 25×25 in size for each block, is used for rendering both low-res base terrain and the high-res mud.

R (red) channel – packed height (elevation). It is unpacked into real-world height with a bit of math.

G (green) channel – grass/dirt materials mix factor. Currently, each block can only mix 2 materials.

B (blue) channel – “tint” factor. Tint adds some color variation to the environment, and illustrates physics properties (“tinted” terrain is softer).

A (alpha) channel – marks portions of base terrain that are substituted by the mud, it’s the only channel that is dynamically updated as vehicles deform terrain.


Texture 2. 128×128 in size, is only allocated for blocks with mud.

R (red) channel – “mud height”, is relative to elevation of base terrain. It gets unpacked into a floating point value with a simple multiplication.

GB (green, blue) channels – used for “mud offset” effect (the mud slides away from vehicles wheels as they move).

A (alpha) channel – “mud tracks”, a blending factor of terrain shader into mud shader, In combination with A channel of Texture 1 that makes mud transition into terrain unnoticeable.

Pavel Zagrebelnyy 

You can find the full breakdown on Gamasutra

Source: Gamasutra

Leave a Reply

Be the First to Comment!