It has new shaders, support for all* Mii data types as well as Switch Miis, and it is completely self-hosted. If your site uses Mii icons, you can now render them on your own server!
* Exceptions: DS (just Wii but endian-flipped to LE), Miis in 3DS/Wii U databases (also endian-flipped but to BE), any unofficial format, game-specific formats or any other one I'm not aware of.
See the GitHub linked above for more details.
Interested? Click to read more...
This website is running on the code linked above. I've tried to make the API compatible with Mii Studio.
This means that it should work as a drop-in replacement wherever you use the Mii Studio API. If it doesn't work as that for you, please contact me.
Feel free to use it however you seek fit, though, for the love of all that is holy, do NOT rely on the site being up!!!
Also, you may omit unnecessary parameters. The erri parameter is not needed at all.
Thanks to our dear AboodXD, the official Mii renderer on Wii U, FFL (Cafe Face Library) has been decompiled and ported to OpenGL 3.3.
FFL-Testing is the program he made to demo it: all it does is spin Mii heads in a window. My fork linked previously contains build instructions, as well as ports of the libraries involved to more systems.
The Wii U shader has been decompiled as FFLShader.vert/frag, and the uniforms needed to use it are in src/Shader.cpp. Feel free to use it for any other projects.
Likewise, the renderer-server-prototype branch contains the same for Switch and Miitomo shaders.
I feel like I had a lot more to say here but I uhhhh don't for now...
Do you want to help? If you want to give me advice or lend a hand with: frontend design/UX, help with OpenGL/C++, porting to WebGL, please get in touch!
Contact Me
This project/site is maintained by just me, Arian Kordi - yes, that one...
If you're going to contact me, don't ask me about the site that rhymes with "Clone Worst", alright?
For comments, questions, concerns, help with this or any other Mii topic, etc... PLEASE don't hesitate to contact me!
Discord: ".arian."
Email: ariankordi@ariankordi.net
I welcome any new people, I'm open to discuss anything even if it doesn't have to do with the project :)
Accuracy Status/Known Flaws
Current goals are to perfectly reproduce Wii U Mii Maker/NNID renders, Mii Studio/Miitomo renders, and Switch icon renders.
ā Not using correct body model for Switch and Miitomo
ā Body is not scaled uniformly using vertex groups/bone indices
This is why the body's hands and legs may look a little wonky and unnatural.
Need to use the body model MiiBodyMiddle.bfres from Wii U Mii Maker, which isn't exactly the most straightforward thing.
(October 2024) At this point I was able to export the model and animations to a more workable format, but... can't quite get the scaling to work right.
I clearly don't understand skeletal rigging enough to make this work at the moment so if you do, maybe I can use your help?
ā ļø Need to find whole body camera views for Wii U Mii Maker and Miitomo/Mii Studio
For Wii U they are hiding in JpgPoseCam.bfres, which I can't read at the moment.
For Mii Studio/Miitomo this is TBD but I assume it's hiding in the game files too.
I'm personally deferring this to when the above item is complete though...
Note: Camera rotation lighting is inaccurate, and both rotations have slightly different ways of combining.???
Our character rotation is pretty much as accurate in terms of lighting, but camera rotation isn't.
Legitimately not sure why that is. Camera rotation rotates the view matrix and character rotation moves the model matrix, so, don't know.
If you use multiple rotation axises, with our camera rotation it matches Mii Studio's character rotation, and combining axises with our character rotation matches Mii Studio's camera rotation...??????????? I can't wrap my head around all of this...
instanceCount, instanceRotationMode
Many ways to approach doing this efficiently. glDrawElementsInstanced?
Was also considering making a variant (as another instanceRotationMode?) for the same render but multiple expressions.
I did attempt this at some point but couldn't wrap my head around getting it right.. I'll probably try it again soon.
splitMode, splitDepthOffset(??)
Feel like splitDepthOffset doesn't do anything? It maaaay have done something on cdn-mii 1.0.0 though...??
I've tried to implement splitMode a handful of times using glDepthRange but did not do anything at all...
Either using the shader or clipping the projection matrix's far plane may work but, there has to be a better way to do this...
...Not a huge priority now. Is it for you? Please contact me and that'll put some pressure on me to add this once and for all.
I officially don't like the light direction parameters, I legitimately don't think anyone uses it right.
Both mii-js AND pf2m.com/tools/mii at some point used to initialize it to zero...
... while zero is not the default, so it just gives you a terrible result.
There's also lightDirectionMode, which cdn-mii 2.0.0/Mii Studio completely ignore. We don't know what its options do and, while setting it to "none" (the sites above were also doing this so eh where's the blame supposed to go) is SUPPOSED to not make the light directions apply, well, they do.
Was light direction even a thing on cdn-mii 1.0.0...??? I feel like pf2m.com/tools/mii specifically said it only worked on 2.0.0.
The light direction parameter on cdn-mii/Mii Studio is also clearly not the real light direction uniform being passed to the shader, it would have more intense effects.
If you find anything else I should implement from cdn-mii/Mii Studio (other than Miitomo clothing/headgear), ping me.
Planned & Unplanned: click to expand
āAt the moment I don't have the Switch and Miitomo body models..
āPoses from the Wii U Mii Maker are planned as soon as skeletal animations work.
Every pose is just a single-frame animation from MiiAnim.bfres, same source as everything else.
I'm pretty sure the camera positions are in JpgPoseCam.bfres, but Switch Toolbox cannot open it, so... not sure what I'm going to do about that.
āNeed to reverse the Tomodachi Life and Miitopia QR code formats. Miitomo codes are planned as soon as Kaerutomo properly implements them.
To be clear, this is not referring to being able to merely scan their codes, but rather make use of the extra game-specific data within.
... For example, applying the custom colors (hair color, etc.) within, displaying their voice or personality traits...
In the case of Miitomo, this means extracting the "nx_mii_core_data" Switch data that QR codes are supposed to give you, for the wider colors.
I actually did find the AES key and was able to make an encoder/decoder for the extra data within these codes for all of those games, check it out: https://jsfiddle.net/arian_/ckya346z/8/
For Tomodachi Life and Miitopia, all of the data is within the code and just needs to be reversed. For Miitomo, it's more complicated, and sadly existing codes won't work, because:
It looks like the only thing Miitomo stores in the QR code is some sort of ID ("token_for_json_data") - it expects the server to store the extra data with this ID and will use it to retrieve that data back from the server.
Problem is, Kaerutomo does not store or retrieve this data for you. At all. And since it's not open source, nobody can add it except for them, and they aren't interested. š
āNeed to match the texture filtering/mipmap options.
I feel that the clarity of the face texture doesn't match Wii U or Miitomo, I don't know.
Some face features are hard to make out at low resolutions like 96x96.
Will need to take a long hard look at this one day...
āReplicating 3DS and Wii renders has been considered but isn't easy or a priority.
This requires extracting the meshes (and textures? but those can be downscaled from the new ones) from CFL_Res.dat, but its header hasn't been reversed.
In a pinch RFL_Res.dat could work, but 3DS/Wii U hair styles, textures etc. wouldn't work, and while there's an RFL decomp, I can't find the source code for the one RFL_Res.dat editor everyone uses.
Now, I could try making an extractor for the RFL_Res.dat format using the RFL decomp for structures, and then see how far I can apply that to CFL_Res.dat.
... But if it doesn't work, well I'm not familiar with many games that have symbols for CFL (or even how to look at 3DS binaries in Ghidra), and frankly don't care enough to put a lot of time into it. Sorry, 3DS Mii render fans.
Second obstacle is shaders, neither of these consoles use GLSL-compatible shaders. This can probably be worked around (or remade since it's very basic) but is still annoying.
āMiitomo/Tomodachi Life clothing/headgear/wigs may be planned.
Don't expect any of these any time soon, especially clothing and wigs.
Do keep in mind that these body models are different from the Wii U/Switch models and therefore the clothing may not work on those.
āFully rendering Miis in the browser is a longterm goal of mine. I can't promise anything, but I am steadily working towards it.
I did get FFL-Testing building with Emscripten in August, and if I handle it just right, it is able to fully render a Mii head, albehit without hair and many WebGL errors...
So what else is left? For starters, the assets need a more efficient compression method instead of zlib. I'm thinking of using Draco for meshes, and then ASTC for textures. As of writing, neither are implemented yet.
An interface will need to be made to bridge the C exports of FFL to be callable from JS, and then make a shader callback implementation in JS using WebGL or three.js.
So I haven't gone that far with this, and have not yet connected FFL in WASM to JS. But...
As of October 2024, I have a little jsfiddle here that will read a Mii exported to glTF from my site, and render it with the Wii U shader! Isn't that nice?
Now, once this is properly implemented and working, I can't even begin to think about the possibilities. At the minimum, this site could go serverless, and services using Miis may not even need to render and store icons on their side. Woo.
As usual, if you want to help or put pressure on me to work on this with more haste, ping me.
āI've thought about making a Mii Maker-like app with the FFL decomp, but... don't get your hopes up too far about this.
However, if you like the sound of this...
... and you're either working on something like this right now and it just needs Mii heads, OR you'd want to design the UI for this and let me add the rendering logic, do get in touch!
(This is assuming, yaknow. it's not a Scratch or Roblox game or something)
Unplanned:
Custom hairstyles or frankly custom anything
Miitopia makeup, or custom expressions (sorry)
Miitomo expressions are the only exception, since they're built into AFL (its version of FFL). See?
BoTW/TOTK models, or "semi-Miis"
Xbox Miis, Apple Miis, Samsung Miis, any other stupid bootleg Miis