GMO Format | ||||||
---|---|---|---|---|---|---|
|
GMO (Generic Model Object) is a file format commonly used in PlayStation Portable games. It can contain model, animation and texture data. Files of this format have a .gmo extension, but in Persona 4 Golden they exists within AMD archives and are named MODEL_DATA.
Implementation in Atlus Games
General Information
All atlus gmo models are rotated 180 degrees on the z axis,
all of their models also follow (most of) of P4G rules.
Persona 4 Golden
P4G is infamous for it's very specific and hard to work with GMO support.
Below is a list of everything known that's wrong with P4G's GMO implementation (There may be some small differences in the vita version)
Only models using Sequential polygons will display in game |
Arrays can only use a maximum of 6 weights each, instead of 8 |
Due to weird BlendSubset implementation each Mesh with rigging needs to have it's own parts |
Every mesh with rigging needs the BlendSubset command even when it's not necessary. |
Arrays with only a singleweight cannot ommit it or they will get rigged to a random bone in game |
Vertex colors on non field models will get ignored on pc, and crash the game on vita |
FCurves using Cycle Interpolation will be broken in the vita version |
Parts parented to a bone affected by a NECK_BENDER (head bone) will get parented to a random other bone when NECK_BENDER is active |
Meshes with no materials will crash the game (some models in P3P don't have them on specific meshes) |
Models with no normals will be completly broken in game |
If textures of a model are in the GIM format their Red and Blue channels will be swapped |
Persona 3 Portable
P3P's implementation of the gmo format seems to be better in every way than P4G, it does not suffer from any issues that P4G's implementation has and supports more features like: mesh morphing and vertex colors on all models. The only real downsides of P3P's gmo implementation are: not supporting most of Custom Data types that Atlus uses due to most of them being made when making P4G, and being a PSP game with very low limitations for model complexity.
Custom Data
Per3Helper
The structure of a per3Helper is "Per3Helper"(string) id(int) Offset(Matrix3)
In both P3P and P4G, to mimic rmd's Node Links atlus used BlindData Commands starting with the "per3Helper" string.
Per3Helpers are always placed inside of bones and are mostly used to attach models and particles.
Id decides what should be attached to a bone for example id 500 is used to attach a weapon to a hand.
Offset is a Matrix3 of floats that offset the attachment from the bone it's on.
(If you convert a gmo to a gms the values of the offset will be assumed to be ints and will look broken however converting them back to gmo will not break anything)
TransAlgo
The structure of a TransAlgo is "transAlgo"(string) value(int)
TransAlgo is used to control the rendering order of a material.
UserProperty (P4G Only)
The structure of a UserProperty is "UserProperty"(string) "tag={id}"(string)
UserProperty is a way to give a gmo bone an rmd like id.
For example every head bone uses id 5001 so to make head rotation on a gmo model work each head bone has a BlindData "UserProperty" "tag=5001"
Due to a bug in GmoConv converting a gmo that has a UserProperty to gms will corrupt the data inside of it. However putting the fixed property into a gms and converting to gmo will work.
EdgeLight (P4G Only)
The structure of a EdgeLight is "EdgeLight"(string) value(int)
EdgeLight is used to control how persona lighting (and most likely EFFECT_EDGE) effects are applied to a material.
For example adding BlindData "EdgeLight" 0 to a material of a persona will disable the white glow that's applied to all persona models in the game.
ShadowMap (P4G Only)
The structure of a EdgeLight is "ShadowMap"(string) value(int)
ShadowMap is used on field materials whenever they contain a layer with a shadowtexture.
Tools
Noesis
Is a free tool for viewing and converting between hundreds of model, image, and animation formats. It utilizes a robust plugin system, with support for native extension modules and Python scripts.
Noesis is a helpful tool due to its simple GUI.
Noesis allows you to convert GMO files into many common model formats. It also includes a batch option. However due to not supporting BlendOffsets scale values some models from P4G and P3P are not opened properly.
GmoView
Is an offical gmo model viewer made by sony as part of the psp sdk. It's by far the most accurate way to view gmo models. However complicated models can very easily reduce the framerate.
GmoConv
Is an offical converter made by sony as part of the psp sdk. that allows converting from common formats to gmo and gms. However it does not include any option to convert it back from gmo to any other formats than gms.
Gmo Importer maxscript
Is a 3ds max maxscript made specificly for importing models from P4G and P3P. Unlike noesis it does support scale values of BlendOffsets but due to the general implementation, most custom models (and models from other games) will not get imported properly.