Fixing Noise in Physics Engine

Recently I have fixed one long-standing issue in the physics used for Subtransit. Previously all of the physics variables (velocity, slip and other ones) were plagued by noise – the values which one would expect to be stable were actually jittery and noisy.

One of most notable results of this was the fact that acceleration experienced by the train body was so jittery that attempting to attach camera motion to it would result in a sickening constant camera movement.

Subtransit uses a custom physics engine for handling wheel versus rails physics response (the collision and forces between rails and the train wheels) and PhysX for handling the rigid body physics. In the current version of the game, PhysX is used to calculate the secondary suspension (between the train and the bogey) and coupling between the train cars.

Continue reading ‘Fixing Noise in Physics Engine’

Compensating Train Performance with Automode – Electric Part

An important detail of the metro train is its ability to compensate its performance based on amount of passengers in the train. The Newton’s first law shows that acceleration is equal to force divided by mass (F = m*a or A = F/m), so if the engine power stays the same, increasing number of passengers (and therefore the total mass of the train) would result in train acceleration and deceleration decreasing. The end result is that it takes considerably longer to reach the target speed and the braking distance grows very considerably.

To compensate for its weight, the train uses a device called an automode (automatic mode). It’s an electropneumatic device which adjusts both electric and pneumatic performance of the train and its operation is fully recreated in Subtransit. This post only explores the electric part of the automode.

Continue reading ‘Compensating Train Performance with Automode – Electric Part’

Train Aerodynamics (part 1)

The metro trains experience an interesting set of aerodynamic effects in the tunnels. The train itself is used to circulate air through the tunnels and ventilation systems (hence its shape is not very aerodynamic at all, not that it matters at these low speeds). Of course, the main aerodynamic effect on the train is the drag force. On long sloped down sections of track (where the train moves without any power input) the aerodynamic drag can provide about 5 km/h of speed difference as train accelerates from 30 km/h to 80 km/h.

For Subtransit, I’m working on an aerodynamic model that would account for both drag produced by the train as it moves through the tunnel as well as additional torque force produced when train passes by a ventilation shaft. Currently, the CFD results are only preliminary, although there are a few interesting results already.

Continue reading ‘Train Aerodynamics (part 1)’

General Teaser Info

I wanted to make a kind of a general post about the teaser video we presented when announcing Subtransit. The train in this video is running on a pre-determined sequence of events – but otherwise everything is physically simulated. The only thing that was fully animated in the video was the camera movement (which I keyed in manually with the curves editor).

The teaser video takes place on a section of the Moscow Circle line, track 1. This section is one of many that make up the entire big level (each section is streamed in as player moves around the level).

Continue reading ‘General Teaser Info’

Fixed Subscattering on Switches

I’ve done a small update on the plastic switch material. These switches are made of a semi-transparent material, a pretty old type of plastic. An obvious choice is using the Unreal Engine 4 subsurface shading model (subscattering model), though previously they still looked ugly. The change is very simple, but it makes them look significantly better – I’ve added a gradient in opacity along the vertical distance of the switch. This reflects the effect that more light goes through the top than through the bottom (as bottom of the switch is sitting inside its slot, covered from all sides).

Note that just like all other pictures on this blog, all pictures are preliminary and a work in progress. They do not reflect the final quality!

Continue reading ‘Fixed Subscattering on Switches’

Automatic Switches

As part of upgrading the visuals of the train, here’s a new model with new materials for automatic switches of the train. These switches take role of circuitbreakers – they protect various parts of control circuits of the trains against excessive currents. There are approximately ~72 of them in a 81-717 train.

These switches have three states (off, on, tripped). In many cases, disabling part of the train control circuitry may help when diagnosing or eliminating a problem that would otherwise leave the train stopped. There were also cases when drivers have made very considerable mistakes due to an otherwise minor failure – while simply switching off the electric circuit would’ve eliminated the issue.


Continue reading ‘Automatic Switches’

Wheel Rendering

The wheels are rendered with great detail in Subtransit at highest quality settings and the highest detail LOD model. The wheels are a product of a complex multi-layered material and some mesh decal based multi-layering… but mostly just the product of how the source texture is made! As usual, this is just work in progress – only the base rendering with little to no polishing done on it.


Continue reading ‘Wheel Rendering’

New Panel Texturing

I’ve been working on few new additional features to the Subtransit texturing subsystem. The game uses a slightly unconventional approach to texturing which permits significantly higher detail density than simply using unique textures per object. I will talk about the texturing subsystem more in the following posts, but this post should give a general hint of how it’s structured.

So while driving the train, one of the most important parts about the experience is the drivers controls and the drivers panel. In the 81-717 train, the panel is a big console located right in front of the driver, containing most of the primary train controls. It is made up of several panels called blocks (numbered from 1 to 7):

In Subtransit, each of the train wagons is unique to an extent (defined by its unique wagon number, as well as minor differences in the cabin and in the interior). This means that the scuff marks, scratches and other damage, re-painting traces and paint colors and so on are all varied and different in every single wagon.

While it wasn’t originally planned that the train panels would have a complicated rendering procedure, the need for easy adjustment of panel colors, preference for having unique cabins and so on was all justification for blending the final panel material in runtime. Here is a test render of the panel after all the improvements I’ve added to the base shader. This does not reflect how it will look like in the final game, it is merely a test mockup!


Continue reading ‘New Panel Texturing’

How Does a Rheostat Work?

The last post might look confusing without knowing what rheostats are and what they are used for. So this post will explain that without going into too much detail.

First, a simple reminder from the electric motor theory: any electric motor is a reversible machine, meaning that it can be used for both converting electricity into mechanical force and for converting mechanical energy back into electric energy.

Taking for example the train acceleration, as train starts to gain velocity its motors start acting as electric generators, generating counter-current that negates the externally applied voltage. If one would simply connect an electric motor to the DC power, it would simply spin up to a certain finite (and fixed) RPM value – at that point the generated voltage would be equal to external voltage.

The Ohm law applies for electric motors as well. A motor has very low internal electric resistance. Applying a high voltage would quite literally burn the motor. This is why when DC motor is starting, it requires only a fraction of voltage. One of the easiest way to adjust voltage is to dissipate the excess energy using extra resistance.

As train accelerates, the resistance should be decreased to compensate for constantly decreasing voltage (which is caused by motors generating electric voltage in the opposite direction of externally applied voltage). A rheostat is simply a variable electric resistance. The 81-717 train we simulate in Subtransit uses a rheostat controller to switch contacts through preset positions, resulting in parts of rheostat being shorted out and total current adjusted as needed (the schematic is a simplified version just for illustration):
(black square indicates closed contact, empty square indicates contact is open)

Continue reading ‘How Does a Rheostat Work?’

Rheostat Arrays

I have completed some work on the undertrain equipment for the 81-717 train, specifically the rheostat arrays. They are an array of resistances which are connected together in a specific way – as the train accelerates or brakes, the extra electric power that cannot be utilized by train is dissipated on these resistors as waste heat.

The rheostat array in Subtransit is all wired up correctly on each type of train – every single resistor, wire and conducting link are in their correct places and correspond to the physically simulated model. Of course, I don’t think anybody would notice if it was wrong, but these are the kinds of details that I want to see in the game.


Continue reading ‘Rheostat Arrays’