<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://mii.j0.lol/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=172.28.0.1</id>
	<title>Mii Technical Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://mii.j0.lol/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=172.28.0.1"/>
	<link rel="alternate" type="text/html" href="https://mii.j0.lol/wiki/Special:Contributions/172.28.0.1"/>
	<updated>2026-05-06T07:18:30Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>https://mii.j0.lol/index.php?title=Un.mii&amp;diff=306</id>
		<title>Un.mii</title>
		<link rel="alternate" type="text/html" href="https://mii.j0.lol/index.php?title=Un.mii&amp;diff=306"/>
		<updated>2025-08-31T17:00:19Z</updated>

		<summary type="html">&lt;p&gt;172.28.0.1: initial page: what is it, interesting facts, and why they made, why it is the way it is&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;un.mii&#039;&#039; is a Mii rendering and parsing library written in C# that was found to be used in [[Pikmin Bloom]]. Presumably, it&#039;s also used in [[Mario Kart Tour]], given that it&#039;s also using Unity and can render 3D Mii heads.&lt;br /&gt;
&lt;br /&gt;
Info about this library and its namespace hierarchy was found in Pikmin Bloom&#039;s &#039;&#039;global-metadata.dat&#039;&#039;, which stores metadata about .NET assemblies that were compiled using il2cpp, which is an obfuscation/optimization technique Unity uses when compiling .NET bytecode to native machine code.&lt;br /&gt;
&lt;br /&gt;
In order to read the &#039;&#039;global-metadata.dat&#039;&#039; file, a tool such as this can be used: https://twy.name/Tools/global-metadata/. The un.mii namespace is included in &amp;lt;code&amp;gt;Assembly-CSharp-firstpass.dll&amp;lt;/code&amp;gt;, although there are two others with one class each: &amp;lt;code&amp;gt;CoreDataConverter.dll&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;CharInfoConverter.dll&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The library itself highly resembles [[nn::mii]]. Class names/members, enums, method names, and method parameters are all shared with nn::mii.&lt;br /&gt;
&lt;br /&gt;
==== nn::mii resemblance ====&lt;br /&gt;
* There are &amp;quot;CharModel&amp;quot; and &amp;quot;CharModelImpl&amp;quot; classes, which follow the [[wikipedia:Opaque_pointer|&amp;quot;p_Impl&amp;quot; pattern]] that isn&#039;t typical in C#.&lt;br /&gt;
* There are class members that are prefixed with &amp;quot;m&amp;quot;, and argument names prefixed with &amp;quot;p&amp;quot; (pointer). Neither conventions are used in C#. (Look at &amp;quot;Mask&amp;quot;)&lt;br /&gt;
* Since C# is strictly object-oriented, all methods are now in classes. An example is the &amp;quot;Adjustment&amp;quot; class, taken from &amp;quot;mii_Adjustment.cpp&amp;quot;. Names like &amp;quot;un.mii.Adjustment.GetEyeRotateOffset()&amp;quot; would&#039;ve previously been &amp;quot;nn::mii::detail::GetEyeRotateOffset()&amp;quot;, as C++ does not force everything to be in classes.&lt;br /&gt;
* un.mii has many enums for every type, e.g.: EyeType, HairType, EyeScale, Ver3BirthPlatform, etc. These enums are also present in nn::mii, but there they&#039;re usually isolated to the &amp;quot;mii_ParamCommon.h&amp;quot; or &amp;quot;detail/mii_Ver3Common.h&amp;quot; headers, whereas here they all live in the un.mii namespace.&lt;br /&gt;
** The enums are usually just made up of &amp;quot;Min&amp;quot;, &amp;quot;Max&amp;quot;, &amp;quot;End&amp;quot;, sometimes &amp;quot;Empty&amp;quot;, and on occasion other values.&lt;br /&gt;
* The anonymous namespace of Assembly-CSharp-firstpass.dll contains types from un.mii that are also anonymous in nn::mii. For example: Three &amp;quot;DrawType&amp;quot; enums for faceline/mask/model, DrawTypeImpl also found in nn::mii::detail::CharModelImpl, then types seen in MaskImpl like ExpressionDrawParam, EyeComponent, EyePlaceParam, EyeTexturePair...&lt;br /&gt;
* Some classes are &amp;quot;accessors&amp;quot; for data used with Get/Set methods, which are copied from nn::mii (e.g.: Ver3StoreDataRaw, ParamCharInfoAccessor), which are kept the same despite C# having property getter/setters that can be used instead. However, the CharInfo class does use properties with getters/setters.&lt;br /&gt;
* There are also structs/enums from libnn_mii_core that had previously unknown fields. For example: Ver3StoreDataMember/Type, Ver3StoreDataTableElement, CommonColorElement, real names for Mask constants, VerifyReason, Ver3BirthPlatform max being 7, RandomMii tables... This makes it a good resource to reverse nn::mii.&lt;br /&gt;
Given all of this information, &#039;&#039;un.mii&#039;&#039; seems to be a direct source port of [[nn::mii]] in C# for use with Unity. There are many signs that the C++ code was directly ported without following C#/.NET conventions. There are also, of course, signs that it&#039;s only meant to be used with Unity.&lt;br /&gt;
&lt;br /&gt;
==== Unique traits of the library ====&lt;br /&gt;
&lt;br /&gt;
* un.mii does not read any existing [[Mii Resources|Mii resource file formats]], instead opting to store and retrieve shape and texture data from the data.unity3d file, where you can indeed find shapes and textures for Miis in Pikmin Bloom&#039;s data.unity3d. The assets are also in the &amp;quot;un.mii&amp;quot; namespace.&lt;br /&gt;
** Shapes are categorized as &amp;quot;middle&amp;quot; and &amp;quot;high&amp;quot;, as well as having &amp;quot;low&amp;quot; and &amp;quot;middle&amp;quot; textures, once again suggesting the NintendoSDK/nn::mii lineage. The files are named with their internal part names (for example, &amp;quot;FaceT_line06&amp;quot;) and may match up with internal tooling Nintendo uses to pack/unpack Mii resources.&lt;br /&gt;
** Textures are stored in ASTC6x6, and stretched to the proper shape (e.g. eyes are stored in square shape)&lt;br /&gt;
* There are &amp;quot;TextureRendererBehaviour&amp;quot; and &amp;quot;FacelineTextureRendererBehaviour&amp;quot; types, suggesting Mono behaviours. There&#039;s also Renderer classes for both, containing a &amp;quot;CreateGameObject&amp;quot; method that clearly refers to the Unity GameObject type. Likewise, CharModel and CharModelImpl have references to the RenderQueue type.&lt;br /&gt;
* The &amp;quot;Database&amp;quot; class from nn::mii is kept, albehit just has three methods: GetDefault, GetRandom, and GetRandomVer3StoreData. So it has nothing to do with the [[Mii Database]], but functions are categorized there just like nn::mii did.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Overall, it&#039;s just a port of the nn::mii codebase to C# with a few tweaks made for Unity. It&#039;s interesting given that nn::mii can be considered a port of FFL, with many pieces of code copy-pasted from it.&lt;br /&gt;
&lt;br /&gt;
Ironically, given that Unity compiles .NET code to C++ anyway, it may have made more sense to just use nn::mii as-is using [https://learn.microsoft.com/en-us/dotnet/standard/native-interop/pinvoke P/Invoke]&amp;lt;sup&amp;gt;, like [https://github.com/ariankordi/FFLSharp FFLSharp].&amp;lt;/sup&amp;gt; However, the reasons they couldn&#039;t include that all versions of the [[Face Libraries|Face Library]] heavily depend on the system/SDK&#039;s graphics API (GX, GX2, nn::gfx) and rely on their respective resource binary format. Interop with C libraries is also inconvenient and avoided in most languages, so combined with the inflexibility mentioned, is why they made the choice they did.&lt;br /&gt;
&lt;br /&gt;
Notably for Miitomo they did go the route of modifying [[Cafe Face Library|FFL]] to remove GX2 calls and made [[Arch Face Library|AFL]], but it accumulated tech debt over time by trying to merge it with libnn_mii_core. It&#039;s less likely they would&#039;ve done this for [[nn::mii]], given that the way it manually manages graphics buffers and pipelines makes it even more dependent on nn::gfx than FFL is on GX2.&lt;br /&gt;
&lt;br /&gt;
== Uses ==&lt;br /&gt;
* Pikmin Bloom&lt;br /&gt;
** While the global-metadata.dat is visible, it&#039;s not clear where all il2cpp types and methods go to.&lt;br /&gt;
** The [https://github.com/djkaty/Il2CppInspector/ Il2CppInspector tool] is unable to open its libil2cpp.so.&lt;br /&gt;
* Mario Kart Tour(?)&lt;br /&gt;
** Its global-metadata.dat is hidden, and libil2cpp.so is reportedly encrypted: https://gameguardian.net/forum/topic/26082-mario-kart-tour/page/38/#comment-110128&lt;br /&gt;
** Mii assets also can&#039;t be found in its data.unity3d file.&lt;br /&gt;
{{FL-Navbox}}&lt;br /&gt;
[[Category:Face libraries]]&lt;/div&gt;</summary>
		<author><name>172.28.0.1</name></author>
	</entry>
	<entry>
		<id>https://mii.j0.lol/index.php?title=Miitopia&amp;diff=55</id>
		<title>Miitopia</title>
		<link rel="alternate" type="text/html" href="https://mii.j0.lol/index.php?title=Miitopia&amp;diff=55"/>
		<updated>2025-08-05T00:27:23Z</updated>

		<summary type="html">&lt;p&gt;172.28.0.1: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Stub}}&lt;br /&gt;
&lt;br /&gt;
Miitopia is a game released for the [[3DS]], and remade for the [[Switch]].&lt;br /&gt;
&lt;br /&gt;
== On Nintendo Switch ==&lt;br /&gt;
its all weird&lt;br /&gt;
[[Category:Mii editing software]]&lt;/div&gt;</summary>
		<author><name>172.28.0.1</name></author>
	</entry>
	<entry>
		<id>https://mii.j0.lol/index.php?title=Mii_Studio_(nintendo.com)&amp;diff=54</id>
		<title>Mii Studio (nintendo.com)</title>
		<link rel="alternate" type="text/html" href="https://mii.j0.lol/index.php?title=Mii_Studio_(nintendo.com)&amp;diff=54"/>
		<updated>2025-08-04T22:53:25Z</updated>

		<summary type="html">&lt;p&gt;172.28.0.1: /* Rendering */ correction&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Mii Studio Screenshot.png|alt=Editing a Mii in Mii Studio|Editing a [[Mii]] in Mii Studio|thumb|358x358px]]&lt;br /&gt;
Accessed at https://studio.mii.nintendo.com, Mii Studio is a web app for any Nintendo account user to edit their associated Miis.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
Through &amp;quot;reverse engineering&amp;quot; (lol) we have found out this information about Mii Studio:&lt;br /&gt;
&lt;br /&gt;
=== Storage Format ===&lt;br /&gt;
[[Mii]]&amp;lt;nowiki/&amp;gt;s are stored in Mii Studio using the browser&#039;s local storage. They are encoded in base64.&lt;br /&gt;
&lt;br /&gt;
Here is a [[Kaitai Struct]] definition:&amp;lt;syntaxhighlight line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
foo&lt;br /&gt;
bar&lt;br /&gt;
bar&lt;br /&gt;
foo&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Rendering ===&lt;br /&gt;
Mii Studio appears to render Mii data through layering. It uses the [https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API Canvas API] to make a series of texture drawings calls with transformations.&lt;br /&gt;
[[File:Mii Studio WebGL Debugging.png|alt=A screenshot of Safari&#039;s developer tools, showing the steps taken in drawing a Mii head.|left|thumb|432x432px|Debugging Mii Studio&#039;s canvas rendering with Safari]]&lt;br /&gt;
[[Category:Mii editing software]]&lt;/div&gt;</summary>
		<author><name>172.28.0.1</name></author>
	</entry>
	<entry>
		<id>https://mii.j0.lol/index.php?title=File:Mii_Studio_Canvas_Debugging.png&amp;diff=53</id>
		<title>File:Mii Studio Canvas Debugging.png</title>
		<link rel="alternate" type="text/html" href="https://mii.j0.lol/index.php?title=File:Mii_Studio_Canvas_Debugging.png&amp;diff=53"/>
		<updated>2025-08-04T22:50:56Z</updated>

		<summary type="html">&lt;p&gt;172.28.0.1: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Debugging Mii Studio&#039;s canvas rendering with Safari&lt;/div&gt;</summary>
		<author><name>172.28.0.1</name></author>
	</entry>
</feed>