You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently materials files are loaded automatically using a very simple heuristic that searches for the file based on the path of the model file.
For example, pl00.mod will look for the file pl00.mrl in the same path as the model, and load it if it's found; pl00.mesh.<app-mesh-version> will look for pl00.mdf2.<app-mdf-version> or pl00_mat.mdf2.<app-mdf-version>.
The problem is that some games, notably RE6, don't follow this pattern exactly: the main characters' mrl files are empty. The "real" mrl files are scattered around different paths, with unpredictable names. This causes that by default most interesting models are imported without materials.
One option would be to hard-code those paths after careful research, but it doesn't scale well.
To solve this and allow for better modding, an mrl file can be made importable, with the optional requirement to select a model to apply it to. Materials will be applied only if the custom attributes in the mesh match the hash_id of the material.
If not matches are found, warning must be shown, but materials and textures should be created anyway.
The text was updated successfully, but these errors were encountered:
This is actually not necessary. The RE6 pattern is to have additional suffixes like _0, _1 for the "real" mrls.
A simple heuristic has been added to check for those if the mrl named after the mod file is actually empty.
Currently materials files are loaded automatically using a very simple heuristic that searches for the file based on the path of the model file.
For example,
pl00.mod
will look for the filepl00.mrl
in the same path as the model, and load it if it's found;pl00.mesh.<app-mesh-version>
will look forpl00.mdf2.<app-mdf-version>
orpl00_mat.mdf2.<app-mdf-version>
.The problem is that some games, notably RE6, don't follow this pattern exactly: the main characters' mrl files are empty. The "real" mrl files are scattered around different paths, with unpredictable names. This causes that by default most interesting models are imported without materials.
One option would be to hard-code those paths after careful research, but it doesn't scale well.
To solve this and allow for better modding, an mrl file can be made importable, with the optional requirement to select a model to apply it to. Materials will be applied only if the custom attributes in the mesh match the hash_id of the material.
If not matches are found, warning must be shown, but materials and textures should be created anyway.
The text was updated successfully, but these errors were encountered: