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

"mdl corrupted: header 2 misaligned or out of bounds" on MDL Import #189

Open
Jraylor opened this issue Aug 12, 2024 · 8 comments
Open

"mdl corrupted: header 2 misaligned or out of bounds" on MDL Import #189

Jraylor opened this issue Aug 12, 2024 · 8 comments
Labels
bug Something isn't working

Comments

@Jraylor
Copy link

Jraylor commented Aug 12, 2024

Describe the bug:
On trying to import most of my SourceFilmmaker usermod .mdl's, I get an error saying could not import mld: model '[path directory]' mdl corrupted: header 2 misaligned or out of bounds

To Reproduce:

  1. Import a SourceFilmmaker model from the usermod directory.
  2. Error prints.

Expected behavior
Just let the model import per regular.

Related files
I think I'll be alright, it's just a .mdl file haha.

Logs

[Plumber] [INFO] opening file system of game `None`...
[Plumber] [INFO] file system opened in 0.00 s
[Plumber] [INFO] detected local asset searh path `C:\Program Files (x86)\Steam\steamapps\common\SourceFilmmaker\game\usermod`
[Plumber] [INFO] importing mdl `C:\Program Files (x86)\Steam\steamapps\common\SourceFilmmaker\game\usermod\models\[model_path].mdl`...
[Plumber] [ERROR] model `C:\Program Files (x86)\Steam\steamapps\common\SourceFilmmaker\game\usermod\models\[model_path].mdl`: mdl corrupted: header 2 out of bounds or misaligned

Screenshots
If applicable, add screenshots to help explain your problem.

Details (please complete the following information):

  • OS: Windows 11
  • Blender Version: 4.2
  • Addon Version: 1.1.0
  • Did you download a release or build the addon yourself: Release
  • Related Game: SourceFilmmaker

Additional context
Nah.

@Jraylor Jraylor added the bug Something isn't working label Aug 12, 2024
@Jraylor
Copy link
Author

Jraylor commented Aug 13, 2024

something tells me this is either a needed thing and my .mdl is actually corrupt, or I'm completely blind to something easy lol

@lasa01
Copy link
Owner

lasa01 commented Aug 13, 2024

Could be that the mdl formats you have are not supported, since there are different versions etc.

@Jraylor
Copy link
Author

Jraylor commented Aug 13, 2024

Different Plumber versions or Blender, SFM?

@lasa01
Copy link
Owner

lasa01 commented Aug 13, 2024

Mdl version. Most common ones should work but there can be something I haven't seen and tested before.

@Jraylor
Copy link
Author

Jraylor commented Aug 13, 2024

Alright. I get my models from SFMLab, and usually import via drag-and-dropping the "models" and "materials" folder into the usermod directory like how it's normally installed. Is there anything I could do on my end?

@lasa01
Copy link
Owner

lasa01 commented Aug 13, 2024

Unfortunately there's probably nothing you can do. Would be interesting to see if you are able to decompile the model using Crowbar. If that fails too, could also be that the model is somehow protected against decompilation/importing. In any case, even that should be possible to work around. If you have any "normal" models that have the issue and that you're willing to send, I could take a look some time to see if they can be supported.

@Jraylor
Copy link
Author

Jraylor commented Aug 13, 2024

Managed to apparently "Decompile" the model I aimed for in Crowbar from the same directory. I'll try finding a model that'll break that's normal and I'll send it here.

@Jraylor
Copy link
Author

Jraylor commented Aug 13, 2024

Decompiling with Crowbar 0.74: "C:\Program Files (C:\Program Files (x86)\Steam\steamapps\common\SourceFilmmaker\game\usermod\models\[model_path].mdl" ...

  Decompiling "[model-name].mdl" ...
    Model version 49 detected.
    Reading MDL file header ...
    ... Reading MDL file header finished.
    Checking for required files ...
    ... All required files found.
    Reading data ...
      Reading MDL file ...
      ... Reading MDL file finished.
      Reading VTX file ...
      ... Reading VTX file finished.
      Reading VVD file ...
      ... Reading VVD file finished.
    ... Reading data finished.
    Writing data ...
      QC file: 
        [hiddenmodelname].qc
      Reference mesh files: 
        [hiddenmodelname].smd
        [hiddenmodelname].smd
      LOD mesh files: 
      Vertex animation files: 
        [hiddenmodelname]_01.vta
      Bone animation files: 
        ragdoll.smd
    ... Writing data finished.
  ... Decompiling "[hiddenmodelname].mdl" finished.

... Decompiling with Crowbar 0.74: "C:\Program Files (x86)\Steam\steamapps\common\SourceFilmmaker\game\usermod\models\[model_path].mdl" finished.

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