Modcraft - The community dedicated to quality WoW modding!

Wrath of the Lich King Modding => Resources and Tools => Topic started by: Garthog on August 13, 2013, 10:00:21 pm

Title: [TOOL] OBJ to M2 converter + Sources
Post by: Garthog on August 13, 2013, 10:00:21 pm
Hello Modcraft,

I'm happy to share my first "good" tool. A OBJ to M2 converter, which permit to create new M2s !
I have to thank several people for that, so :

Thanks schlumpf, gamh, relaxok, mjollna, LIMEEE, Zim4k, allifeur, and all people who contributed to wowdev wiki.

I don't want this tool to be shared anywhere else than on modcraft for now.

What is currently supported by this tool ?




What is unsupported by this tool ?




How to use ?



OBJ Format




Vertex format : "v X Y Z"
Normals format : "vn X Y Z"
Vertex Textures format : "vt U V"

X Y Z are floats. There must be only one space between v, X, Y and Z, else it'll crash ( my bad ).
Same for U and V.

Face format : "f v1/vt1/vn1 v2/vt2/vn2 v3/vt3/vn3"
Same there, any extra space and it'll crash.

If it crashes with your OBJ file ( which shouldn't happen if those rules are followed ), just post and tell me if there's an error + send me the obj file so I can look at it.

Export settings for 3DS Max

[attachment=2:39gjq86j]objsettingsmax.png[/attachment:39gjq86j]

Export settings for Blender ( old )

(http://i.imgur.com/n19tolQ.jpg)

About Materials

There must be 1 material per group( not more, didn't test about less ). Currently, there is a "ugly" hack as I didn't do the MTL Parsing. The texture name is extracted from the "usemtl" statement inside a .obj file.

Meaning, if you have in your OBJ file "usemtl wood", it won't look in the mtl file for the material wood etc.., it'll just use "wood.blp".
Depending on the software you use, material name could be different than the actual texture filename, so be careful with that, i'll implement that on the following days.

Command Line



It's a command line tool, here's the usage :

OBJtoM2.exe MyFile.obj MyModel pathtomytexturesinthempq

MyModel argument shouldn't have any extension ( else it'll lead to strange filenames )
pathtomytexturesinthempq must have a  at the end.

That's all I think, enjoy, and don't forget to post screens of the things you do with that, and report all bugs you might encounter !

[attachment=3:39gjq86j]OBJtoM2.rar[/attachment:39gjq86j]


UPDATE : Working for WinXP 32 bits version

[attachment=1:39gjq86j]OBJtoM2.rar[/attachment:39gjq86j]

This new version doesn't add texture automatically, there is a built-in console that permit you to add textures / textureunit / renderflag.

It also permits to add reflect on models quite easily.

Garthog

UPDATE : Sources

I do not really have time to work on that anymore. It has more potential than only a bad command line tool. So here are the sources. You're free to change it, though if you do so, you're strongly encouraged to share the modifications.

Such a tool wouldn't exist without the help I got from the community, and previously shared things, so let's continue that mind.

[attachment=0:39gjq86j]OBJtoM2_SOURCE.rar[/attachment:39gjq86j]

-> Proposed todo list :
--> The CMD sucks
--> Make a more generic format to which M2 will be loaded.
--> FBX ?
--> 3D View + QT ?

Have fun & good luck !
Title: Re: [TOOL] OBJ to M2 converter
Post by: Cromon on August 13, 2013, 10:05:59 pm
Like i told you already in skype, nice one! :)
Title: Re: [TOOL] OBJ to M2 converter
Post by: LIMEEE on August 13, 2013, 10:08:25 pm
Glad you released it, And if people have any questions about what to do in max, you could always try to ask me, as i was the one helping Garth to bug test this fantastic tool.
Title: Re: [TOOL] OBJ to M2 converter
Post by: Soldan on August 13, 2013, 10:17:29 pm
Epicness! Thanks a million!
Title: Re: [TOOL] OBJ to M2 converter
Post by: Will on August 13, 2013, 10:50:02 pm
good share!
Title: Re: [TOOL] OBJ to M2 converter
Post by: LIMEEE on August 13, 2013, 11:16:35 pm
To people that have problems with textures being messed up ingame. First of all make sure everything is in a 0.1 range. 2nd nothing can be welded together, Select all Verts and use Break, then export to obj, That should fix the texture problems 90% of the time.
Title: Re: [TOOL] OBJ to M2 converter
Post by: Soldan on August 14, 2013, 02:27:56 am
Converter works brilliantly, and it's really easy to use.

Well explained instructions by Garthog brought me to my goal in no time.

After a little bit of tweaking with renderflags (on my part, for textures - nothing to do with the converter whatsoever) I now have my weed plant ready to be used in two new professions that I am working on.

From blender to game, using this converter it took minutes, literally.

So much more ideal and userfriendly than the typical mdx, mdl, etc..

Thanks again Garthog!

Result:

(http://gyazo.com/12cece9df2ede2a9098d6d814666709e.png)
Title: Re: [TOOL] OBJ to M2 converter
Post by: PhilipTNG on August 14, 2013, 10:57:21 am
Quote from: "Soldan"
(http://gyazo.com/12cece9df2ede2a9098d6d814666709e.png)

Dude, that is epic!!  Goodjob, did you hand model that?  =D
Title: Re: [TOOL] OBJ to M2 converter
Post by: relaxok on August 14, 2013, 11:34:23 am
Outstanding, man.  8-)
Title: Re: [TOOL] OBJ to M2 converter
Post by: Ascathos on August 14, 2013, 01:54:35 pm
Thanks for this!
Title: Re: [TOOL] OBJ to M2 converter
Post by: Arid on August 15, 2013, 09:21:13 am
Anyone mind uploading how my Blender's export should look like? ><
Title: Re: [TOOL] OBJ to M2 converter
Post by: TheBuG on August 15, 2013, 01:55:58 pm
Good job!
Title: Re: [TOOL] OBJ to M2 converter
Post by: Soldan on August 15, 2013, 02:06:56 pm
Here you go Arid,

This works for me!

(http://i.imgur.com/n19tolQ.jpg)

Just remember to edit the usemtl to the name of your blp :)!

Soldan
Title: Re: [TOOL] OBJ to M2 converter
Post by: Soldan on August 15, 2013, 06:02:31 pm
Another result;

I really like the SalamanderHunter (from cataclysm) shoulder, and I've always wanted to have it as a usable shoulderplate - thanks again Garthog!

(http://i.imgur.com/JMDCVlk.png)
(http://i.imgur.com/Mo4EzZC.png)
(http://i.imgur.com/r3RSzVe.png)

Just need to particle clone and readjust the coords now :D

Soldan
Title: Re: [TOOL] OBJ to M2 converter
Post by: Dornussod on August 17, 2013, 01:59:50 am
Waow ! Nice, it works, thanks
Title: Re: [TOOL] OBJ to M2 converter
Post by: fearless_wind on August 17, 2013, 03:33:25 am
Just awesome! First stable converter for static models)) Do you plan to make smth with other formats supporting animations?
Title: Re: [TOOL] OBJ to M2 converter
Post by: Arid on August 17, 2013, 08:40:55 am
Haven't worked on the texture but with the converter I've done a statue of one of my characters I roleplay on in D-X (They won't let me back on their modding team for SOME odd reason)


(http://i.imgur.com/jKN6L1i.jpg)
Title: Re: [TOOL] OBJ to M2 converter
Post by: Garthog on August 17, 2013, 02:38:30 pm
Quote from: "fearless_wind"
Just awesome! First stable converter for static models)) Do you plan to make smth with other formats supporting animations?

Yeah, I plan to work on FBX format !
Title: Re: [TOOL] OBJ to M2 converter
Post by: fearless_wind on August 17, 2013, 03:00:35 pm
Realy good news) So, you need to know that about 15% of  on wowdev wiki about m2 animation sections is wrong. Also one section with bone memory is unexplained at all. Now not  even one converter can convert animations rightly, even the Tigurius' one.
Title: Re: [TOOL] OBJ to M2 converter
Post by: Eliphas on August 17, 2013, 05:54:28 pm
Excellent. Thank you.
Title: Re: [TOOL] OBJ to M2 converter
Post by: PhilipTNG on August 18, 2013, 06:14:53 am
Quote from: "Garthog"
Quote from: "fearless_wind"
Just awesome! First stable converter for static models)) Do you plan to make smth with other formats supporting animations?

Yeah, I plan to work on FBX format !

That'd be cool!!  Though there are a few different variants of it, which program are you using that generates fbx files?  3DS Max 2014 I reckon?
Title: Re: [TOOL] OBJ to M2 converter
Post by: Steff on August 18, 2013, 10:16:40 am
If someone know that dev wiki is wrong,  and even know how ots right.  Make an account and correct it.  This will help coders to do tools.
Title: Re: [TOOL] OBJ to M2 converter
Post by: fearless_wind on August 18, 2013, 06:44:59 pm
Vel told me some information aboutr wrong information on wowdev. Sadly, he doesn't want to contribute to smth except his project. All I know is that one section about bone memory is unexplained on wiki and 15% of animation sections is wrong on wiki.
Title: Re: [TOOL] OBJ to M2 converter
Post by: Steff on August 19, 2013, 06:46:11 am
I know that Vel is not realy a teamplayer.  Make an account and write down what you know ;-)

 it will help to male this tool happen.  We will only get forward if we work all together.
Title: Re: [TOOL] OBJ to M2 converter
Post by: fearless_wind on August 19, 2013, 07:09:09 am
It's not needed anymore because as I know, Vel yesterday agreed to help Garthog with the tool)
Title: Re: [TOOL] OBJ to M2 converter
Post by: Steff on August 19, 2013, 12:17:30 pm
But still it should be documented for the future.
It is always needed.
Title: Re: [TOOL] OBJ to M2 converter
Post by: LIMEEE on August 19, 2013, 12:59:11 pm
Quote from: "Steff"
it will help to male this tool happen.  We will only get forward if we work all together.

I am sorry Steff, but you really did serve me this one, if you say he should update the docs to help "everyone" out, maybe you should make noggit open soruce so actually people that want to add features / fix bugs, can do so, like you said, "We will only get forward if we work all together"
Title: Re: [TOOL] OBJ to M2 converter
Post by: PhilipTNG on August 19, 2013, 01:34:04 pm
Alrighty had some free time so I tried this out, Door's UV's are messed up but I'm gonna delete the door anyway so no biggie.

(http://puu.sh/45vIZ.jpg)
Title: Re: [TOOL] OBJ to M2 converter
Post by: Garthog on August 19, 2013, 02:28:04 pm
Anthony : this issue might be caused by texture coord not being set per vertex. Meaning multiple texture coords for only one vertice ( which is possible in 3DS / any tool, but not in wow. For WoW, one vertex must have only one texture coord )

one solution might be to convert to save to .3DS, then convert 3DS to OBJ with any tool ( not 3ds max ) and use the obj generated.

Another solution someone told me, is using two-sided renderflag ( dunno if it actually corrects it )

Last solution i got, is to detach all vertice
Title: Re: [TOOL] OBJ to M2 converter
Post by: PhilipTNG on August 19, 2013, 03:18:08 pm
Quote from: "Garthog"
Anthony : this issue might be caused by texture coord not being set per vertex. Meaning multiple texture coords for only one vertice ( which is possible in 3DS / any tool, but not in wow. For WoW, one vertex must have only one texture coord )

one solution might be to convert to save to .3DS, then convert 3DS to OBJ with any tool ( not 3ds max ) and use the obj generated.

Another solution someone told me, is using two-sided renderflag ( dunno if it actually corrects it )

Last solution i got, is to detach all vertice

Thanks for the reply, anyway I went and the 3ds thing as you mentioned..... and exported to obj through Max, then imported it into Blender 2.6, exported out as a 3ds, re-imported the 3ds it into blender, re-assigned the texture, export to obj and used your converter, all was well after that.

(http://puu.sh/45yRx.jpg)

(http://puu.sh/45z56.jpg)
Title: Re: [TOOL] OBJ to M2 converter
Post by: ProfVice on August 22, 2013, 04:54:30 pm
Need some help,
first im new to blender and i  havn't 3ds max, so here is my problem:

I Exportet a few models from Warhammer Online
like this
(https://lh5.googleusercontent.com/-ZiLcnTn2jWY/UhYlN3tkVuI/AAAAAAAAAds/ekqqH7Z0Rc8/w958-h671-no/m%25C3%25B6rser.png)

first i have it exportet as an OBJ and convert it to a WMO... and it works perfectly, but a mortar is only a decorative so i beginn to edit the obj and tried to convert the obj as an M2... but it wont work, the converter crashes at Adding Materials.
So i know it must be a mistake of me, but i can't find the mistake and so i need help.

(oh and i tried a few other 3ds and obj to m2/mdx converter... nothing works)
Title: Re: [TOOL] OBJ to M2 converter
Post by: Garthog on August 22, 2013, 07:33:57 pm
You might want to send me the obj file. It's most likely wrong configuration of blender.
Title: Re: [TOOL] OBJ to M2 converter
Post by: ProfVice on August 22, 2013, 09:23:08 pm
Here the Object with all necessary files

https://mega.co.nz/#!FxlAmaTK!BJ1ShQ4oR ... fm5ixwrDp8 (https://mega.co.nz/#!FxlAmaTK!BJ1ShQ4oRDm0M7JRI0E_wDQFEyooXQjsyfm5ixwrDp8" onclick="window.open(this.href);return false;)

edit: New with obj ^^
Title: Re: [TOOL] OBJ to M2 converter
Post by: Garthog on August 22, 2013, 09:36:17 pm
It's just missing the obj file =p, which is the only necessary file !
Title: Re: [TOOL] OBJ to M2 converter
Post by: venumfox on September 05, 2013, 09:30:58 pm
I've got an issue with it, whenever i go to run the program i get an error,

Program can't start because MSVCP110.dll is missing from your computer, I have visual studio redist. installed, and .net 4.0 Am i doing something wrong?
Title: Re: [TOOL] OBJ to M2 converter
Post by: Garthog on September 05, 2013, 09:51:55 pm
You might need visual studio 2012 redistributable
Title: Re: [TOOL] OBJ to M2 converter
Post by: venumfox on September 05, 2013, 10:03:28 pm
Quote from: "Garthog"
You might need visual studio 2012 redistributable

Got it working, but now i'm getting this Error
(http://i391.photobucket.com/albums/oo359/FoXz/Error_zps2b4d64ac.png) (http://s391.photobucket.com/user/FoXz/media/Error_zps2b4d64ac.png.html)

Might have to click on the image to see the big one.
Title: Re: [TOOL] OBJ to M2 converter
Post by: venumfox on September 06, 2013, 01:46:34 am
I've tried remaking the object as well and exporting it with the correct settings then converting it, still not success.
Title: Re: [TOOL] OBJ to M2 converter
Post by: PhilipTNG on September 06, 2013, 02:21:57 am
Quote from: "venumfox"
Quote from: "Garthog"
You might need visual studio 2012 redistributable

Got it working, but now i'm getting this Error
(http://i391.photobucket.com/albums/oo359/FoXz/Error_zps2b4d64ac.png) (http://s391.photobucket.com/user/FoXz/media/Error_zps2b4d64ac.png.html)

Might have to click on the image to see the big one.

Your obj is probably incorrect in some way, I got that error when I first used the tool as well.  I believe it would happen if I exported the obj out from 3D Studio Max,  so now I export it out of Blender, I still make models in Max, but when I do the final things, I get the mesh into blender then export to the final obj from Blender.

My Blender 2.68 obj export settings:
(http://puu.sh/4k4A0.png)

which I got from Gamh's website.

Second is that my model all use one texture only and is all joined together into one piece of geometry(you folks call it geosets) before final export.  This error may also be caused if your mesh is made up of multiple geosets and or use multiple textures... I wouldn't know since I join everything together in the end.
Title: Re: [TOOL] OBJ to M2 converter
Post by: venumfox on September 06, 2013, 02:37:21 am
Thank for the information, I've got a new error now.

(http://i391.photobucket.com/albums/oo359/FoXz/newerror_zps63db61fb.jpg) (http://s391.photobucket.com/user/FoXz/media/newerror_zps63db61fb.jpg.html)

The object is very basic, it's a cube, a 25x25x25 Cube, i'm not sure how large that is in-game as I'm just making this as a test, when i go into 3ds, i just make a cube, export it as an OBJ, import it into blender, export it using the setting provided by Anthony, would uploading my Max file help?
Title: Re: [TOOL] OBJ to M2 converter
Post by: PhilipTNG on September 06, 2013, 04:31:18 am
Quote from: "venumfox"
Thank for the information, I've got a new error now.

(http://i391.photobucket.com/albums/oo359/FoXz/newerror_zps63db61fb.jpg) (http://s391.photobucket.com/user/FoXz/media/newerror_zps63db61fb.jpg.html)

The object is very basic, it's a cube, a 25x25x25 Cube, i'm not sure how large that is in-game as I'm just making this as a test, when i go into 3ds, i just make a cube, export it as an OBJ, import it into blender, export it using the setting provided by Anthony, would uploading my Max file help?

I'm curious about what you're putting into the command line.

why does it end with just a simple  ?   Do you plan to put your texture files at the front of the MPQ file rather than in a folder?  If so, don't put anything,  just end it off with the name you are going to have your m2 and skin files be called, as your image says TheGrassC  which would output files named TheGrassC.m2 and TheGrassC00.skin  .

I made a tutorial on it a long while ago but I never released it due to a few friends not being able to figure it out on their own without my direct assistance.  You can try to view it and see if you can pick up any pointers from it:

http://www.youtube.com/watch?v=ae2k6D5JZkA (http://www.youtube.com/watch?v=ae2k6D5JZkA" onclick="window.open(this.href);return false;)

Best to watch it on youtube since you can make it bigger or fullscreen where as the youtube tag here for videos disables the fullscreen function.

Goodluck.
Title: Re: [TOOL] OBJ to M2 converter
Post by: venumfox on September 06, 2013, 10:41:15 am
Quote from: "AnthonysToolbox"
Quote from: "venumfox"
Thank for the information, I've got a new error now.

(http://i391.photobucket.com/albums/oo359/FoXz/newerror_zps63db61fb.jpg) (http://s391.photobucket.com/user/FoXz/media/newerror_zps63db61fb.jpg.html)

The object is very basic, it's a cube, a 25x25x25 Cube, i'm not sure how large that is in-game as I'm just making this as a test, when i go into 3ds, i just make a cube, export it as an OBJ, import it into blender, export it using the setting provided by Anthony, would uploading my Max file help?

I'm curious about what you're putting into the command line.

why does it end with just a simple  ?   Do you plan to put your texture files at the front of the MPQ file rather than in a folder?  If so, don't put anything,  just end it off with the name you are going to have your m2 and skin files be called, as your image says TheGrassC  which would output files named TheGrassC.m2 and TheGrassC00.skin  .

I made a tutorial on it a long while ago but I never released it due to a few friends not being able to figure it out on their own without my direct assistance.  You can try to view it and see if you can pick up any pointers from it:

http://www.youtube.com/watch?v=ae2k6D5JZkA (http://www.youtube.com/watch?v=ae2k6D5JZkA" onclick="window.open(this.href);return false;)

Best to watch it on youtube since you can make it bigger or fullscreen where as the youtube tag here for videos disables the fullscreen function.

Goodluck.

Got it first try, thank you very much for the tutorial! (: Except i messed up on rotating the file, so my gameobject is laying on it's side xD oh well it's 2:00am been working on it for hours. Thanks again
Title: Re: [TOOL] OBJ to M2 converter
Post by: PhilipTNG on September 06, 2013, 11:25:16 am
Quote from: "venumfox"
Got it first try, thank you very much for the tutorial! (: Except i messed up on rotating the file, so my gameobject is laying on it's side xD oh well it's 2:00am been working on it for hours. Thanks again

I'm glad you got your issue resolved and was able to make use of my video......unlike several of my mates :grumble..grumble...grum...:  XD......well you can still rotate the model manually in Noggit atleast. hehe.
Title: Re: [TOOL] OBJ to M2 converter
Post by: Garthog on September 06, 2013, 01:31:58 pm
Yeah I'm sorry the tool isn't very convenient at first use. It's still a heavy work in progress. I'm not really deving on it for now, since I have very important exam to pass <-<. However once it's done, I will probably release better versions !

Garthog
Title: Re: [TOOL] OBJ to M2 converter
Post by: venumfox on September 06, 2013, 06:26:51 pm
Quote from: "Garthog"
Yeah I'm sorry the tool isn't very convenient at first use. It's still a heavy work in progress. I'm not really deving on it for now, since I have very important exam to pass <-<. However once it's done, I will probably release better versions !

Garthog

It gets the job done, my mistakes were mine so no fault to you there, thank you for a great tool
Title: Re: [TOOL] OBJ to M2 converter
Post by: Steff on September 07, 2013, 11:10:00 am
And it would be nice ti someone that get amodel converted rightwould write an tutorial about this task. Thats what this site is for. getting and giving help.
Title: Re: [TOOL] OBJ to M2 converter
Post by: PhilipTNG on September 07, 2013, 07:41:07 pm
Quote from: "Steff"
And it would be nice ti someone that get amodel converted rightwould write an tutorial about this task. Thats what this site is for. getting and giving help.

It is easy to convert, if you're a 3D person.  The main issue is that most people who try to use it don't know anything about 3D modeling and there's a good chance they are just ripping a 3D model from somewhere and then trying to convert it into an m2 with this amazing program.

If the person is making their own 3D Models in Blender, then everything will be easy, if they aren't, then naturally some things will occur, from my tests the prepared file must all be in one geoset and must only use one texture for the entire geoset which is easy enough to do if you're making your own models but if you're ripping a model, then there's a good chance it has multiples and the person probably doesn't know how to combine them >.<
Title: Re: [TOOL] OBJ to M2 converter
Post by: Garthog on September 07, 2013, 08:02:36 pm
You can have several geoset too. All must have one texture !
Title: Re: [TOOL] OBJ to M2 converter
Post by: PhilipTNG on September 08, 2013, 02:15:16 am
Quote from: "Garthog"
You can have several geoset too. All must have one texture !

Oh you're right!  xD.. It's just a natural habbit for me to merge together all things that have the same textures, since I've done NFS and Sims mods prior and it was best to merge in those games, otherwise some of the geometry is drawn in a really funky manner at times. ^_^
Title: Re: [TOOL] OBJ to M2 converter
Post by: PhilipTNG on October 02, 2013, 05:19:20 pm
Bump?... xD,   but anyway thanks to this amazing tool I finally got around to doing simple basic weapons. ^_^, thanks to you and Soldan. ^^

(http://puu.sh/4FJl4.jpg)
Title: Re: [TOOL] OBJ to M2 converter
Post by: kilislauter on October 06, 2013, 12:51:49 am
this program does not work on 32bit?
Title: Re: [TOOL] OBJ to M2 converter
Post by: PhilipTNG on October 06, 2013, 05:26:46 am
Quote from: "kilislauter"
this program does not work on 32bit?

You do not use it by double clicking it. you need to run it in command line.
Title: Re: [TOOL] OBJ to M2 converter
Post by: kilislauter on October 06, 2013, 04:31:12 pm
thanks for the reply.

I tried to do it from CMD not working

Picture:

(http://img443.imageshack.us/img443/6949/crgy.jpg)
Title: Re: [TOOL] OBJ to M2 converter
Post by: Garthog on October 11, 2013, 03:26:42 am
Little update, you shouldn't get that 32 bit error with the new version I just posted, but you should install Microsoft Visual Studio 2010 Redistributable
Title: Re: [TOOL] OBJ to M2 converter
Post by: kilislauter on October 19, 2013, 04:47:47 am
thank you very much
Title: Re: [TOOL] OBJ to M2 converter
Post by: StafordDev on January 02, 2014, 08:25:12 am
I get error when loading a *.obj file:
Title: Re: [TOOL] OBJ to M2 converter
Post by: eeduu on January 03, 2014, 09:39:33 pm
the new converter are confused... how to add textunit? or flags? please help..

pd: not command (command easy) but dont undersantd, nice first converter is more better!!

pd: error 0xc000007b antiguiti converter..
Title: Re: [TOOL] OBJ to M2 converter
Post by: kojak488 on January 04, 2014, 08:49:15 pm
Quote from: "StafordDev"
I get error when loading a *.obj file:

Check your object export options in your modelling program?
Title: Re: [TOOL] OBJ to M2 converter
Post by: Steff on January 05, 2014, 06:49:46 am
I did a simple box in 3d studio and even did not get this converted.
I tried with different settings but no goal.

It will clearly work if i go the blender import export way.
But this js no usable way of doing it for bigger projects.
Becaus it is time consuming unnecessary work.

Thats why i search a way to direct convert 3d s exports.
Title: Re: [TOOL] OBJ to M2 converter
Post by: PhilipTNG on January 05, 2014, 11:08:06 am
Quote from: "Steff"
I did a simple box in 3d studio and even did not get this converted.
I tried with different settings but no goal.

It will clearly work if i go the blender import export way.
But this js no usable way of doing it for bigger projects.
Becaus it is time consuming unnecessary work.

Thats why i search a way to direct convert 3d s exports.

If you spend 10~20 hours on "Bigger Projects" as you say, what's 3-5 minutes to drop your model into blender and back out as an OBJ gonna cost?  I personally go from Cinema 4D to Blender then to his converter, I spend anywhere between 5-20 hours on a model project and spend 2 minutes getting an obj out of it from blender.

You're blowing it out of proportion.  And again, what is 2 minutes to your original total work time?  Nothing at all, there is no need to complain about it as it's not costing you any net time compared to your original work duration.
Title: Re: [TOOL] OBJ to M2 converter
Post by: Steff on January 05, 2014, 05:43:15 pm
Thanks very helpfull.  :)
Title: Re: [TOOL] OBJ to M2 converter + Sources
Post by: Garthog on January 21, 2014, 01:32:41 pm
Update : Sources available on first page.
Title: Re: [TOOL] OBJ to M2 converter + Sources
Post by: Alastor on January 26, 2014, 06:51:48 pm
Totaly bored so i started to making a Windows form of this :D
Title: Re: [TOOL] OBJ to M2 converter + Sources
Post by: fearless_wind on January 27, 2014, 10:18:21 am
Really great. Dahaga, if you're interested in making a GUI for CMD modding tools. I suggest you to make a tool with a lot of functions based on opensource things. For example you can merge lightadder, particle adder, other editors in a one big tool based on the same UI. If you're interested I can help you with graphics part and with button placement + concepts.
Title: Re: [TOOL] OBJ to M2 converter + Sources
Post by: Alastor on January 27, 2014, 05:10:53 pm
Exactly I'm starting to get it
This playing with microsoft visual studio
(and any type of windows form making programs)
so i just taken this like my first project and I hope I learn from this new things

But after all .. Any help is welcome  ... I'm just trying to upgrade this tool

For now the bigest enemy is source Code :D

PS: Skype "**********"
Title: Re: [TOOL] OBJ to M2 converter + Sources
Post by: shonik on January 29, 2014, 09:25:35 pm
I have the same problem as venumfox.
I tried like 10 times, i checked my export options in blender, i tried with differents versions of blender and i still got this error.
My model is a simple cube.
And the Anthony's video on this subject was deleted (his youtube channel also btw).
Anyone have an idea on how to fix it ? :)
Title: Re: [TOOL] OBJ to M2 converter + Sources
Post by: Alastor on February 25, 2014, 10:09:56 pm
For 1st you are typing
"OBJtoM2.exe Cube.obj Cube.m2 test"
 but dat .m2 have nothing to do here
so try "OBJtoM2.exe Cube.obj Cube test"
Title: Re: [TOOL] OBJ to M2 converter + Sources
Post by: Filipsons on February 26, 2014, 12:57:39 am
Yep, Dahaga was right.
And I found other OBJtoM2.exe versions (maybe moded) and this tools make some problems for me.
I have OBJtoM2.exe with size: 82Kb and it works. Check your file size.
Title: Re: [TOOL] OBJ to M2 converter + Sources
Post by: Alastor on March 04, 2014, 05:24:55 pm
Some kind of lame video from progress :D
i'm starting to be close
http://www.twitch.tv/razhana/b/508210230
Title: Re: [TOOL] OBJ to M2 converter + Sources
Post by: Skarn on March 04, 2014, 05:33:49 pm
Looks cool. But it didn't manage to save anything. :)
Title: Re: [TOOL] OBJ to M2 converter + Sources
Post by: Alastor on March 04, 2014, 05:51:27 pm
it's only preview for yet there is nothing to download ;)
Title: Re: [TOOL] OBJ to M2 converter + Sources
Post by: Alastor on April 09, 2014, 06:17:25 pm
I'm going to release my actual work because i'm stuck on writing to hex code of M2 files through converter instead of 010 editor.
- i didn't stop in progress -
Title: Re: [TOOL] OBJ to M2 converter + Sources
Post by: Skarn on April 09, 2014, 07:55:19 pm
Thanks a lot! I gonna look at it now.
Title: Re: [TOOL] OBJ to M2 converter + Sources
Post by: Chase on June 12, 2014, 03:04:47 am
Does anyone know how to make the texture use what the DBC gives it? (Weapons for example)
Title: Re: [TOOL] OBJ to M2 converter + Sources
Post by: Ascathos on June 12, 2014, 01:06:25 pm
Quote from: "Chase"
Does anyone know how to make the texture use what the DBC gives it? (Weapons for example)
Texture Types 2
Title: Re: [TOOL] OBJ to M2 converter + Sources
Post by: Chase on June 12, 2014, 02:20:35 pm
Quote from: "Ascathos"
Quote from: "Chase"
Does anyone know how to make the texture use what the DBC gives it? (Weapons for example)
Texture Types 2
Is there any way to do it with this tool?
Title: Re: [TOOL] OBJ to M2 converter + Sources
Post by: Alastor on June 12, 2014, 03:53:55 pm
And why dont you have a look on our Tools .....

viewtopic.php?f=59&t=784 (http://modcraft.io/viewtopic.php?f=59&t=784" onclick="window.open(this.href);return false;)
Title: Re: [TOOL] OBJ to M2 converter + Sources
Post by: jacburn1 on July 16, 2014, 07:20:05 am
I'm trying to add reflection to my models but am unsure how exactly this works. I've tried using the XP version that claims to make this easy, but the documentation in the thread only refers to the original version. That, and the XP version doesn't work well on my Windows 7 x64 here, it seems to error and just continuously types out and spams the box, causing it to become unusable.

Anyone got ideas or able to help?
Title: Re: [TOOL] OBJ to M2 converter + Sources
Post by: Alastor on July 16, 2014, 09:58:47 am
Reflecting supported by those "ArmorReflectGold2.blp" etc ...

needs to have his Own mesh in model with options to reflecting and name of used reftecting texture

http://www.pxr.dk/wowdev/wiki/index.php?title=M2 (http://www.pxr.dk/wowdev/wiki/index.php?title=M2" onclick="window.open(this.href);return false;)
Title: Re: [TOOL] OBJ to M2 converter + Sources
Post by: jacburn1 on July 18, 2014, 02:00:44 am
I've tried to make sense of what to do and have done several different tries, all ending in failure. Perhaps a hint at what exactly needs to be done for this to work?
Title: Re: [TOOL] OBJ to M2 converter + Sources
Post by: Chase on July 19, 2014, 10:21:38 pm
Quote from: "jacburn1"
I've tried to make sense of what to do and have done several different tries, all ending in failure. Perhaps a hint at what exactly needs to be done for this to work?

Same here. Really would like some guidance of what to type.
I use "ItemObjectcomponentsweaponarmorreflect3.blp"
and even if I say "y" to "Is it a reflect?" it just sets that texture as the objects texture instead of a reflect.

EDIT: Figured this out, you have to create two different render flags.
Title: Re: [TOOL] OBJ to M2 converter + Sources
Post by: Mjollna on July 31, 2014, 06:19:50 pm
Hi there !

Thanks for the converter Garthog, it works really well :)

Some tips for people having problems/errors with 3ds max :

- Before converting, open the obj file in a text editor.
- Remove every comment (lines starting with "#")
- Remove lines starting with "s"
- Remove every empty line
- Change texture names (material used line) with the name of the actual texture without extension
- Mass replace lines starting with "v  + 2 spaces" by "v + 1 space"

Conversion should run smoothly with these settings.
Title: Re: [TOOL] OBJ to M2 converter + Sources
Post by: Putte08 on October 01, 2014, 12:33:12 am
Smoothing never works out well for me. When I export my model from 3ds Max it always ends up with no smoothing, even though it has smoothing in 3ds Max.
So what do you guys do to your models before exporting it to .obj, if anything?

Edit:
Nevermind, solved it. Changed export settings from those posted in the thread.
Title: Re: [TOOL] OBJ to M2 converter + Sources
Post by: Putte08 on October 01, 2014, 11:55:05 pm
What can I do to fix UV's that get severely distorted? I have tried most things said in the thread like detaching all verts and exporting from 3ds Max to blender and then converting to m2.

I have tried to fix this for several hours, I am on the verge of exploding with frustration. Anyone that could help out?

It's so strange, it shows up completely fine in modelviewer (as it should) but ingame it becomes wrong.
(http://i.gyazo.com/bd656efe26549053418af0f38a6cb4c6.png)
(http://i.gyazo.com/0a40ab2e8123a97831598160e37ec359.png)
Title: Re: [TOOL] OBJ to M2 converter + Sources
Post by: phantomx on October 02, 2014, 12:26:59 am
Quote from: "Putte08"
What can I do to fix UV's that get severely distorted? I have tried most things said in the thread like detaching all verts and exporting from 3ds Max to blender and then converting to m2.

I have tried to fix this for several hours, I am on the verge of exploding with frustration. Anyone that could help out?

It's so strange, it shows up completely fine in modelviewer (as it should) but ingame it becomes wrong.
(http://i.gyazo.com/bd656efe26549053418af0f38a6cb4c6.png)
(http://i.gyazo.com/0a40ab2e8123a97831598160e37ec359.png)


ModelViewer and in-game are two different things... also what version of WMV are you using?
Title: Re: [TOOL] OBJ to M2 converter + Sources
Post by: Putte08 on October 02, 2014, 04:14:47 pm
Quote from: "phantomx"
Quote from: "Putte08"
What can I do to fix UV's that get severely distorted? I have tried most things said in the thread like detaching all verts and exporting from 3ds Max to blender and then converting to m2.

I have tried to fix this for several hours, I am on the verge of exploding with frustration. Anyone that could help out?

It's so strange, it shows up completely fine in modelviewer (as it should) but ingame it becomes wrong.
(http://i.gyazo.com/bd656efe26549053418af0f38a6cb4c6.png)
(http://i.gyazo.com/0a40ab2e8123a97831598160e37ec359.png)


ModelViewer and in-game are two different things... also what version of WMV are you using?

I am using 0.7.0.1

I solved the problem but I get occasional lag spikes from this model for no reason. Dips down from stable 60fps+ to 30fps for a couple of seconds when I get close to it.

I welded all verts on the model, made sure there were no geosets and made the UV-map all in one or whatever. (It's talked about earlier in the thread how WoW can't handle multiple texture channels).

From 3ds Max I exported to .obj with the blender template
I opened the .obj in Blender and exported it to .3ds
I opened the .3ds in Blender and exported to .obj
Then .obj to .m2, then 010editor for the two sided textures and opacity.

Damn glad I found a solution eventually.
(http://i.gyazo.com/65600c6e249b39f69192615f12980c4b.png)
Title: Re: [TOOL] OBJ to M2 converter + Sources
Post by: Putte08 on October 18, 2014, 07:28:22 pm
Edit: Eventually found out about how to weld normals. That was the source of this problem. Works perfect now!

I just can't get past these problems that I am getting while converting my models from 3ds max. I have tried so many different things now that I simply don't know what to do anymore. I really need help by someone else.

I just end up with 3 different model variations in-game:

1* Distorted UV map but working smooth. Smooth works here because the verts are welded/merged. But the UV on this one gets screwed up because of multiple texture coordinates per vertex.
Link to image: http://i.gyazo.com/64758ef3ce48640e75bae13e514f2177.png

2* Working UV map but no smooth. Smooth doesn't work here because all the verts have been detached/broken. UV map works on this one because all the verts have been broken (edit poly, break).
Link to image: http://i.gyazo.com/18df75636d4b1efc6a0a70007561fbec.png

3* Working UV and half working smooth. The UV seams/edges doesn't smooth out and makes huge ugly lines on the model, which makes WoW to create shadows at that spot.
Link to image: http://i.gyazo.com/88f4a519d7a3f0879e58749922a5f539.png

What can I do to make it correct in-game? I can spot the problems but I have no clue what I can do to stop getting them.
The last thing I can try, together with detached/broken verts where there is no smooth, would be this one thing which is written in the OP. But I don't know how to do normals welding and I have not found anything on google about it.
"Smoothing must be done through "Normals welding" ( and not vertices welding ). This is 3DS Max option, idk about blender."

Perhaps whoever is kind enough to help me out knows how to do normals welding, maybe it could be the solution to my problems.
Title: Re: [TOOL] OBJ to M2 converter + Sources
Post by: Cronic26101 on December 17, 2014, 09:30:54 am
im getting dll errors
Title: Re: [TOOL] OBJ to M2 converter + Sources
Post by: quillerk on January 26, 2015, 08:35:09 am
Can someone please change the source code for making it convert to Cata version model instead of LK ?
or at least... tell me what template i should work on to do it myself ?

looks like i just dont know what fields should i change ( e.g. in 010 editor)
to change the model version from LK to Cata ( we all know converters that do Cata->LK)
but in this case i need a reverse program
Title: Re: [TOOL] OBJ to M2 converter + Sources
Post by: evayxdt2 on June 04, 2015, 07:55:08 am
I failed to convert,it shows debug error,
and the command line shows that:
Unrecognized token during OBJ parsing : #
Unrecognized token during OBJ parsing : #
Unrecognized token during OBJ parsing : mtllib
Unrecognized token during OBJ parsing : #
Unrecognized token during OBJ parsing : #
Unrecognized token during OBJ parsing : #

the obj  is exported from 3dmax 2010,
anybody could help me?
Title: Re: [TOOL] OBJ to M2 converter + Sources
Post by: Skarn on June 04, 2015, 08:08:51 am
Export it with Blender. Stop using improper software, most wow modding tools are able to parse models that are written by blender. Or even if you want to use 3ds max for modelling, resave your models in blender before converting.
Title: Re: [TOOL] OBJ to M2 converter + Sources
Post by: evayxdt2 on June 05, 2015, 04:27:49 am
Quote from: "Skarn"
Export it with Blender. Stop using improper software, most wow modding tools are able to parse models that are written by blender. Or even if you want to use 3ds max for modelling, resave your models in blender before converting.
I see.Thanks,I'll have a try.
Title: Re: [TOOL] OBJ to M2 converter
Post by: evayxdt2 on June 05, 2015, 10:23:53 am
Quote from: "eeduu"
the new converter are confused... how to add textunit? or flags? please help..

pd: not command (command easy) but dont undersantd, nice first converter is more better!!

pd: error 0xc000007b antiguiti converter..
I'm sorry I got the same problem,I'm a xp 32 user.
it shows:
Press "i" to get info about the model
Press "te" to add a texture
Press "tu" to add a textureUnit
Press "r" to add a renderflag
Press "q" to exit and save file

when i just press "q",I got the m2 and skin files successful.
then I put them into the MPQ files, and entered the game,
the sword can't be seen , model of this sword lost.
I don't know the synatx,

Fortunately,I went to a net point ,to run the 64 program in  win7 64 system,
it works well in games.

Is there someone knows the synatx for the program of 32bit?
-----------------------------------------------------------------------------
Well,I worked it my self. :D
Title: Re: [TOOL] OBJ to M2 converter + Sources
Post by: Helnesis on July 07, 2015, 10:38:59 pm
Ok, my bad...

Is okay, flag texture problem's.

solved!
Title: Re: [TOOL] OBJ to M2 converter + Sources
Post by: xJKz on August 30, 2015, 01:18:49 pm
Ahm, anybody know how to add reflect to the weapon ? Not the entiere model, but just the blade of a sword by exemple ? Thanks in advance.
Title: Re: [TOOL] OBJ to M2 converter + Sources
Post by: Barthorgg on June 01, 2016, 10:15:55 pm
Again, thank you for this awesome tool !

But actually, I might have a serious problem...
Everything works fine, the files are converted, saved... But I can't find them ! Where are they ? Absolute mystery.

Could someone help me, please ?

Here is a screenshot of the prompt, everything seems to be fine, I guess ?
(http://image.noelshack.com/fichiers/2016/22/1464812135-omaigadde.png)
Title: Re: [TOOL] OBJ to M2 converter + Sources
Post by: Alastor on June 02, 2016, 02:42:04 am
Files are created in root from where is executable application running
Title: Re: [TOOL] OBJ to M2 converter + Sources
Post by: Barthorgg on June 02, 2016, 12:57:55 pm
Yeah, that's the problem !
Files should be created where the executable is, but there is nothing, even if I try to run cmd on Admin.

EDIT: Found it. Thanks for the help :) (Found it in "C:UserYourname")
Title: Re: [TOOL] OBJ to M2 converter + Sources
Post by: byDash on February 08, 2017, 09:53:52 pm
We managed to convert the .obj to .m2, and converting the .m2 to Cata, we were able to convert .m2 to .m2i to open it in Blender.
The problem now is that when importing .m2 to WoW, the model appears invisible, no green textures or anything.

Any ideas or solutions?
Title: Re: [TOOL] OBJ to M2 converter + Sources
Post by: Makpptfox on February 09, 2017, 07:35:23 am
Do you have the .skins ?
Title: Re: [TOOL] OBJ to M2 converter + Sources
Post by: byDash on February 10, 2017, 11:56:04 pm
Quote from: "Makpptfox"
Do you have the .skins ?
Yes, but only one. It is normal?
Title: Re: [TOOL] OBJ to M2 converter + Sources
Post by: Ascathos on February 11, 2017, 12:14:58 am
Quote from: "byDash"
Quote from: "Makpptfox"
Do you have the .skins ?
Yes, but only one. It is normal?
Depending on number of mesh and bones, yes.
Usual, m2 only contain one .skin file - larger ones with more anims contain up to 4 skins (commonly character models).
Title: Re: [TOOL] OBJ to M2 converter + Sources
Post by: byDash on February 11, 2017, 07:29:18 pm
So I do not think the model is invisible because of that ...
Title: Re: [TOOL] OBJ to M2 converter + Sources
Post by: Gratural [Харгард] on February 12, 2017, 02:52:04 am
Somebody have sources of  this tool? Or can recompile it with few features:
- work with double spaces into obj file (3ds max's damn format)
- replacing used materials from mtl file
- set WrapX+WrapY textureflag
Title: Re: [TOOL] OBJ to M2 converter + Sources
Post by: Garthog on December 02, 2017, 10:56:00 pm
I will upload it one of these days, I might still have it on some hdd.
Title: Re: [TOOL] OBJ to M2 converter + Sources
Post by: Mjollna on December 11, 2017, 09:20:04 pm
It happens I do have it on my HD.
Here you go ! :)