Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Minecraft:Procedural animated texture generation/Gears: Difference between revisions

From SAS Gaming Wiki
SyncBot (talk | contribs)
Sync: new page from Minecraft
 
SyncBot (talk | contribs)
Sync: updated from Minecraft
 
Line 10: Line 10:
</gallery>
</gallery>


The animation, updated every game tick, is rendered as a 16×16 texture like most other blocks. The resulting gear has 18.75 RPM.
The animation is rendered as a 16×16 texture like most other blocks, with {{code|gear.png}} being downsampled. The gear rotates exactly 1/64 of a full rotation (5.625 degrees) every game tick - this means that although there would theoretically be many possible frames created by intermediate rotations, only 64 unique frames can ever appear in practice. The resulting gear takes 3.2 seconds to make a full rotation and has 18.75 RPM.


There are two different animations used for gears - one for clockwise rotation, and another for anticlockwise rotation, to allow for logical meshing. These are generated effectively identically, with the only difference being the direction of rotation; both start on the same frame, but cycle through them in the opposite direction.<ref name="geargen">{{Citation|url=https://github.com/NeRdTheNed/MC-TextureGen/releases/tag/v1.2.0|title=MC Texture Generator v1.2.0 - Gear support!|author=[https://github.com/NeRdTheNed NeRdTheNed]|website=GitHub|date=August 2, 2021}}</ref>
There are two different animations used for gears - one for clockwise rotation, and another for counterclockwise rotation, to allow for logical meshing. These are generated effectively identically, with the only difference being the direction of rotation; both start on the same frame, but cycle through them in the opposite direction.<ref name="geargen">{{Citation|url=https://github.com/NeRdTheNed/MC-TextureGen/releases/tag/v1.2.0|title=MC Texture Generator v1.2.0 - Gear support!|author=[https://github.com/NeRdTheNed NeRdTheNed]|website=GitHub|date=August 2, 2021}}</ref>
<gallery style="text-align:center" class="pixel-image">
<gallery style="text-align:center" class="pixel-image">
File:Gear 0 (texture) JE1-a1.gif|Clockwise rotation
File:Gear 0 (texture) JE1-a1.gif|Clockwise rotation

Latest revision as of 11:11, 29 May 2026

Template:Outdated

Code which generates the frames of the gear texture can be found here.

The animation for gears was generated using two predefined image files - Template:Code for the rotating gear and Template:Code for the stationary center.

The animation is rendered as a 16×16 texture like most other blocks, with Template:Code being downsampled. The gear rotates exactly 1/64 of a full rotation (5.625 degrees) every game tick - this means that although there would theoretically be many possible frames created by intermediate rotations, only 64 unique frames can ever appear in practice. The resulting gear takes 3.2 seconds to make a full rotation and has 18.75 RPM.

There are two different animations used for gears - one for clockwise rotation, and another for counterclockwise rotation, to allow for logical meshing. These are generated effectively identically, with the only difference being the direction of rotation; both start on the same frame, but cycle through them in the opposite direction.<ref name="geargen">Template:Citation</ref>