Expand description
§xc3_model
xc3_model provides high level data access for the files that make up a model.
Each type represents fully compressed and decoded data associated with one or more xc3_lib types. This simplifies the processing that needs to be done to access model data and abstracts away most of the game specific complexities.
§Getting Started
Loading a normal model returns a single ModelRoot. Loading a map returns multiple ModelRoot. Each ModelRoot has its own set of images.
The ShaderDatabase is optional and improves the accuracy of texture and material assignments.
use xc3_model::shader_database::ShaderDatabase;
let database = ShaderDatabase::from_file("xc3.json")?;
let root = xc3_model::load_model("ch01011013.wimdo", Some(&database))?;
println!("{}", root.image_textures.len());
let roots = xc3_model::load_map("ma59a.wismhd", Some(&database))?;
println!("{}", roots[0].image_textures.len());Modules§
- Utilities for working with animation data.
- Utilities for loading textures from the
monolib/shaderfolder. - Database for compiled shader metadata for more accurate rendering.
- Utilities for working with vertex skinning.
- Utilities for working with vertex buffer data.
Structs§
- A single node in the skeleton heirarchy.
- See LodData.
- See LodGroup.
- See LodItem.
- See Material and FoliageMaterial.
- Values assigned to known shader uniforms or
Noneif not present. - See Mesh.
- Flags to determine how to draw a Mesh.
- See Model.
- See Models.
- Assignment information for the channels of each output. This includes channels from textures, material parameters, or shader constants.
- See SamplerFlags.
- Flags controlling pipeline state for rasterizer and fragment state.
- Selects an ImageTexture and Sampler.
- Information for alpha testing based on sampled texture values.
Enums§
- How edges should be handled in texture addressing.
- Texel mixing mode when sampling between texels.
- nvn image format types used by Xenoblade 1 DE, Xenoblade 2, and Xenoblade 3.
- The render pass for this draw call.
- Hints on how the texture is used. Actual usage is determined by the shader.
Traits§
- A trait for mapping unique items to an index.
Functions§
- Load all animations from a
.anm,.mot, or.motstm_datafile. - Load a map from a
.wismhdfile. The corresponding.wismdashould be in the same directory. - Load a model from a
.wimdoor.pcmdofile. The corresponding.wismtor.pcsmtand.chror.arcshould be in the same directory. - Load a model from a
.camdofile. The corresponding.casmtshould be in the same directory.