Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import individual materials file (MRL) #79

Open
Brachi opened this issue Mar 6, 2024 · 0 comments
Open

Import individual materials file (MRL) #79

Brachi opened this issue Mar 6, 2024 · 0 comments

Comments

@Brachi
Copy link
Owner

Brachi commented Mar 6, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Development

No branches or pull requests

1 participant