xivdev / Penumbra

FINAL FANTASY XIV modding, but actually good this time
581 stars 114 forks source link

.mdl io: Import and export names of materials and attributes. #381

Closed ackwell closed 5 months ago

ackwell commented 5 months ago

Title. As specified, this is just the names - it isn't material composition (yet).

Material names are imported and exported using the names of the material nodes in the gltf format. No processing is done on these - they're kept exactly as the strings used by the game. This is primarily due to the mixed usage of material names in-game - for now, I'd like to keep the strings as a "black box" so to speak, to avoid dealing with all the different model type's material name semantics.

Attributes are imported and exported exported as "extras" - space reserved by the specification for arbitrary additional data. In particular, this is pretty handy for blender, as blender will import (and can be configured to export) these from it's "custom properties", which gives us a nice UX point for editing these values in 3d workspace tools.