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

Collisions imported from "Import .OBJ as Collision" cause a crash on Skyrim. #28

Open
tktk11 opened this issue Oct 10, 2019 · 3 comments

Comments

@tktk11
Copy link

tktk11 commented Oct 10, 2019

"Import .OBJ as Collision" may still be in testing. Is this a function that cannot be used with Skyrim?
Cause a crash when loading a mesh with collisions created with this feature in Skyrim.

I tried to set it exactly the same as a working collision, pack TriStrips, recreate a collision mesh for import, and everything else failed.

I guess that bhkNiTriStripsShape itself has a problem.

@hexabits
Copy link
Owner

It's meant for FO3/FNV, and also FO4 (with Elric). There are only a few bhkNiTriStripsShape collisions in LE, and they were essentially a developer mistake/leftover. I don't remember offhand the status of bhkNTSS in SSE but they were either re-processed to remove strips (because SSE in general no longer supports strips) or they do still work but you just didn't set your rigid body or other settings correctly.

In any case if you really want to investigate it more you can search all the vanilla files for bhkNiTriStripsShape in the File Checker in the File menu. Edit: I went ahead and did it for you:

image

@tktk11
Copy link
Author

tktk11 commented Oct 27, 2019

Thank you. The File Checker is useful. Could you add a collision from a mesh that be usable with Skyrim?
I have to use a tool called Chunk Merge to add collisions. It is pretty cumbersome.

@jbostrus
Copy link

jbostrus commented Feb 14, 2023

I realize this issue is really old. But I ran into a related thing today. When importing a .OBJ as collision, or for that matter manually adding the bhkNiTriStripsShape from scratch, the binary data in the "Unused 01" is random and not zeroed out. This causes Elrich to crash for Fallout 4.

By changing the line in the nif.xml
<field name="Unused 01" type="byte" length="20" binary="true" />
to remove the binary="true" or change to false. That coerces NifSkope to create the node with zeroed data. And thus Elrich doesn't crash. I don't know if the same would resolve the OP issue with Skyrim or not.

It's worth noting that this behavior seems to be the same for any field marked as binary data. It will not zero it and leave it with whatever random memory was there when allocating space.

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

No branches or pull requests

3 participants