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

Update RE5 mesh and material custom attributes #115

Merged
merged 17 commits into from
Aug 23, 2024
Merged

Update RE5 mesh and material custom attributes #115

merged 17 commits into from
Aug 23, 2024

Conversation

HenryOfCarim
Copy link
Contributor

No description provided.

@HenryOfCarim HenryOfCarim changed the title Update RE5 mesh and material custorm attributes Update RE5 mesh and material custom attributes Jul 20, 2024
Reserved values shouldn't matter at all but tests require them to be the same
- ValueError wasn't correct
- Remove test for group reserved value
disp flag made geometry invisible
Now it uses vtype in materials_data
- remove unused vertex color import logic
- expose 2 mesh flags, they probably do nothing but require investigation
- revert serialization for Groups' reversed param
albam/engines/mtfw/material.py Outdated Show resolved Hide resolved
albam/engines/mtfw/material.py Show resolved Hide resolved
albam/engines/mtfw/mesh.py Outdated Show resolved Hide resolved
albam/engines/mtfw/mesh.py Show resolved Hide resolved
3: "maskmap",
4: "lightmap",
5: "shadowmap",
6: "additionalmap",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is additional map? Is it original?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The additional map is _AM, a black and white mask used in some stages for transparency

@@ -57,6 +57,19 @@ class TextureType(Enum): # TODO: TextureTypeSlot
SPECULAR_BLEND = 22


SYMBOL_TEX_TYPES = {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of creating yet another mapping, wouldn't it better to add these to TextureType?
It shouldn't break any non-re5 code since we don't use the number directly, just the name.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed the logic in the last commit to use TEX_TYPE_MAP_2 dictionary, not sure is it the best idea

- {id: vdeclbase, type: u1}
- {id: vdecl, type: u1}
- {id: vertex_position, type: u2} # min_index
- {id: num_weight_bounds, type: u1} # probably num of OABB boundng volumes
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: I think this was confirmed long ago, just with a bad name (there was a TODO to rename it), so the comment can be removed

@HenryOfCarim HenryOfCarim marked this pull request as ready for review August 20, 2024 13:06
Copy link
Owner

@Brachi Brachi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just removing the dead code and checking the tex_types mapping and should be ready to merge. Let me know if you want me to do those changes myself

Copy link
Owner

@Brachi Brachi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job Henry!

@Brachi Brachi merged commit 2a0c48f into main Aug 23, 2024
3 checks passed
@HenryOfCarim HenryOfCarim deleted the re5-params branch September 20, 2024 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants