• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Clearing mdls of useless vertices

Status
Not open for further replies.
Level 8
Joined
Feb 21, 2005
Messages
110
Hey,

I've realized that Blizzard models are full of useless information, mostly vertices that should have been snapped together (meaning should be melded into one vertex) but are actually twice the same vertex.

A simple example would be Abilities\Spells\Items\AIda\AIdaTarget.mdx (scroll of protection effect).
I extracted the shield from it and realized that it actually got 16 vertices, but only 7 are needed. Since I had to re-do the UV-Mapping manually anyway (Blizzard really screwed that up) I also remade the vertices.

While this isn't much of a problem with this model - neither wastes much space, nor difficult to fix - but it sure is with other models.

To be more specific, the model Units\Other\DranaiAkama\DranaiAkama.mdx, which has no collision shapes and thus has been re-imported into DotA with fixed collision.
It has 618 vertices in the main geoset, but only actually requires about 200. Clearing out the useless stuff would really save a lot of space.


Now to the question: Is there a program that can clear out the "useless" stuff automatically? Doing it by hand is possible with small models, but basically impossible with bigger ones. Still, the whole process can theoretically be done automatically and saves a lot more mapspace than most other compression methods should save.
If there is no program, can it be done using a professional modeling tool (convert to other file format, fix in Maya/3DSMax/Whatever, convert back)?


If you didn't get what I mean, here's the shield example. Both models are basically the same, except for the fact that the first one got screwed TVertices:

Original:
Code:
Geoset {
	Vertices 16 {
		{ -2.13649, -0.50787, 22.989 },
		{ -8.26404, -15.3865, 16.3736 },
		{ -5.23148, -10.8761, -2.83923 },
		{ 1.75252, -0.18364, -1.86002 },
		{ -5.36272, 10.3221, -2.96029 },
		{ -8.5057, 14.4451, 16.6091 },
		{ -2.13649, -0.50787, 22.989 },
		{ -5.23148, -10.8761, -2.83923 },
		{ 1.75252, -0.18364, -1.86002 },
		{ -2.13649, -0.50787, 22.989 },
		{ -5.23148, -10.8761, -2.83923 },
		{ -1.90197, -0.24913, -19.5445 },
		{ 1.75252, -0.18364, -1.86002 },
		{ 1.75252, -0.18364, -1.86002 },
		{ -1.90197, -0.24913, -19.5445 },
		{ -5.36272, 10.3221, -2.96029 },
	}
	Normals 16 {
		{ 0.974807, -0.189474, 0.117687 },
		{ 0.915329, -0.399504, 0.0506918 },
		{ 0.867141, -0.498062, 0.000928652 },
		{ 0.993875, 0.109557, -0.0144958 },
		{ 0.82921, 0.553293, -0.0792281 },
		{ 0.860733, 0.502755, 0.0798531 },
		{ 0.974807, -0.189474, 0.117687 },
		{ 0.867141, -0.498062, 0.000928652 },
		{ 0.993875, 0.109557, -0.0144958 },
		{ 0.974807, -0.189474, 0.117687 },
		{ 0.867141, -0.498062, 0.000928652 },
		{ 0.979279, 0.00710595, -0.202393 },
		{ 0.993875, 0.109557, -0.0144958 },
		{ 0.993875, 0.109557, -0.0144958 },
		{ 0.979279, 0.00710595, -0.202393 },
		{ 0.82921, 0.553293, -0.0792281 },
	}
	TVertices 16 {
		{ 0.107071, 0.182301 },
		{ 0.26298, 0.588445 },
		{ 0.50408, 0.0439777 },
		{ 0.93832, 0.202763 },
		{ 0.50408, 0.0439777 },
		{ 0.509516, 0.543132 },
		{ 0.794297, 0.581742 },
		{ 0.26298, 0.588445 },
		{ 0.509516, 0.543132 },
		{ 0.50408, 0.0439777 },
		{ 0.509516, 0.543132 },
		{ 0.26298, 0.588445 },
		{ 0.509476, 0.939114 },
		{ 0.794297, 0.581742 },
		{ 0.509516, 0.543132 },
		{ 0.509476, 0.939114 },
	}
	VertexGroup  {
		0,
		0,
		0,
		0,
		0,
		0,
		0,
		0,
		0,
		0,
		0,
		0,
		0,
		0,
		0,
		0,
	}
	Faces 1 18 {
		Triangles {
			{ 0, 1, 2, 3, 4, 5, 5, 6, 3, 7, 8, 9, 10, 11, 12, 13, 14, 15 },
		}
	}
	Groups 1 1 {
		Matrices { 0 },
	}
	MinimumExtent { -20.2656, -15.8431, -19.5471 },
	MaximumExtent { 11.2552, 15.8439, 22.9933 },
	BoundsRadius 22.9682,
	Anim {
		MinimumExtent { -19.2648, -15.6686, -19.5445 },
		MaximumExtent { 11.2552, 14.4451, 22.989 },
		BoundsRadius 22.7446,
	}
	Anim {
		MinimumExtent { -20.2656, -15.8422, -19.5471 },
		MaximumExtent { 11.2093, 15.8439, 22.9933 },
		BoundsRadius 22.984,
	}
	Anim {
		MinimumExtent { -19.4219, -15.8431, -19.5471 },
		MaximumExtent { 9.48405, 14.8981, 22.9925 },
		BoundsRadius 23.3315,
	}
	MaterialID 0,
	SelectionGroup 0,
}
Fixed (and cleared of extents as well):
Code:
Geoset {
	Vertices 7 {
		{ -8.26404, -15.3865, 16.3736 },
		{ -2.13649, -0.50787, 22.989 },
		{ -8.5057, 14.4451, 16.6091 },
		{ -5.23148, -10.8761, -2.83923 },
		{ 1.75252, -0.18364, -1.86002 },
		{ -5.36272, 10.3221, -2.96029 },
		{ -1.90197, -0.24913, -19.5445 },
	}
	Normals 7 {
		{ 0.974807, -0.189474, 0.117687 },
		{ 0.915329, -0.399504, 0.050692 },
		{ 0.867141, -0.498062, 0.000929 },
		{ 0.993875, 0.109557, -0.014496 },
		{ 0.82921, 0.553293, -0.079228 },
		{ 0.860733, 0.502755, 0.079853 },
		{ 0.974807, -0.189474, 0.117687 },
	}
	TVertices 7 {
		{ 0.107071, 0.182301 },
		{ 0.516958, 0.062334 },
		{ 0.908728, 0.221485 },
		{ 0.290524, 0.640584 },
		{ 0.500249, 0.600796 },
		{ 0.737406, 0.627321 },
		{ 0.495761, 0.884615 },
	}
	VertexGroup {
		0,
		0,
		0,
		0,
		0,
		0,
		0,
	}
	Faces 1 18 {
		Triangles {
			{ 0, 1, 3, 3, 4, 1, 1, 2, 4, 2, 4, 5, 3, 4, 6, 4, 5, 6 },
		}
	}
	Groups 1 1 {
		Matrices { 0 },
	}
	MaterialID 0,
	SelectionGroup 0,
}
 
Level 11
Joined
Apr 28, 2008
Messages
696
Thats the different between mesh and editable poly in 3ds max. A mesh is basically a combination of independent poligons, while an editable poly consists of poligons with melted vertices. If you import an mdx into 3ds it is recreated as mesh. Don't know if that can be fixed, but with the right algorithm it should work, I think.
 
Status
Not open for further replies.
Top