Talk:Body
Add topicBody icon implementations in FFL and nn::mii
[edit source]"The Mii body is usually not provided by the Face Library"
WEEELLLL AAAACKTUALLYYYYYYYYYYYY 🤓🤓🤓🤓🤓
Yes, for the most part this is true. But, FFL and nn::mii both contain icon implementations that draw the Mii body. Granted, these are not for general usage and drawing of the body model, but need to be put somewhere. Perhaps in the dedicated FFL/nn::mii pages, like in my schematic note thing.
FFL
For FFL's icon body implementation, I've only seen it in the following places: Mario Kart 8, amiibo Settings, Splatoon, Super Mario Maker, Nintendo Web Framework
None of those have debug symbols (UUUUUGHHHHHHHFUCKYOUUUUUUUUUUUUU), but there's a build of MK8 for kiosks with a symbol map. So, here are its symbols:
lib_gsys.a - private library shared between Nintendo games
static gsys::FFLResource::calcTextureBufferSizeIconWithBody_(FFLIconSetting const &)
static gsys::FFLResource::setupDefaultShaderForIconWithBody_(void *)
gsys::FFLResource::sIconWithBodyDesc
gsys::FFLResource::sIconWithBodyInitBuffer
lib_ffl.a(FFLIconWithBody.o) - public C exports
FFLIconWithBodyGetInitBufferSize
FFLIconWithBodyInit
FFLIconWithBodyMake
FFLIconWithBodyGetMatrix
FFLIconWithBodyGetLightDir
lib_ffl.a(FFLiIconWithBody.o)
FFLiIconWithBody::FFLiIconWithBody(FFLiResourceHeader const &)
FFLiIconWithBody::~FFLiIconWithBody(void)
static FFLiIconWithBody::Create(FFLIconWithBody *, FFLIconWithBodyDesc const &, FFLIconWithBodyInitBuffer &)
static FFLiIconWithBody::Destroy(FFLIconWithBody *)
static FFLiIconWithBody::GetBufferSize(FFLIconWithBodyDesc const &)
static FFLiIconWithBody::GetFaceMatrix(_Mat44 &, _Mat34 &)
static FFLiIconWithBody::ValidDesc(FFLIconWithBodyDesc const *)
static FFLiIconWithBody::ValidRecipe(_GX2Texture *, FFLIconWithBodyRecipe const *)
(Note that I have also seen the wording "recipe" when it comes to rendering icons in Mii Maker.)
FFLiIconWithBody::Make(_GX2Texture &, FFLIconWithBodyRecipe &)
FFLiIconWithBody::SetupDrawParam(FFLiBufferAllocator &, void const *)
FFLiIconWithBody::SetupUniform(void)
FFLiIconWithBody::SetupCPU(FFLiBufferAllocator &, FFLIconWithBodyDesc const &)
FFLiIconWithBody::SetupDrawParamGPU(void)
FFLiIconWithBody::SetupGPU(void)
FFLiIconWithBody::FACE_LIGHT_DIR
(Below are in an anonymous namespace.)
__N_20_FFLiIconWithBody_cpp_2cdd2193::ValidHeader(FFLiResourceHeader const *)
__N_20_FFLiIconWithBody_cpp_2cdd2193::GetDrawParamBufferSize(FFLIconWithBodyDesc const &)
__N_20_FFLiIconWithBody_cpp_2cdd2193::SetDefault(FFLiIconWithBody::DrawParam &)
__N_20_FFLiIconWithBody_cpp_2cdd2193::TypeToStride(FFLiResourceShapeElementType)
__N_20_FFLiIconWithBody_cpp_2cdd2193::AllocateAndCopy(FFLAttributeBufferParam &, void const *, FFLiShapePartsType, FFLiResourceShapeElementType, FFLiBufferAllocator &)
__N_20_FFLiIconWithBody_cpp_2cdd2193::AllocateAndCopy(FFLPrimitiveParam &, void const *, FFLiShapePartsType, FFLiResourceShapeElementType, FFLiBufferAllocator &)
__N_20_FFLiIconWithBody_cpp_2cdd2193::LookAt(_Mat44 &, Vec const &, Vec const &, Vec const &)
__N_20_FFLiIconWithBody_cpp_2cdd2193::ToColorBuffer(_GX2Texture const &)
__N_20_FFLiIconWithBody_cpp_2cdd2193::GetGender(FFLCharModel const &)
__N_20_FFLiIconWithBody_cpp_2cdd2193::GetFavoriteColor(FFLCharModel const &)
__sti___20_FFLiIconWithBody_cpp_2cdd2193
Notable things about FFLIconWithBody
- The body models do not have any scaling and are always at a constant size. It's not the base 1.0 scale (82 build/82 height), but some other weird taller height - it's pre-scaled.
- The shader for the Mii body looks the same, and is using a "FFLBodyShader.gsh", despite how you can replicate the look of the body 1:1 with the default shader meant for the face. Presumably, this is because the body model was originally a bfres, which you need to extract the shader into. They looked at the bfres, and extracted its shader (that already got extracted from the face shader) back to another gsh.
- The shader for the face is also same but uniforms are different. This leads to a "brighter" look. Namely, there is less ambient, and more diffuse and specular. See: https://discord.com/channels/360173962862395392/485919503369371648/1314101463953182770 (archive before discord burns). Those ambient/diffuse/specular parameters do NOT apply to the body (mii-unsecure and mii.nxw.pw both miss this detail)
- The icon has a different camera compared to FFLMakeIcon (same as RFLMakeIcon, shared with nn::mii face only icon impl). It's somewhat similar to the Mii Maker one, but not exactly the same - that one does some... special calculations.
- The body model comes from FFLBodyRes.dat, which seemingly has to be provided by the caller (NWF is using some webkit support?? functions for this). This resource file has the same header format as FFLResMiddle/High/etc, and thus can be extracted by FFLResource.py. When you do, you'll find it has no textures, and the only shapes are Nose_3.glb and Nose_4.glb, which are your body models.
- The body models have UVs to support clothing (oh god we need a separate page on FCL), which are also in MiiBodySpecial.bfres, but not in MiiBodyMiddle.bfres.
- I don't actually know how much flexibility this has, I didn't decompile the whole thing. (so do the MK8 Wii U Mii icons actually use this? idk)
nn::mii (NintendoSDK)
It has an "IconBody" class, which is mostly ported directly from FFLIconWithBody. The camera is the same, the models are the same, it's just using the Switch shader. They also created their own resource format for this. I don't think anything is actually using this.
The more interesting one is "VariableIconBody". It has proper hierarchical body scaling backed by bone indices and matrices, and a slightly different more zoomed camera view.
The camera view is specifically made to hide the pants, because it doesn't render them. Despite this, the (again custom) resource file has pants models for both genders.
There definitely needs to be a separate article just on how body scaling works, because it's pretty obtuse to understand. However, because of this, the VariableIconBody is used in the MiiEdit and amiibo Settings applets. Arian (talk) 02:55, 10 August 2025 (UTC)