from Hacker News

Show HN: Interactive 3D model skinner for the legacy PC game Tribes 2

by exogen on 4/29/24, 8:58 PM with 0 comments

This is a fun project I just recently published the source code for.

Tribes 2 is a "FPSZ" game from 2001 that a handful of die-hards still play every day. It's from the era of PC games that were extremely customizable and moddable, one huge facet of that being player-made custom skins.

I found making these to be too challenging for your average player, mostly due to lack of a live preview and a primitive pre-PBR method of encoding metallic/roughness data into the texture (using the alpha channel such that most skins just appear transparent in a normal image editor).

I managed to combine the <model-viewer> component developed by Google with a custom canvas editor built upon fabric.js. PNGs are parsed and generated in the browser to convert between Tribes 2's expected skin format, multiple canvas elements (for color and metallic data), and the modern PBR texture encoding expected by <model-viewer>.

Simply drag and drop images onto the canvas (or use the + button) to build a skin. You can see some skins I created this way by selecting "darrellw" or "HeXy" (light male), or "McDonalds" (light, medium, heavy male).

Last time I saw Tribes mentioned on HN, people remembered it fondly. I assure you, we're still playing! :)