Skip to content

Minor changes for weights and vertices#77

Open
Devostated wants to merge 8 commits intodtzxporter:cast-c4d-cleanupfrom
Devostated:cast-c4d-cleanup
Open

Minor changes for weights and vertices#77
Devostated wants to merge 8 commits intodtzxporter:cast-c4d-cleanupfrom
Devostated:cast-c4d-cleanup

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
Just a quick update before I lose progress on accident. Animation support is not included yet.
Main changes are in materials and IK.

Changelog:
- material rework
- support for additional texture maps
- easier to convert to other render engines
- reusing materials
- better IK support (still not 1:1 to Maya)
- default settings to True
- added cast meta data for author and software
- recolored the cast null object
- minor text and whitespace changes
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

Comments