jak1, jak2, jak3: fix custom model visibility #4070
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves #3698
This is a known issue confirmed by HatKid after the release of the build actor tool as something that came up during testing.
There is a problem which is you can't go over 255 vertices or faces in a single collision primitive. The solution then is to split a single object into two different primitives. This is what's done in the real game.
The problem here is that the build actor tool also doesn't support splitting an object into multiple objects in Blender. If you do, any subsequent objects appear invisible. This is because the pipeline for building materials is single-object. If you have a material on multiple objects in Blender, only one gets built and any subsequent uses get skipped as they were presumed to have already been built.
This simple fix adds an additional check to check both materials AND objects when building materials.
This is a pretty important fix, as there's no way to get around the 255 hex limit, so at that point you have no choice but to separate objects into two separate Blender objects. At this point, it doesn't make sense to not be able to display the same material on multiple Blender objects.
This affects BOTH collision meshes as well as visual meshes.
This is also a particular issue for non-armature actors.
Here is an example of others stumbling across this problem. The solution found was to make sure all objects were in a single object.
Before this PR:
without_fix.mp4
After this PR:
with_fix.mp4