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

Minor changes for weights and vertices #77

Open
wants to merge 7 commits into
base: cast-c4d-cleanup
Choose a base branch
from

Conversation

Devostated
Copy link
Contributor

@Devostated Devostated commented Nov 10, 2024

Vertices:

The integer vertexCount is 1/3 of vertexPositions, so the loop only sets 1/3 of the vertices.

Weights:

Fixed an issue that was related to reading the values of the weightTag

Error:

Joint index out of range

Solution #1:
Inserting the weightTag before reading it's values.

Solution #2:

- boneIndexes[bone.Hash()] = newBone
+ boneIndexes[bone.Hash() or i] = newBone

This solution was only needed for Apex Legends models, which seem to not always have a bone hash?

Fixed an issue that was related to reading the values of the weightTag

Error:
> Joint index out of range

Solution dtzxporter#1:
Inserting the weightTag before reading it's values.

Solution dtzxporter#2:
```diff
- boneIndexes[bone.Hash()] = newBone
+ boneIndexes[bone.Hash() or i] = newBone
```
This solution was only needed for Apex Legends models, which seem to not always have a bone hash?
The integer vertexCount is 1/3 of vertexPositions, so the loop only sets 1/3 of the vertices.
Due to Cinema4Ds layer usage, we have to apply the material tag right after the first UV tag was added.
It can't be index and bone.Hash()

Solution:
using bone.Name() instead
@dtzxporter
Copy link
Owner

Do you still need help with this one?

Notifying the user if an instance failed to import.
@Devostated
Copy link
Contributor Author

Only the animation support is left to do, unless you notice anything else.
I'll talk to some Cinema4D users on how they can imagine an animation support.

An rotation error in the imported skeletons of CoD models has been found and solved together with @dtzxporter
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