• 🏆 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!

Error when converting .obj to .mdl

Status
Not open for further replies.
Level 10
Joined
Sep 16, 2016
Messages
269
Hi guys, can anyone help me with this. I am converting model .obj to .mdl using Milkshape and Guesst's add-in. I had added joint as well, but an error always appears when I tried to open the .mdl file.

< Expected "}", got "," in group "Geoset" in a.mdl >

I have already change the header of .mdl file with Notepad, and find all the { } as well, nothing seems to be missing. It happens with all the files
What is wrong with this?

The attachment contains .obj and .mdl
 

Attachments

  • Potion Model.rar
    17.5 KB · Views: 59
Level 29
Joined
Jul 29, 2007
Messages
5,174
1) You have an empty geoset, delete it (the obj ends with "g", remove it to stop generating an empty geoset).
2) You have the following invalid normal 6 times in the second geoset's normals.
Code:
{ -1.#IND00, -1.#IND00, -1.#IND00 },
This stands for NaN. You have invalid numbers, or the converter fails to read some.
3) The model is tiny, and will not be visible in Magos or the game. Scale it. A lot.
 
Last edited:
Level 10
Joined
Sep 16, 2016
Messages
269
Thank you and sorry for my late reply. Can you tell me a little more specific since Im totally new to modeling area.

I can find the geoset part in text with .mdl file, but i dont see where the "g" part is.

The invalid normals: i had seen and delete them all. Is it part ok now?

Scaling: yeah i can manage this.


The process of my work is as the following: I had the files as .obj. I used milkshae 1.8.5 beta 2 and guesst's export to mdl.1s I imported the thing, Then clicked on joint button, selected all, and clicked at one position (is the joint created now?). I exported it as .mdl, opened with notepad and changed the header.

This was supposed to be an easy model for me to pick on, but I kept getting all kind of trouble :(
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
The g is in the obj file, it stands for geometry. For some reason, the obj ends with g, which starts a new mesh, but it has no information, so you end up with an empty geoset in mdl.
Either delete the g from the obj and then convert, or remove the empty geoset from the mdl, and change the number of geosets in the header to 1.

You can't just go and delete the normals, you need the specified number of normals that your geoset defines (and the order matters too, obviously). For a quick fix, you can just replace those -1.#IND00 with 0, and then recalculate the normals in a program that knows how to do that (Magos? others?).
I can't tell why the converter fails to read/write some of your normals, I don't see any weird numbers in the obj file.

I have no clue how to create joints in Milkshape, or how to properly export them to mdl, haven't used it in many, many years.
 
Status
Not open for further replies.
Top