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

Custom Skeleton Fixes for various bosses and enemies #3436

Merged
merged 3 commits into from
Aug 5, 2024

Conversation

NEstelami
Copy link
Contributor

@NEstelami NEstelami commented Nov 23, 2023

Fixes "vertex explosions" that occur with custom models for various enemies and bosses.

Build Artifacts

@NEstelami NEstelami added the do not merge Not ready or not valid changes label Nov 23, 2023
@NEstelami NEstelami changed the base branch from develop to develop-macready November 26, 2023 17:50
@garrettjoecox
Copy link
Contributor

@PurpleHato / @NEstelami Do we have any plans to continue this, or should we close and re-open at a later date?

@NEstelami
Copy link
Contributor Author

NEstelami commented Feb 2, 2024

To be honest I completely forgot about this. There was one minor graphical issue (unrelated to the changes in this PR) but I think it's fine to move forward with this PR.

@NEstelami NEstelami changed the title (WIP DO NOT MERGE) Custom Skeleton Fixes for various bosses and enemies Custom Skeleton Fixes for various bosses and enemies Feb 2, 2024
@NEstelami NEstelami removed the do not merge Not ready or not valid changes label Feb 2, 2024
@Djipi71
Copy link

Djipi71 commented Feb 8, 2024

OK so!
I have test all ennemies and only Stalfos have a Vertex explosion when he die. After fixing this little issues maybe it's time to merged :)
For BOSS , for now i don't see any problem vertex ( still make 4 Boss to test but i think i will be ok :) )

Copy link
Contributor

@briaguya-ai briaguya-ai left a comment

Choose a reason for hiding this comment

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

@NEstelami says it's good let's :shipit:

Copy link
Contributor

@Archez Archez left a comment

Choose a reason for hiding this comment

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

Left a question about an early return that I think can be removed, otherwise there is some white spacing that could be cleaned up but ultimately not a blocker.

Also this PR seems to be bringing in some unrelated commits from develop. Could you please rebase those changes out?

@briaguya-ai briaguya-ai self-requested a review April 7, 2024 21:10
@Archez Archez force-pushed the skelanime_fixes2 branch from c5d1711 to 8f1ed6d Compare May 1, 2024 21:41
@Archez Archez force-pushed the skelanime_fixes2 branch from 8f1ed6d to 68f267c Compare May 1, 2024 21:48
@Archez Archez force-pushed the skelanime_fixes2 branch from e16b69e to 1e594df Compare July 25, 2024 03:14
@Archez
Copy link
Contributor

Archez commented Jul 26, 2024

After investigation around the "body break" system that some enemies use when dying, I've come to the conclusion that it will not be possible to support flexible meshes for limbs that use this system. As such I have reverted the existing changes around it in this PR.

For background: The main skeleton types are Standard and Flex. This PR's goal is to allow enemies that are originally Standard to be able to draw using the Flex system instead. A Flex skeleton allows meshes on limbs to stretch/attach to other limbs by reusing matrix information from previous limbs. This works fine when rendering the whole skeleton together.

The problem around the "body break" system is that some/all limb DLs are assigned to individual "part" actors. These actors render the DL in isolation while being able to move on their own and despawn at different rates than others. This means that a DL that was trying to "flex" to another is no longer guaranteed to render in the expected order or have the matrix information from the other actor. And if one of the dependent actors despawns first, then there is nothing for the other DL to "connect" to.

The reality is that the "body break" system is just simply not meant for flexible meshes.

What this means for modders:
Any limbs/DLs that are used with the "body break" system should not use flexible meshes. The easiest way to ensure that is using Standard skeleton type for these enemies. Otherwise if you use Flex, make sure to not have the meshes attach to multiple limbs. Some enemies don't have all their limbs spawn as "parts", for example Iron Knuckles have some of their armor pieces fall off, so the rest of the limbs can technically use flexible meshes.

The enemies that use the "body break" system are the following:
Iron Knuckles (en_ik)
Stalfos (en_test)
Stal Children (en_skb)
Shell blade (en_sb)
Tektites (en_tite)
Bubbles (flying skulls) (en_bb)

Copy link
Contributor

@Archez Archez left a comment

Choose a reason for hiding this comment

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

Approving now that body break parts are no longer in scope.

@Pepe20129
Copy link
Contributor

Maybe it'd be a good idea to detect if one of these skeletons are flex and disable the body break parts?
Or give a warning of some kind (although that would go into the whole provide warnings for malformed/erroneous/etc otr contents rabbit hole).

@Djipi71
Copy link

Djipi71 commented Jul 26, 2024 via email

@Archez
Copy link
Contributor

Archez commented Jul 26, 2024

Maybe it'd be a good idea to detect if one of these skeletons are flex and disable the body break parts? Or give a warning of some kind (although that would go into the whole provide warnings for malformed/erroneous/etc otr contents rabbit hole).

Flex alone is not what makes it incompatible, its when meshes are allowed to stretch to other limbs. It's not possible to detect that as is. If made correctly, a Flex skeleton can use the break system.

I think it would be better to just have this kind of information capture in modding documentation. Similar to how modders have to be aware of DLs that use color values set in code if they want that work correctly.

@Archez Archez merged commit f11f97e into HarbourMasters:develop-macready Aug 5, 2024
8 checks passed
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.

7 participants