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

PSKX model is broken upon import #43

Closed
6yXJI0 opened this issue Aug 9, 2023 · 6 comments
Closed

PSKX model is broken upon import #43

6yXJI0 opened this issue Aug 9, 2023 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@6yXJI0
Copy link

6yXJI0 commented Aug 9, 2023

image
Johnny_PSKX.zip

PSK imported with 1 warning(s)
Discarded 561 degenerate face(s).
@cmbasnett cmbasnett self-assigned this Aug 9, 2023
@cmbasnett cmbasnett added the bug Something isn't working label Aug 9, 2023
@cmbasnett
Copy link
Member

Thanks for the report, I will look into this. What game is this from?

@6yXJI0
Copy link
Author

6yXJI0 commented Aug 9, 2023

Thanks for the report, I will look into this. What game is this from?

Texas Chain Saw Massacre (Tech Test Build)
https://drive.google.com/file/d/1ApWU5eCVBsZPR2w7xQTpbfU_13E5Plwl/view?usp=sharing
Link to Game Folder

@cmbasnett
Copy link
Member

cmbasnett commented Aug 10, 2023

I managed to fix it on my end, but I'll need to do a bit of testing to make sure the fix isn't going to break anything else.

image

The issue was that my importer was assuming that for a certain wedge format, the point indices were not addressable above 65535. I may have been working with an incorrect specification sheet or simply made a mistake. Changing the point index to be a 32-bit integer fixes the issue.

I will run a few tests locally here, but I suspect this should be safe for other export types as well and I can probably publish a hot-fix tonight.

@cmbasnett
Copy link
Member

cmbasnett commented Aug 10, 2023

@6yXJI0 This has been fixed and is available in draft release 5.0.2 (https://github.com/DarklightGames/io_scene_psk_psa/releases/tag/5.0.2). Please re-install the addon with this new version and let me know if this solves your issue!

@6yXJI0
Copy link
Author

6yXJI0 commented Aug 10, 2023

@6yXJI0 This has been fixed and is available in draft release 5.0.2 (https://github.com/DarklightGames/io_scene_psk_psa/releases/tag/5.0.2). Please re-install the addon with this new version and let me know if this solves your issue!

Yep! Thank you so much! No more completely messed imported models! But it still says:
PSK imported with 1 warning(s) Discarded 32 degenerate face(s).
And apparently it deletes some faces.
Previously, I was using another PSK/PSA importer, it was importing models without any data loss. But it can't import morph targets. I also have compared models that were imported with this importer and yours and it looks like removed degenerated faces were on the hair.
io_import_scene_unreal_psa_psk_280.zip

Also! Giving you 2 more pskx models (that have the same error), just in case.
Sissy_Cook.zip
Thank you in advance!

@cmbasnett
Copy link
Member

cmbasnett commented Aug 10, 2023

The problem, I believe, is that there are duplicate faces on the mesh (i.e., a face consisting of the same 3 vertices), and Blender does not allow this for technical reasons (probably having to do with hashing of the faces).

A possible solution for this would be to split the PSK into as many different meshes as is needed in order to have all of the faces represented in Blender. I have created a new task to sort this out (#44).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants