-
Notifications
You must be signed in to change notification settings - Fork 73
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
OOT Link Import/Export + Flipbook Import/Export + Animation Updates/Fixes #126
Conversation
Note this only works under specific conditions right now (texture array name must be present in the gSPSegment() call)
Notable exceptions: z_en_wf (branch between two different segment loads), z_obj_switch (2d texture array)
…for flipbook textures.
Note that there is current import lag (probably due to regex processing) after implementing asset including for files.
…g link_animetion.c for regex searches. Fixed some asset includes.
…ying to flipbooks, which will be incorrect for importing fast64 exports.
One import/export cycle works fine, next results in compiler errors
…with skeletons using LOD.
…efactored flipbook CI exporting code.
There's a possibility that two CI flipbooks write to the same flipbook name. Before this fix the later one would override the older one (ex. LOD), which would cause the first flipbook to use the LOD version textures with its own palette, causing issues.
Note that this fix also takes into account that dynamic material properties should be preserved between limbs (Link).
I've fixed the current merge conflicts with the new commits. |
fast64_internal/f3d/f3d_material.py
Outdated
self.set_k0_5, | ||
self.set_combiner, | ||
self.set_k0_5, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not an issue but set_k0_5
is there twice
however set_lights
is missing, intentionally?
and use_global_fog
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a commit to fix the other things, but use_global_fog
is a weird property in that it's sm64 specific and not technically part of the material itself.
key = self.getMaterialKey(self.materialContext) | ||
if key in self.materialDict: | ||
material = self.materialDict[key] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so this is where material deduplication happens?
self.materialDict[self.getMaterialKey(self.materialContext)]
is not always self.materialContext
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
materialContext
is just a regular blender material. Whenever a new material needs to be made, a copy is created and stored in a list. If a matching is key is detected, then the existing material in that list is used instead of creating a new copy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving on the basis that this functionally works.
Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
Unexpectedly delaying this a bit to slightly improve a |
@Dragorn421 my understanding is the |
Yeah we can do it later, for now I'll just add a warning message. |
I can confirm that the issue I was having was due to an older skeleton. The skeleton itself was updated successfully so I guess only a small warning is needed and it's good to go. |
This PR allows for the importing of missing face/mouth textures, which were cases of textures animated through code. Provided an overlay, Fast64 will try to find texture arrays used for flipbook animation and read them into the material. The material will allow you to preview any texture in the flipbook. This will also export correctly, and try to override texture arrays in the provided overlay. Flipbook textures using color index will automatically use a shared palette.
Additionally, OOT skeleton and DL imports will now automatically search in assets/objects/... files that have been included in the object/actor file. Ideally the user should now be able to import skeleton -> modify -> export -> compile without having to hand edit code.