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

Collision Data Deleted From Scaled Vanilla Mesh After Exporting #80

Closed
seancruzgp opened this issue Oct 9, 2020 · 3 comments · Fixed by #83
Closed

Collision Data Deleted From Scaled Vanilla Mesh After Exporting #80

seancruzgp opened this issue Oct 9, 2020 · 3 comments · Fixed by #83
Assignees
Labels

Comments

@seancruzgp
Copy link

Describe the bug
After scaling a vanilla mesh and exporting and packing the mod, game crashes. Comparing the exported MBIN to the original MBIN reveals that collision data was deleted as well as some values regarding LODs.

To Reproduce
Steps to reproduce the behavior.

  1. I imported ASTEROIDXL.SCENE.MBIN. It has multiple meshes. My goal was scale the y axis of _Asteroid_Vertical from 1 to 0.5. _Asteroid_Vertical has 4 LODs, 0-3.
  2. On properties, I selected each mesh and one by one, changed scale y to 0.5.
  3. I exported with preserved node.
  4. Copied the folder it created, MODELS, to my NMS mod station project folder. Packed the mod, copied to Mod folder and tested the game.

EXML Files for Comparison.zip

Screenshots
Image of Blender and what I did.
blender_0IB0MTFHar

Yellow tab is original decompiled MBIN. Red is the Blender output decompiled. I ss mainly the LOD section that was removed and one of the collisions of one of the LOD meshes. The two other pink areas are other LOD collisions that were also removed since I changed the scale of _Asteroid_VerticalLOD0, LOD1, LOD2, LOD3. All the light blue highlights are edits but I'm not sure why they're edited.

notepad++_rbEd7BVyCb
notepad++_THEWKojRD9

@seancruzgp seancruzgp added the bug label Oct 9, 2020
@monkeyman192 monkeyman192 self-assigned this Oct 9, 2020
@Devilin-Pixy
Copy link

Devilin-Pixy commented Oct 9, 2020

Having the exact same issue, even if no changes are made at all, with or without 'Preserving Node Info'. Even when scaling is done through 'edit mode', as you're likely supposed to do, this issue is present.

Using NMS version 2.62, MBINC v2.61.1-pre2, NMSDK v0.9.21

Note: Not seeing anything wrong when in '--debug-' mode either (Import, no changes > Export without PNI
Screenshot 2020-10-09 16 01 33

I did however notice something else that I found interesting. Likely not related, but noticed when making a change to the scale of 'AsteroidVerticalLOD0' in 'edit mode' (Scale Y with 0.5), get the following error in the console at the start of the export:
Screenshot 2020-10-09 15 44 02
Note the following in the image above:

File "", line 1
.
^
SyntaxError: unexpected EOF while parsing

I am not getting that 'error' when changing the scale through the Transform properties as @seancruzgp has done.
If I were to scale all 4 LOD objects in edit mode (AsteroidVerticalLOD0/1/2/3), the error would show up 4 times.

Feel free to move this to be a separate issue. I just wanted to mention this here, as I was testing this exact issue when I found the error with scaling in edit mode.

@seancruzgp
Copy link
Author

I tried the latest release you posted on Discord.

I followed the same steps I laid out in the OP. I also tried changing the scale of the collision on y to 800. The game will still crash while loading.

Here are the xmls to compare.
EXMLCompare2.zip

@monkeyman192
Copy link
Owner

Thanks, I'll have a look at it.
This whole different ordering thing is annoying me now, so I'll try fix it so that exported scenes have nodes in the same order as imported scenes. Was going to do this as a separate issue, but I'll fix it now I think as it makes things easier

monkeyman192 added a commit that referenced this issue Jan 14, 2021
Fix numerous issues with collisions and improve docs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants