• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Magos][Blender] Export/Import ms3d gone wrong

Status
Not open for further replies.

Ardenian

A

Ardenian

I recently ackknowledged one can import ms3d models to Magos.
That's like Christmas for me, because I can export ms3d from Blender, the tool I use for modelling.
I create a mesh in Blender and I wrap it.
Then I export import it to Magos using the ms3d file type.

In the first moment, everything seems fine. I can scale the model,
edit the different tabs.
The model being imported has no initial bone, its only sequence is named
'Unnamed' from 0 to 0 and if I don't assign a texture path in Blender,
then its texture is 'Replaceable ID -1'
Nothing bad, I can manually create and change everything of these.
Though, adding translation to a newly created bone, no matter what is its
Geoset setting ( 'Multiple' or a specicif one), the mesh is not going to move.
However, now comes the problem.

Once I open the model in Mdlvis, its texturing is correctly displayed, in difference to Magos,
as Mdlvis uses repeating images for its UV maps and I used only one in Blender
( haven't found the option yet to make it repeating)

In Mdlvis, I can edit the UV Mapping.
However, if I try to detach vertices to a new geoset or open the Sequence Manager,
error messages pop up telling me the model is damaged.

I experienced this a long time ago when trying to animate a WoW tree.

If I open Groups of the geoset in Magos, it is just empty.
I converted the mdx to mdl and looked at it,
appearently Vertex Groups have the value '-1', that seems wrong.

I would be very glad to receive some help here,
it completely stopped my work flow and destoyed any motivation.
I attached a very simple model that has the same problem.

EDIT:
I had a closer look on the mdl file of another import gone wrong and appearently the only difference I saw
was that there seems to be no Matrices/ strange Group:
Code:
}
Groups 0 0 {
}
Other mdl files, default Blizzard ones have matrices here:
Code:
}
Groups 1 1 {
    Matrices { 1 },
}

Could there be the problem ?
 
Last edited by a moderator:
Yes, that is definitely the (or one of the?) problem(s).
VertexGroups are a 0-indexed ID referring to the Matrices.

So like if you have VertexGroups as:

Code:
		2,
		2,
		2,
		2,

then it refers to matrix

Code:
	Groups 13 19 {
		Matrices { 1 },
		Matrices { 1, 6 },
[B]		Matrices { 3 },  // INDEX #2[/B]
		Matrices { 4 },
		Matrices { 1, 4 },
		Matrices { 4, 5 },
		Matrices { 5 },
		Matrices { 1, 5 },
		Matrices { 6 },
		Matrices { 1, 7 },
		Matrices { 7 },
		Matrices { 6, 7 },
		Matrices { 2 },
	}

And in this case the matrix refers to the #3, so this would be the node with ObjectId 3

Code:
Bone "Cylinder31" {
	ObjectId 3,
	Parent 45,	// "Bone Building"
	GeosetId 0,
	GeosetAnimId 0,
}

So if you have no (negative) vertex groups, then you have no assigned matrices, if you have no assigned matrices then the model is attached to no nodes, if you have assigned nodes then the model is both corrupt and also cannot move (If it DID load in a program).

The setting to repeat UVs that you mentioned is called WrapWidth and WrapHeight in MDLs. I worked it into the OBJ importer for the MatrixEater that I'm working on for any time it sees UVs outside of the 1x1 base texture, so if that becomes your pipeline in the future that might not be a problem.
 

Ardenian

A

Ardenian

Ah I understand, more or less, thank you!
Hm, I don't understand how I could fix this manually in the text editor.
I would need to change the value of the vertex groups from -1 to any value and then
create these matrices, linking them to a bone ?

I found a workaround in the meantime.
After your explanation it explains why that workaround actually works.
If I import the ms3d file and then export the geosets, then I can, after re-importing them
to a new model ( not sure whether necessary to create a new one, but doesn't matter to me),
attach them to a node and then it works.

I look forward for the OBJ importer for the MatrixEater!
 

Ardenian

A

Ardenian

Oh, thank you, dtnmang, great to know!
Didn't know there is this 'N' menu in the UV tab, too.
 
Status
Not open for further replies.
Top