• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

model crashes game on render

Status
Not open for further replies.
Level 1
Joined
Dec 3, 2011
Messages
2
well, today i made a simple model by editing the rifleman model and skin in blender
extracted mpq>
used war3 mdx to obj converter by jeff gee and used blplab for skin to Sniper.tga>
imported to blender>
modified the gun making it slim and longer>
uv mapped it>
exported the new model as Sniper.obj (deleted .mtl file for it)>
photo shopped skin a bit>
blplab the skin to Sniper.blp and used Obj and 3dsToMdxConverter on the Sniper.obj>
then used MdlxConv on the Sniper.mdx and _Portrait.mdx to make them Sniper.mdl and _Portrait.mdl>
changed the skin location in the .mdl's to "customUnits\Sniper\Sniper.blp">
the deleted old mdx's and converted the edited .mdl's back to .mdx>
imported to war3 editor as follows...

File name Type size Full Path
Sniper_Portrait.mdx model 13 Sniper_Portrait.mdx
Sniper.mdx model 22 Sniper.mdx
Sniper.blp Image/Texture 60 customUnits\Sniper\Sniper.blp
>
then when i make the unit in object editor for model i go to "art - modelfile" and select import then Sniper.mdx then when it closes it changes to custom (not import) and says sniper.mdl, and i saw this and said OK, bug i guess and when i start the test for the map it works but once it tries to render the new unit (i move my screen to where i could see the unit) it crashes here is error report

This application has encountered a critical error:

FATAL ERROR!

Program: c:\Programfiles\warcraft iii\War3.exe
Exception: 0xC0000005 (ACCESS_VIOLATION) at 0023:6F7B75B9

The instruction at '0x6F7B75B9' referenced memory at '0x13ABC01C'.
The memory could not be 'read'.

press OK to terminate the application.

i also tried importing .mdl version and using those but then the unit is just invisible.

the models and textures are below
skin
model.mdl
model.mdx
model_portrait.mdl
model_portrait.mdx

please tell me what is wrong and how i can fix this.

thx

EDIT: i doubt it helps but i am running vista 64 bit
 
There must've been some problem with the conversions. As far as I know, there aren't any successful blender exporters (yet, one is being developed) that work on the latest version. (warblender works on an older version, and sooda's only exports static meshes as far as I know)

I recommend that you look for other modeling tools to use until (or if) the blender exporting tool gets finished.
 
Level 8
Joined
Feb 21, 2005
Messages
110
Don't have too much time, but should be enough for a quick check of the mdl...

First mistake:
Your geoset refers to one group:
Code:
	Groups 1 1 {
		Matrices { 3 },
	}

But the only object you have is:

Code:
Bone "top02" {
	ObjectId 0,
	GeosetId 0,
	GeosetAnimId None,
}

Make that 3 a 0 like that:

Code:
	Groups 1 1 {
		Matrices { 0 },
	}

That doesn't fix it though.

Second mistake:
Your amount of vertices is:
Code:
Vertices 566
So the highest index of a Vertex can be 565 (since the first one is number 0).

The triangles disagree:
Code:
Faces 1 1350 {
		Triangles {
			{ 0, -1, -3113, 3, -1, -1, [...] },
	}
}
Last time I checked, negative numbers were not between 0 and 565.
And a triangle using the same vertex twice (the 3, -1, -1 one) wouldn't be a triangle, so that would break as well even if there were negative vertex indexes.

I never created WC3 models with any "real" modeling tool, so I can't help you with the converters and stuff. All I can tell you is that whatever your converter (or modeling program) did there was bullshit, if you excuse my choice of words.

Edit:
If you'd wanna invest some time, you could convert the model obj, open both obj and mdl and somehow work the triangles from obj into the mdl.
Quickest way would probably be to write a small parser for the obj that takes all triangles and writes them down the way mdl needs them... if you can do stuff like that.
They're called faces in obj.
So if you have a normal square made of 2 triangles it could look like that in mdl:

Code:
Faces 1 6 {
		Triangles {
			{ 0, 1, 2, 1, 2, 3 }
	}
}
And like that in obj:
Code:
f 0 1 2
f 1 2 3
(if I remember correctly, I only worked with obj once)
 
Last edited:
Level 1
Joined
Dec 3, 2011
Messages
2
lol oh well

Don't have too much time, but should be enough for a quick check of the mdl...

First mistake:
Your geoset refers to one group:
Code:
	Groups 1 1 {
		Matrices { 3 },
	}

But the only object you have is:

Code:
Bone "top02" {
	ObjectId 0,
	GeosetId 0,
	GeosetAnimId None,
}

Make that 3 a 0 like that:

Code:
	Groups 1 1 {
		Matrices { 0 },
	}

That doesn't fix it though.

Second mistake:
Your amount of vertices is:
Code:
Vertices 566
So the highest index of a Vertex can be 565 (since the first one is number 0).

The triangles disagree:
Code:
Faces 1 1350 {
		Triangles {
			{ 0, -1, -3113, 3, -1, -1, [...] },
	}
}
Last time I checked, negative numbers were not between 0 and 565.
And a triangle using the same vertex twice (the 3, -1, -1 one) wouldn't be a triangle, so that would break as well even if there were negative vertex indexes.

I never created WC3 models with any "real" modeling tool, so I can't help you with the converters and stuff. All I can tell you is that whatever your converter (or modeling program) did there was bullshit, if you excuse my choice of words.

Edit:
If you'd wanna invest some time, you could convert the model obj, open both obj and mdl and somehow work the triangles from obj into the mdl.
Quickest way would probably be to write a small parser for the obj that takes all triangles and writes them down the way mdl needs them... if you can do stuff like that.
They're called faces in obj.
So if you have a normal square made of 2 triangles it could look like that in mdl:

Code:
Faces 1 6 {
		Triangles {
			{ 0, 1, 2, 1, 2, 3 }
	}
}
And like that in obj:
Code:
f 0 1 2
f 1 2 3
(if I remember correctly, I only worked with obj once)


lol i dont really know what u said so ill just drop it and try again from scratch, but i did have some faves of the model overlapping each other, as in 2 faces i the exact same position (X, Y, Z, Xrotation, Yrotation, Zrotation)
 
Status
Not open for further replies.
Top