HOME | DD

Riveda1972 — [MMD] How to fix invalid or corrupted models (4)

#fix #hacks #locking #mmd #model #pmx #repair #tricks #tutorial #unlocking #pmxeditor
Published: 2018-09-21 14:23:02 +0000 UTC; Views: 26444; Favourites: 121; Downloads: 41
Redirect to original
Description

Disclaimer: Personal opinions here!
This post contains personal opinions of mine, which would probably not match yours, nor the ones of any other Homo Sapiens living on this planet, solar system, galaxy and universe (I don't know about macroverses and alternate realities, sorry). I usually answer any question and criticism, since they're politely and educately expressed. If you cannot express your criticisms without barking, flaming and insulting other people, you're courtesly invited to not read this post and to not leave comments that I'll be forced to ignore and mark as spam oe to report them to DA moderators.
Legal (and hopefully stupid-proof) disclaimer for both "lockers" and "unlockers"
This (and the previous ones) article is not intended to help or encourage you in violating rules or third party intellectual properties. Authors and editors DO have all the right to protect their works, their intellectual properties, their efforts in sharing reusable contents, and to prevent third party users to not use their work in improper ways (examples: using models in NSFW or too violent contents, using them for alternative purposes like VRchat avatars or in-game mods, and so on).
BUT:
- You don't have the right to intentionally corrupt a file to cause lag and malfunctions on other people's computers and programs
- You don't have the right to decide if a user should use or not MMM, Blender, 3D Studio Max or any other rendering application instead of MMD to render their pics and videos
- You don't have the right to consider as your own property the (3rd party) parts you've freely used to make your edits or to deny further edits

You lockers, please, also remember the meaning of the this warning shown by PMX Editor: 

   

This is saying: An ERROR has occurred while loading the model. Ignore and continue?

Please, take note of the word "Error".
This is not a message informing that you're opening an "edit-locked" model: this is a MALFUNCION warning
I.e. what you consider a "licit locking" is an illicit try to corrupt/invalidate a file and to cause malfunctions on other people's computers.

Previous chapters
[MMD] How to FIX pmx files corrupted by PMX Locker
[MMD] Locking files? No: Corrupting them (pt. 2)
[MMD] PMX unlocking, ZIP/RAR passwords... part #3


How to FIX locked/invalidated/corrupted PMX models: minor tricks
Hello, little hobbits

I'm going to publish a short "addon", or "update" if you prefer the term, to my previous journal entries concerning the PMX "edit-locked" models issues. This is meant as a brief collection of minor tricks. If you've never read the previous chapters and you are searching for a solution to your frustrations when trying to open an edit a "locked" PMX model, it's recommended you read the previous entries, first. The main "unlocking" (or better: REPAIRING) techiniques are exposed better there. The tricks listed below are really minor hacks (sorry, this term could be defaming and insulting for people who are real hackers and not just dummy lamers), but a lot of people commented my previous tutorials complaining for "locking" systems not solved by my main articles. So, here's the rest.

In order of relevance (easier to "hard"):
1) Foreign character sets causing textures to not be displayed (this is not a "lock" nor an "hack", it's an issue with your computer settings!!)
2) Files/Folders permissions ("read only" and "hidden files/folders" hack)
3) PMX file format version hack
4) The "fake blank space hack" (this is, by far, my favourite. Fun. really.)


1. Charset issues: this is not a locked model!!
This is not a trick to "lock" a model, this is just an issue caused by the use of characters your PC cannot display properly. yes the effect is the same: you load the model and you see it as blank, with no textures applied. Consider this is not a try to prevent you editing the model. Some editors/authors just haven't given english names to texture files and/or folders, and when you unzipped the file you have downloaded, your sistem doesn't recognize the "foreign" characters. Sorry for the word "foreign" I'm assuming most of readers belong to the "overseas" communities. This just means that your computer is not set to show japanese/chinese/arabic/hebrew/viking_runes/sindarin_tengwa/[other] characters used by the original author or editor to name their model/files/folders.
You have two solutions for this issue:
1) Set your system to show the foreign character sets you're using (most common ones: japanese and chinese)
The way depends on your local windows version. Just search on google for a quick "how to" enable alternative alphabets and character sets.
2) Manually rename files and folders with standard "western" characters
This is longer and takes more time to be done, but is more useful, by far, if you need to edit the model and you're not familiar with the original alphabet used.

EDIT: sometimes this issue is caused by the way original files have been zipped, and when you unzip them the file names and the folder names loose their original japanese/chinese names. Just search around, this is a common issue. Using some alternative archive managers, like BANDIZIP o japanese/chinese versions of 7zip should solve all of your problems.


2. File permissions (read only / hidden) hacks: a dumb and weak try to "lock" models
Really, I was surprised to hear that this kind of "hack" still works. I've not experienced it, personally. But as some users have reported it, I'm talking about it. Assuming you use any version of MS Windows, the solution to this issue is quite simple, as in most of personal systems users do have administrator permissions or anyway they easely can run commands and operate with administrator privileges. It could have been more difficult if you were using more secure operative systems like Linux, but this is not our case.
Any file (or folder) has some basic "permission" set on itself. these permission concern the right to see or not the file, open or not it in "read only" mode, and open it in write (edit/modify/save changes) mode. There should be another kind of permission, i.e. the "execute or not" as a program, but it's not relevant for our purposes.
The normal state for a useable file or document is to set with visible to all, and with read-and-write permissions.
I.e. you can see the file or folder, and you can freely access it, both opening and editing/deleting/moving it.
Hidden files/folders: if you experience this issue, not seeing the textures files or folders, first of all you have to enable on your system the option "show hidden files/folders". depending on your windows version and localization, this can be done opening the explorer (the file explorer to browse in your PC folders, not the web browser!), open the "tools" menu, and the "folder options" window. Search for the file/folder view setting and check or uncheck the option concerning to show or not to show hidden files and folders and system files. Set it so that you can see also eventually hidden files and/or folders. I also suggest you to check the option to apply this setting to all folders of your system. Just be careful in case you browse in the Programs folder or in any of the system folders and don't try to delete system files that have been hid just to prevent eventual deletion. Once set the show hidden files/folder you should now see the files you were interested in. At this point the only thing you've to do, is to select the previourly hidden files, right click and choose "properties": uncheck the option that sets the files as hidden and you're done (at this point you also could restore the folder options to not show hidden and system files).
Read only files/folders: even easier than the hidden ones. Just select them, right click, choose "properties" and uncheck the "read only" flag. Click "ok" and you're done.


3. PMX format version issues (mostly affecting English PMXE translation and older PMXE versions
This is a caotic bunch of hacks, appearently made to play with the file format version, appearently in order to prevent the most diffused (among the "western" MMDC) PMX Editor versions to load a more recent file version. The last of this issues has been reported to me by LesbianLioness and the real nature of this issue has been suggested by harryhack91 : his solution is valid. Just download the most recent version of PMX editor (at the moment I'm writing it's the 0.2.5.4f), open the appearently "locked" model, resave it with another name, and then you'll be able to open it with your preferred version of PMX Editor.
As an alternative way you can also import the appearently "locked" model in Blender, using MMD Tools plugin to importa and export. Then export it again as a new model. The resulting model can be normally opened with your preferred PMX Editor version.


.
.
.
Now, please, a moment of silence.... *beating-on-DRUMS-like-Stannis-at-King's Landing-siege*
youtu.be/i4kNneOct6A


4. And the winner is... THE "FAKE BLANK SPACE" HACK!!!
 
Yes. The previous ones are not real hacks, just tricks to make harder your life, but without really achieving anything, other than annoying you.
But this "hack" is at least original and fun.
Really, man/woman, whoever you are, you've demonstrated creativity and even a kind of perverted sense of humour I totally like!  

You should know, at this point, what's the main feature of the most diffuse way of "locking"/corrupting models to prevent users to load them in PMX Editor, isn't it? That famous "4th character hack" in the file header definition. The valid and standard PMX file format requires that the first four characters in the file header definition are "PMX ", with a BLANK SPACE after the 'PMX' string ('䵐 ' in japanese charset). PMX lockers usually replace that blank space with a special character, 'ꁘ', setting the first 4 caracters to "PMXꁘ" ("䵐ꁘ" in japanese characters). This way although MMD recognizes the model as valid (but often lagging and malfunctioning if compared to a clean and uncorrupted model), PMX Editor and MMM won't recognize it as a valid PMX format and will prevent you to open in the editor, or worst will prevent you to use the model for animation or picture posing purposes, just because you prefer MMM to MMD.
The fix has been explained in my first journal: open the corrupted file with a hexadecimal editor or an advanced text editor and just replace the fourth character (ꁘ or any other character used) with a blank space, save, and you'll get back the repaired model.

Now, our crucial question: What is a "BLANK SPACE"?
Here's the hack. As most of people are not familiar with hex codes, they prefer to use any text editor to open the files and check for the 4th character to be the expected blank space. This is the way many people has been frustrated, as they saw on their screen exactly what they expected to see: a "blank space", but their model still won't open in PMX Editor.
Here's the trick. A blank space is just what we see on our screens. But there are several ways a "blank space" can be represented in hexadecimal mode.
I.e. what you're looking at on your screen, it SEEMS your expected blank space, but it's not. It's another (similar) blank character.
Have you ever seen the diffeence between "-" and "−"? At a first sight they can be confused, but still if you pay attention you see they are different characters.
With a blank, invisible space, it's more difficult to see the difference, but it's the damn same thing. And this is the reason why you don't detect the hack when opening the PMX model with a text editor.
See here if you want to read deeper about this matter: jkorpela.fi/chars/spaces.html 

For our purposes you just have to keep in mind that the only way to be sure that the 4th character is your expected blank space, is to open the PMX file with a hexadecimal editor. No way to avoid this: the first four character must be 'PMX' and a blank space, the one you get pressing on your spacebar. In hex codes, the first "octet" of numbers MUST be "50 4D 58 20" which is the hex translation of "PMX ". No matter what you see in your favourite text editor.
If none of the previous "hacks" (1,2,3) have been applied AND you see a "blank space", BUT your PMX Editor still refuses to properly load your model, you can be pretty sure that the "blank space" you have seen on the screen of your text editor is not the right one. Try it. Open the file in any hexadecimal editor. You'll see that the 4th couple of number won't be the expected "20" (i.e. the right "blank space") but some other number or combination of numbers and letters. So you know what you have to do to fix the file, now: just overwrite the invalid "blank space", by preference directly typing "20" over the wrong couple of numbers/letters.

 

Have fun

ps: I apologize, as usual, for my poor and full-of-orthographic-errors english

Related content
Comments: 59

Riveda1972 In reply to ??? [2023-09-12 23:35:53 +0000 UTC]

👍: 0 ⏩: 1

Omega0754 In reply to Riveda1972 [2023-09-13 17:59:48 +0000 UTC]

Hidden by Commenter

👍: 0 ⏩: 1

Riveda1972 In reply to Omega0754 [2023-09-14 06:35:50 +0000 UTC]

👍: 0 ⏩: 1

Omega0754 In reply to Riveda1972 [2023-09-14 08:57:42 +0000 UTC]

👍: 1 ⏩: 1

Riveda1972 In reply to Omega0754 [2023-09-14 09:55:26 +0000 UTC]

👍: 0 ⏩: 1

Omega0754 In reply to Riveda1972 [2023-09-14 18:11:28 +0000 UTC]

👍: 0 ⏩: 1

Riveda1972 In reply to Omega0754 [2023-09-14 18:59:27 +0000 UTC]

👍: 0 ⏩: 1

Omega0754 In reply to Riveda1972 [2023-09-14 19:18:14 +0000 UTC]

👍: 0 ⏩: 0

MinaliAjaebixTsuki [2021-11-19 12:37:48 +0000 UTC]

👍: 0 ⏩: 0

Pjortik [2021-08-13 11:16:06 +0000 UTC]

👍: 0 ⏩: 1

Riveda1972 In reply to Pjortik [2021-08-13 11:27:49 +0000 UTC]

👍: 1 ⏩: 1

Pjortik In reply to Riveda1972 [2021-08-14 06:35:41 +0000 UTC]

👍: 1 ⏩: 0

KiwiCreative24 [2021-03-31 16:03:27 +0000 UTC]

👍: 2 ⏩: 1

Riveda1972 In reply to KiwiCreative24 [2021-03-31 16:06:40 +0000 UTC]

👍: 0 ⏩: 1

KiwiCreative24 In reply to Riveda1972 [2021-03-31 16:07:22 +0000 UTC]

👍: 0 ⏩: 2

Riveda1972 In reply to KiwiCreative24 [2021-03-31 16:09:20 +0000 UTC]

👍: 0 ⏩: 1

KiwiCreative24 In reply to Riveda1972 [2021-03-31 16:14:08 +0000 UTC]

👍: 0 ⏩: 0

KiwiCreative24 In reply to KiwiCreative24 [2021-03-31 16:09:14 +0000 UTC]

👍: 0 ⏩: 0

RyukiKazuku [2020-01-31 08:51:34 +0000 UTC]

Can someone help me with converting Guilty Gear Models for MMD? I keep trying to export models from XNA to Blender to Pmx, but the model shows up with invisible textures. I'll
offer a screen shot just in case.

👍: 0 ⏩: 0

Nik-2213 [2019-12-01 19:06:51 +0000 UTC]

IIRC, there are some PMX models about that display okay in Editor, but have a persistent fault with their first polygon that throws exporters / converters for a loop...

Sadly, there seems no PMX equivalent of PhilC's braw Poser File Editor which will lay out the data as a real-neat, grokkable tree.

👍: 0 ⏩: 1

Riveda1972 In reply to Nik-2213 [2019-12-02 08:09:56 +0000 UTC]

Sometimes the best way to correct issues is to import the model in Blender using mmd_tools plugin and the re-exporting it to a new PMX file

👍: 1 ⏩: 0

juliarose39 [2019-11-21 12:51:45 +0000 UTC]

Hi, do you know how to add named bones a model? I want that model soo badly, but I can´t fix it! Could you help me?:

ZIP No Preview


Please reply

👍: 0 ⏩: 1

Riveda1972 In reply to juliarose39 [2019-11-24 17:18:47 +0000 UTC]

You can fix it by opening it in PMX Editor and manually renaming at least the most important bones to their japanese names. You can find a reference here: [MMD] XPS to MMD bones reference list
It's a boring work but it's the only way

👍: 0 ⏩: 0

TootyTurtle [2019-09-18 18:27:07 +0000 UTC]

I have a model that brings up the error you show at the top, but I made the model myself, and loaded it into MMD and PMX a few times before it randomly decided to not open anymore. I hadn't touched the files or done anything in PMX, I just tried to load it one day and the error popped up and this stuff isn't working :c

👍: 1 ⏩: 1

Riveda1972 In reply to TootyTurtle [2019-09-19 08:28:04 +0000 UTC]

Weird. Could I take a look at the PMX?

👍: 0 ⏩: 1

TootyTurtle In reply to Riveda1972 [2019-09-19 15:59:20 +0000 UTC]

The program or the model file?

👍: 0 ⏩: 1

Riveda1972 In reply to TootyTurtle [2019-09-19 22:39:41 +0000 UTC]

The model, of course. Maybe there's some feature on the PMX version

👍: 0 ⏩: 2

TootyTurtle In reply to Riveda1972 [2019-09-20 15:30:22 +0000 UTC]

I've sent a note with the model download

👍: 0 ⏩: 0

TootyTurtle In reply to Riveda1972 [2019-09-20 15:24:36 +0000 UTC]

Sure, I'll note you a link to download it

👍: 0 ⏩: 0

SushiHamham-kun [2019-05-19 02:58:24 +0000 UTC]

I can't fix it
I tried everything, but when it's "unlocked" and I open, there is nothing, literally
Can you help me?
I need the outfit that was exported from Second Life and rigged

👍: 0 ⏩: 1

Riveda1972 In reply to SushiHamham-kun [2019-05-19 11:44:07 +0000 UTC]

Have you tried importing/ewxporting it with Blender mmd_tools?

👍: 0 ⏩: 1

SushiHamham-kun In reply to Riveda1972 [2019-05-23 18:12:18 +0000 UTC]

No, but don't worry, I could open it with the last version of PMX Thank you! <3

👍: 0 ⏩: 0

Mist-To-Zero [2019-03-28 02:45:46 +0000 UTC]

did issues model for language Chinese and Korean Unicode. because model Chinese and Korean this black to use effect raycast shader

👍: 0 ⏩: 1

Riveda1972 In reply to Mist-To-Zero [2019-03-28 15:29:05 +0000 UTC]

maybe something wrong with filenames or folder names? This doesn't sound exactly as a "file corruption" issue but something concerning operative system troubles when searching for the needed files/folders and not finding them or finding but not properly "reading" them due to unexpected character sets  

👍: 0 ⏩: 1

Frostfire175 In reply to Riveda1972 [2021-02-18 23:17:22 +0000 UTC]

👍: 0 ⏩: 1

Riveda1972 In reply to Frostfire175 [2021-02-19 13:42:07 +0000 UTC]

👍: 1 ⏩: 0

Twenty3Assassins [2019-03-21 04:21:32 +0000 UTC]

So Im trying to import a mmd to blender, it was a locked file with A0 and PMX with blank behind it. After undoing the lock it say "unpack requires a byte length of 12" if I try to load it without fixing it I also just get "File signature is invalid." Do you know anything to fix this?

👍: 0 ⏩: 1

Riveda1972 In reply to Twenty3Assassins [2019-03-21 10:43:19 +0000 UTC]

... may I give a look at the model. if it was invalidated with the A0 trick and you have properly corrected it replacing the "A0" with "20" and exported again in binary mode it's strange that it doesn't work.

The warning about a byte lenght issue seems that something has been corrupted elsewhere so the file is still in an invalid format.
What version of PMX editor are you using?
Tried importing it in Blender via mmd_tools and exporting it out? This often correct bugs concerning the file format issues

👍: 0 ⏩: 0

GreaserGirl913 [2019-03-18 19:45:23 +0000 UTC]

Okay I have another question. I have a model that the owner hasn't locked, but whenever I try to put it in PMX editor, it gives me an error. I checked in the Hex thing and it said "PMX" where it needed to, but since the file is PMD I thought that might be the issue. I've tried changing it to say PMD but it still doesn't load. Yet it loads fine in MMD. I also made sure the files weren't "read only" or hidden either. I have no problems with other models but this one continues to give me trouble. Do you know how to fix this issue? I have the latest version of PMX editor. 

👍: 0 ⏩: 1

Riveda1972 In reply to GreaserGirl913 [2019-03-18 20:21:09 +0000 UTC]

Without looking at the model is hard to answer, but often a solution is to import the model in Blender, via mmd_tools, and then exporting it again as a new model.
Unless the model is damaged, Blender normally cleans any issues.

👍: 0 ⏩: 1

GreaserGirl913 In reply to Riveda1972 [2019-03-18 22:13:50 +0000 UTC]

Blender told me the file wasn't a pmd file as well. But I will try again using the one that I edited the code to say "pmd" instead of "pmx". 

👍: 0 ⏩: 0

GreaserGirl913 [2019-03-18 03:26:54 +0000 UTC]

Hey, do you know how to fix mmd model data that's been corrupted by a data retrieval program? I accidentally deleted all the models i made in PMX editor and I tried to retrieve them, but all the data got corrupted. 

👍: 0 ⏩: 1

Riveda1972 In reply to GreaserGirl913 [2019-03-18 07:04:20 +0000 UTC]

No I'm afraid. when you recover files that way you always risk to get some errors or data lost. Thisi is because a deleted file is not really deleted, normally. The operative system just mark the space prviously occupied by a fle, as free, and just "hides" the deleted file. If you recover the file before the SO can write anything in that free space, you can restore the full data, but if the OS has written even a single bit inside that "free space" this corrupts the deleted file and when you restore it, it will have missing parts or wrog data everywhere the original data have been overwritten when the file was hidden and marked as "free space" to write in.

👍: 0 ⏩: 1

GreaserGirl913 In reply to Riveda1972 [2019-03-18 08:58:18 +0000 UTC]

Oh well, thanks anyways. 

👍: 0 ⏩: 0

Yuzo-MMD [2018-10-15 20:29:38 +0000 UTC]

Do you know the joy when you download a free Japanese model and suddenly unicode messes up the names of the files and you have no way of fixing them because you can't open the model in PMX to rename a few textures? Yeah. That's a huge pet-peeve of mine. 

There once was a way to get a model working by opening the file in plain, old text editor and just deleting the corrupt code out but I can't say if that still works. It's also a tedious job. 

👍: 0 ⏩: 1

Riveda1972 In reply to Yuzo-MMD [2018-10-15 21:48:42 +0000 UTC]

Hmmm doesn't it work the fix opening it with the japanese original version of PMX Editor and changing the texture names?

👍: 0 ⏩: 1

Yuzo-MMD In reply to Riveda1972 [2018-10-18 20:06:39 +0000 UTC]

I tried. The program gives me the error message that there was no valid model data available. MMD can read everything just fine- just not PMX editor. I have both the newest english and japanese version. 

👍: 0 ⏩: 1

Riveda1972 In reply to Yuzo-MMD [2018-10-19 06:46:13 +0000 UTC]

I'm curious. Can you provide me the link?

👍: 0 ⏩: 1

Yuzo-MMD In reply to Riveda1972 [2018-10-19 13:10:03 +0000 UTC]

It's not up for DL anymore. As I've said it's old and the blog I got it from is closed. 

👍: 0 ⏩: 0

kupocygirl87 [2018-10-09 00:14:44 +0000 UTC]

I those that lock those files are petty, simple as that.

👍: 0 ⏩: 1


| Next =>