Modcraft - The community dedicated to quality WoW modding!

Content creation => Modelling and Animation => Topic started by: phucko1 on October 16, 2011, 09:04:39 pm

Title: M2i to M2?
Post by: phucko1 on October 16, 2011, 09:04:39 pm
Hello, I got this problem when I edited my model and want to convert back to m2. It says:
Assertion Failed: pSubset->MaxBones, file .CM2skin.cpp, line 324
Title: Re: M2i to M2?
Post by: phucko1 on October 17, 2011, 09:45:15 pm
None can help :P?
Title: Re: M2i to M2?
Post by: inico on October 17, 2011, 11:39:34 pm
Quote from: "phucko1"
None can help :P?

Well, you can try to give more information...
What model are you trying to convert...?
Title: Re: M2i to M2?
Post by: Arid on October 18, 2011, 01:19:10 am
Wrong input m2. Make sure the one you're inputting is the one you used the Skeleton for. Like if you used the Draenei skeleton tu use it's animations input the draeneimale.m2. Ya' get it?
Title: Re: M2i to M2?
Post by: Zim4ik on October 18, 2011, 06:10:45 am
maybe you do smth wrong. Maybe one mesh has bone weigh that skeleton hasnt
Title: Re: M2i to M2?
Post by: phucko1 on October 18, 2011, 03:17:52 pm
Okey did is how I did, I try to make ogre use dwarf skeleton so I export dwarf skeleton and import it with ogre and then select my ogre's meshes and go to object mode and link it to dwarf skeletons armatureroot instead of ogre one. Then I rename all Vertex Groups to the ones of the dwarf meshes. And later in m2i to m2 I input dwarfmale.m2
input m2i: dwarfmale.m2i
output m2: dwarfmale.m2
Title: Re: M2i to M2?
Post by: phucko1 on October 22, 2011, 12:14:09 am
What did I do wrong :P?
Title: Re: M2i to M2?
Post by: thesixth on December 02, 2011, 08:59:16 pm
Hi!
I got a similar message earlier, can't remember exactly. Now, I don't know if you got it working for you since the last post and if so, perhaps someone else might benefit from this comment.

Here's an example of my M2Mod.ini Config:

InputM2 =   D:ModelOrcMale.m2
OutputM2I =   D:ModelOutOrcMale.m2i
#InputM2I =   D:ModelOutOrcMale.m2i
#OutputM2 =   D:ModelOutOrcMale.m2

The 'InputM2' is the original model, and the 'OutputM2I'.

Running this gives me a M2I file in my 'Out' directory.
(Make sure you have the '*.skin'-files related to your 'm2'-model in the same direcory.)

I then edit this M2I as I see fit, export it to the same file, i.e 'D:ModelOutOrcMale.m2i' and run this M2Mod.ini config:

InputM2 =   D:ModelOrcMale.m2
#OutputM2I =   D:ModelOutOrcMale.m2i
InputM2I =   D:ModelOutOrcMale.m2i
OutputM2 =   D:ModelOutOrcMale.m2

You need the 'InputM2' to be running in the config, and it needs to be the very same 'M2'-file from which you generated your 'M2I'-file.

This gives me the new 'OrcMale.m2' model along with it's '*.skin'-files in the 'Out' directory aswell.

***
EDIT:
Sorry, didn't read your last post entirely. If that's the case, I do not know what has gone wrong.
Here's what the "Guide" that came with my 'M2Mod.rar' says:

There are some rules to follow to ensure you don't break the model.

You must not rename the base name of any imported object, except for what comes after the dot. For example, "Attachment37" can be named "Attachment37.001" or "Attachment37.MyName". Also, "Subset0" can be named "Subset0.003" or "Subset0.temp". This rule is needed to allow the exporter to function.

You may rename Subsets, Attachments, and Cameras using the after-the-dot rule.

You may edit meshes however you want. You can edit vertex weights, vertices, UVs, subdivide, split, extrude, sculpt, remove doubles, etc. Just about anything that Blender will let you do to the mesh you can do safely without worrying about breaking the model.

You may not delete the armature, it is needed by the exporter to identify the other parts to export.

You may delete bones, but there should be absolutely no reason to do this. Bones not present are not modified during merge. Parent/child structure is never modified during merge.

You may edit the position of bones. The position of the head is the only position used. The position of the tail is irrelevant.

You should not rename bones or vertex groups. The number in the name of the bone determines the index of the bone that will be overwritten in the M2.

You may delete the cameras. Cameras not present are not modified during merge.

You may delete attachments.  Attachments not present are not modified during merge.

Don't mess with the parent/child structure of the objects, this structure is used by the exporter to determine which objects are a part of the model being exported.

Be careful that a single vertex does not fall under influence of more than 4 bones. But if it does, it's not much of a problem because the exporter will take the first 4 heaviest bones and drop the rest. The 4 bone limit is a limit of the M2 format.

Remember to triangulate your mesh before export if you made any quads, otherwise the exporter will try to triangulate the quads and it might not always do a good job.
Title: Re: M2i to M2?
Post by: larrylaffer on December 12, 2011, 08:49:06 pm
I got this error too... even if i dont modify anything in the m2i model...

These are the steps i am following:

I took the kil jaeden.m2 file from the mpq
M2Mod3 to convert m2 into m2i
Import the m2i in Blender, the model is loaded without any error
Export the m2i with a different name and without making any change
M2Mod3 to convert the m2i into m2.... andi i got that error.


Also, using the M2mod4 to convert a cataclysm m2 into a m2i, i got always this error:

"error: Failed to load SKIN, file is corrupt."

I cant understand why... cuz the skin and blp files are inside the directory of the m2... and i took them directly from the mpq.  am trying to extract the darkphoenixmount.m2 mount, and i got also the darkphoenixmount.skin...

Regards.
Title: Re: M2i to M2?
Post by: phucko1 on December 12, 2011, 09:37:42 pm
You realise darkphoenix uses same model as normal phoenix? You can just duplicate phoenix mount from TBC rename it Darkphoenix.m2 etc, give it a new texture in PyModelEditor, 010Editor or M2Modder :)
Title: Re: M2i to M2?
Post by: larrylaffer on December 13, 2011, 01:33:37 am
Quote from: "phucko1"
You realise darkphoenix uses same model as normal phoenix? You can just duplicate phoenix mount from TBC rename it Darkphoenix.m2 etc, give it a new texture in PyModelEditor, 010Editor or M2Modder :)

Its not the same, the darkphoenix has an armor, the normal phoenix doenst.
Besides, is not just the phoenix, i want several mounts and creatures from cataclysm into my wotlk server