Changes

add more details about face library, add switch and Miitomo library names, add extra facts
Line 1: Line 1: −
'''Face Library''' is probably the name of the library used for Nintendo games to be able to use Miis. The Wii's library is named RFL, which would stand for "Revolution Face Library".
+
'''Face Library''' is the name of various libraries used for Nintendo titles that render and manage Miis. There are many versions of the Face Library for every Nintendo console that supports Miis, starting from the Wii onwards.
   −
There are libraries made for Wii (RFL), DS (NFL, only used by Tomodachi Life and Personal Trainer: Walking), 3DS (CFL), Wii U (FFL), mobile devices (Android and iOS) and the Switch. The Switch doesn't have proper Face Library, but some people might call it NXFL.
+
The version for the Wii is called RFL, also referred to as RVLFaceLib (presumably Revolution Face Library), NFL on the DS (only used by Tomodachi Life and Personal Trainer: Walking), CFL on the 3DS, FFL on the Wii U, and "AFL" (Apple? Android? App? Face Library) has been seen in Miitomo.
   −
Nintendo put some restrictions to what the Face Library can be used for.
+
AFL appears to share most of its symbols with FFL, and in Miitomo, the MiiDefaultShader.fsh/vsh files even contain references to FFL, suggesting that it is a fork of FFL with added support for OpenGL ES 2.0.
 +
 
 +
On the Switch, the library isn't referred to by a specific name, and is called "nn::mii" in symbols. (Notably, Smash 3DS contains a symbol referencing "nnmiiStoreData".)
 +
 
 +
Switch Miis have more options for "common colors" used on hair, eyes, eyebrows, beards, and glasses, new faceline colors, and a few new glass types that are the same as previous ones but just opaque. When Miitomo was updated to 2.3.0, Nintendo pulled in some nn::mii functions into the game in order to support all of the Switch's unique traits.
 +
 
 +
It's presumed that the Mii Studio site and rendering API uses AFL, for a few reasons: It supports Miitomo/Switch colors, uses the Miitomo shader/material/lighting, the geometry seems to match that of AFLResHigh.dat (compared to previous APIs whose geometry matches FFLResMiddle.dat), and finally, Mii Studio and cdn-mii Miis have been known to have supported Miitomo clothing and gear at a certain point.
 +
 
 +
As well as rendering Mii heads, the Face Library also manages accessing the Mii database on all consoles, reading the database files directly except for on the Switch where they added a service to manage access to it. CFL and FFL contain functions referencing networking, such as: `CFL_InitNetInformation` and `FFLInitNetInformation`, as well as for converting NetInfo to StoreData. It's unknown exactly what these are for, although they are referenced in the Wii U Mii Maker.
 +
 
 +
Most Face Libraries require resource files, including textures and meshes, in order to work, which are included in NAND on the Wii U and higher. The names of these files include: RFL_Res.dat (Wii), NFL_Res.dat (DS), CFL_Res.dat (3DS), FFLResMiddle.dat, FFLResHigh.dat (Wii U), AFLResHigh.dat, AFLResHigh_2_3.dat (Miitomo), NXTextureMidSRGB.dat, NXTextureLowSRGB.dat, ShapeMid.dat, ShapeHigh.dat (Switch)
 +
 
 +
The Face Library and its headers have only been available to developers after request, until the Switch where it's included in the NintendoSDK. However, as of 2024, Bandai Namco is the only third party company Nintendo has allowed to use Miis on the Switch. Even after obtaining access to the Face Library, Nintendo applies restrictions to the use of Miis in games.
 +
 
 +
 
 +
There are two decompilation efforts for the Face Library: [https://github.com/SMGCommunity/Petari/tree/master/libs/RVLFaceLib RVLFaceLib], [https://github.com/aboood40091/ffl FFL]
1

edit