Page 1 of 1

[1.1.34] Jitter/moiré on moving vehicles

Posted: Sat Jun 12, 2021 5:37 pm
by Deadlock989
This got picked up when making a large vehicle for a mod, but I have been able to reproduce it in vanilla with both the car and (to a lesser extent) the tank.

When vehicles are being driven by the player, depending on their speed and the zoom level of the camera, the vehicle will periodically go through phases of oscillation/jitter. It is as if the camera is fixed on one point but the vehicle is being rendered at some approximate point less than a pixel away in any direction, producing different aliasing effects every frame. In vanilla it is most obvious on the car, because of the stripes on the front window grille (see video).



To reproduce, get into a fuelled car in a nice open space in a single player game. Zoom to 1:1 pixel ratio (/c game.player.zoom = 2). Without changing direction, experiment with different speeds, going up to maximum and letting it coast down to a stop. Try with different directions and zoom levels. You will observe that when the car hits specific multiples of speed, especially low speeds, different interference patterns appear on the vehicle. Presumably the reason it goes away at specific speeds is that those speeds are some cleaner multiple of pixels.

I don't think this happens for character movement although the character animation makes it much harder to tell. But I feel like the character sprite is dead on the camera location all the time, but it's not the case for vehicles

What I expected to happen: if the player is in a moving vehicle, the camera position should be absolutely locked to the vehicle sprite, not different fractions of a pixel off it per frame.

Re: [1.1.34] Jitter/moiré on moving vehicles

Posted: Wed Jun 16, 2021 3:21 pm
by kovarex
From what I remember, this is on purpose, the car is vibrating.