Hi, new to the site.
Great tutorial, very useful for people like me. However, I have a small problem. When I import the model I exported, its purple. Sorry if I sound like a noob, but I have no experience with 3ds Max. I'm using 2009, if thats a problem. Thanks, and again awesome tutorial.
So I'm not sure if its just me or if there is something else going on, but this flow doesn't seem to be working as smoothly with the latest version of WMV.
To be fair, I think its a problem with WMV rather then your script.
It seems that when I try to export something from WMV using your suggested "export textures > export all + export all to TGA" , Wow Model Viewer sometimes just doesn't export the model, period. Or sometimes it exports the model but then exports all the possible textures for the model, i.e. the skins and meshes for variations that I clearly didn't pick or set up. Naturally then, when I import the model into 3ds max, its comes through all garbled looking with all sorts of extra meshes.
Have anyone encountered this issue? Is a WMV specific issue or is there something else I am missing?
Btw, I have tried this with WMV release versions 252 and 268.
By the way, great work overall with this. As soon as this flow is made a little smoother I can't wait to start cracking on importing WoW into SC2 and making an RTS of it all.
If you're getting extra meshes then they're defined within the model file and not an error with the importer nor WMV. There are a few reasons you may be getting extra meshes:
Character models use extra meshes for different hair/face styles. They also use different meshes for different items which is how capes, boots, bracers and belts are shown on WoW models. Through DBC definitions certain meshes are switched on or off in the game engine, which is why you normally don't see all these meshes at once in game. My only solution for the moment is to just delete the meshes you don't want as annoying as that can be. As has been mentioned earlier, you can grab the combined 'Skin' texture for characters by exporting as .obj in WMV which will create a baked texture of your character in WMV for you. You can discard the .obj model file and use the created texture for your model in 3ds Max.
Particle/Ribbon emitters sometimes have associated meshes. At the moment, since particle/ribbon emitters are not supported, you'll just have to delete these meshes.
Some meshes are used for 'glow' effects. Basically they're not currently converted to any kind of format that the M3 exporter can handle so they should be deleted.
I don't contribute code to WMV so I can't speak for the problems that it has. I've noticed that the export all and export all to TGA options are not perfectly implemented and you can get alot of junk through that method, but it beats having to extract the files from the various MPQ's by hand and convert them yourself. I would like to add character support to the importer so that you have more control over what meshes are imported but I don't have the time to implement such a feature presently.
I appreciate the thanks, though the model format is well documented it is still an intricate task to design an importer that handles the various files involved.
@zzPop: Go
If you're getting extra meshes then they're defined within the model file and not an error with the importer nor WMV.
Yea its definitely not the importer. In fact, I suspected as much. Though I am surprised why WMV doesn't just export out the model that its rendering. It obviously is already plugged into the show/hide flags that you mention, all they would need to do is to pipe that info out to their exporter and voilla, you get a model with only your selected variations included. Meh, but you are right, this is not a script related thing. Maybe I will go to the WMV forums and hound them there to plug their render pipe into their exporter.
That being said, where can I find the documentation for all these filetypes (m2, m3, mdx etc). I would surmise that for people like me (who aren't really going to be using 3ds max for anything other then a middle step, i.e. we wont be doing any model editing) the best flow would come from a separate app (written in C maybe) which will not only be faster, but could be standalone.
I think that if I can get a hold of the documentation, I can at least get started on trying to make something that simplifies this flow. Or at least investigate the issue.
Perhaps the WMV developers can help you, but most likely not. You could theoretically create an M2 file that has the unneeded submeshes absent, but that would mean creating an M2 export library which would be a pain in the arse. What WMV does is read in raw M2 files and interpret the data. When you click extract, you're just extracting the raw M2 and its associated files that WMV interprets with the help of DBC definitions and such. I'm pretty sure exporting to their other formats (.fbx, .obj) would preserve the geometry you have rendered only. Infact from what I've read FBX works pretty well.
The best solution would be to improve my importer script so that it interprets the M2 raw data in a similar fashion to WMV rather than have WMV cater to the importer script. If I get time I'll look into supporting this functionality so that the flow is simplified.
Extensive documentation of the M2 file format can be found at madx's wowdev wiki and within the WoW Model Viewer source code. My source code for the importer may also be of assistance in understanding how to treat the file format. MDX documentation is available at a variety of sources, a google search will help you if you're interested in parsing the format.
Some M3 documentation can be found at libm3, though some of it is out of date. I'll be updating alot of it when I get the chance. There's a 010 template for the 010 Hex Editor available for download that can give you a good idea on how the file format is parsed and can be found in the downloads section.
Yea. I actually went and looked at the source code they have (as well as asked around on their forums). I realized that the functionality was actually initially intended to be supported (in fact, a lot of the busywork that needs to be done for it is already in place in the source code).
I won't go into the specifics here (since this really isn't the place for it) but will say that all that really is left is to build interfaces between some of their existing modules.
I asked around on their forums (see here) about what the status was for this feature, but unfortunately, they got back to me saying that they have put it on indefinite hold since they feel it will violate WoW's TOS (which I didn't really understand) and they don't want to risk implementing a feature which will do so.
I went further and asked them if it would be ok for me to build the functionality for them (since a lot of the heavywork is already in place), but they haven't gotten back to me whether they will be able to host such a feature.
Needless to say, if a more permanent solution is required it might end up having to come from your script's end. Either that, or a whole new system would have to be built (perhaps cutting Max out of the loop) which allows us to have a simpler flow.
Given that MAXscript is a cumbersome beast as far as performance is concerned, it may end up being a worthwhile investment. I guess I'll have to start looking into it.
Agreed, I would prefer a straight conversion from M2 -> M3 using CPP. It would be quick and flow better. You could incorporate the MPQ libraries and so access the WoW MPQ's directly much like WMV does. You could also implement some kind of DDS library which would automatically convert .blp files to the appropriate .dds format. It would still need some kind of interface though, which is why WMV is probably the best way to go. Perhaps you could add an export to M3 function to WMV. Infact that sounds like a great idea, considering the framework is already there for exporting to other formats. You'd still need to remove meshes associated with glows and particles, but since you've got WMV already parsing the model file you could easily choose not to export them out through WMV.
I think that's possibly the best option, a straight export option from WMV. You could have UI associated with it that woud allow you to select what animations to export and such, similar to how my M2 importer works. I'll look into it though I'm not well versed in CPP so I don't think I could code it quickly. I think it could pretty easily be done though for someone that's good with CPP and it'd make things much simpler, rather than having to import the M2 and it's cavalcade of associated files into 3ds Max to export to M3.
Perhaps you could put some of those up for download? I use a mac and cant do all that stuff and im making a fantasy map but however, every fantasy rpg must have well.... fantasy.
Hi! i was tryinhg to convert a cataclysm model to starcraft 2, but i can't because character models and character-based models can't be imported to 3ds max (i.e. thrall, ysera, etc.), it says "unknown property: "name" in undefined". How can i solve this error?
I haven't encountered that error. If you could provide me with the model through PM it'd go a long way to helping me troubleshoot the problem. I don't have direct access to cataclysm so I can't test it myself.
Hi, I got some kind of texture problem with my .m3 file, it seemed to be working when I exported in 3ds Max (picture) but it appears as a blue-purple model (picture) in the editor and ingame. I'm not that familiar with 3ds Max, so I got no clue about what to do. :P
I haven't encountered that error. If you could provide me with the model through PM it'd go a long way to helping me troubleshoot the problem. I don't have direct access to cataclysm so I can't test it myself.
I have problem. I want m2 export by wow-model-veiwer.
In wow-model-viewer, I run <File>-<Export textures> .
and by your tutorial I click the export. but problem is there are no files in <Export Folder>
I don't know How to find my m2, tga files
Hi, new to the site. Great tutorial, very useful for people like me. However, I have a small problem. When I import the model I exported, its purple. Sorry if I sound like a noob, but I have no experience with 3ds Max. I'm using 2009, if thats a problem. Thanks, and again awesome tutorial.
Works fine! It's great!
Thank you!
So I'm not sure if its just me or if there is something else going on, but this flow doesn't seem to be working as smoothly with the latest version of WMV.
To be fair, I think its a problem with WMV rather then your script.
It seems that when I try to export something from WMV using your suggested "export textures > export all + export all to TGA" , Wow Model Viewer sometimes just doesn't export the model, period. Or sometimes it exports the model but then exports all the possible textures for the model, i.e. the skins and meshes for variations that I clearly didn't pick or set up. Naturally then, when I import the model into 3ds max, its comes through all garbled looking with all sorts of extra meshes.
Have anyone encountered this issue? Is a WMV specific issue or is there something else I am missing? Btw, I have tried this with WMV release versions 252 and 268.
By the way, great work overall with this. As soon as this flow is made a little smoother I can't wait to start cracking on importing WoW into SC2 and making an RTS of it all.
@zzPop: Go
This happens to me also.
@zzPop: Go
If you're getting extra meshes then they're defined within the model file and not an error with the importer nor WMV. There are a few reasons you may be getting extra meshes:
I don't contribute code to WMV so I can't speak for the problems that it has. I've noticed that the export all and export all to TGA options are not perfectly implemented and you can get alot of junk through that method, but it beats having to extract the files from the various MPQ's by hand and convert them yourself. I would like to add character support to the importer so that you have more control over what meshes are imported but I don't have the time to implement such a feature presently.
I appreciate the thanks, though the model format is well documented it is still an intricate task to design an importer that handles the various files involved.
Yea its definitely not the importer. In fact, I suspected as much. Though I am surprised why WMV doesn't just export out the model that its rendering. It obviously is already plugged into the show/hide flags that you mention, all they would need to do is to pipe that info out to their exporter and voilla, you get a model with only your selected variations included. Meh, but you are right, this is not a script related thing. Maybe I will go to the WMV forums and hound them there to plug their render pipe into their exporter.
That being said, where can I find the documentation for all these filetypes (m2, m3, mdx etc). I would surmise that for people like me (who aren't really going to be using 3ds max for anything other then a middle step, i.e. we wont be doing any model editing) the best flow would come from a separate app (written in C maybe) which will not only be faster, but could be standalone. I think that if I can get a hold of the documentation, I can at least get started on trying to make something that simplifies this flow. Or at least investigate the issue.
@zzPop: Go
Perhaps the WMV developers can help you, but most likely not. You could theoretically create an M2 file that has the unneeded submeshes absent, but that would mean creating an M2 export library which would be a pain in the arse. What WMV does is read in raw M2 files and interpret the data. When you click extract, you're just extracting the raw M2 and its associated files that WMV interprets with the help of DBC definitions and such. I'm pretty sure exporting to their other formats (.fbx, .obj) would preserve the geometry you have rendered only. Infact from what I've read FBX works pretty well.
The best solution would be to improve my importer script so that it interprets the M2 raw data in a similar fashion to WMV rather than have WMV cater to the importer script. If I get time I'll look into supporting this functionality so that the flow is simplified.
Extensive documentation of the M2 file format can be found at madx's wowdev wiki and within the WoW Model Viewer source code. My source code for the importer may also be of assistance in understanding how to treat the file format. MDX documentation is available at a variety of sources, a google search will help you if you're interested in parsing the format.
Some M3 documentation can be found at libm3, though some of it is out of date. I'll be updating alot of it when I get the chance. There's a 010 template for the 010 Hex Editor available for download that can give you a good idea on how the file format is parsed and can be found in the downloads section.
Good luck :)
@NiNtoxicated01: Go
Yea. I actually went and looked at the source code they have (as well as asked around on their forums). I realized that the functionality was actually initially intended to be supported (in fact, a lot of the busywork that needs to be done for it is already in place in the source code).
I won't go into the specifics here (since this really isn't the place for it) but will say that all that really is left is to build interfaces between some of their existing modules.
I asked around on their forums (see here) about what the status was for this feature, but unfortunately, they got back to me saying that they have put it on indefinite hold since they feel it will violate WoW's TOS (which I didn't really understand) and they don't want to risk implementing a feature which will do so.
I went further and asked them if it would be ok for me to build the functionality for them (since a lot of the heavywork is already in place), but they haven't gotten back to me whether they will be able to host such a feature.
Needless to say, if a more permanent solution is required it might end up having to come from your script's end. Either that, or a whole new system would have to be built (perhaps cutting Max out of the loop) which allows us to have a simpler flow.
Given that MAXscript is a cumbersome beast as far as performance is concerned, it may end up being a worthwhile investment. I guess I'll have to start looking into it.
@zzPop: Go
Agreed, I would prefer a straight conversion from M2 -> M3 using CPP. It would be quick and flow better. You could incorporate the MPQ libraries and so access the WoW MPQ's directly much like WMV does. You could also implement some kind of DDS library which would automatically convert .blp files to the appropriate .dds format. It would still need some kind of interface though, which is why WMV is probably the best way to go. Perhaps you could add an export to M3 function to WMV. Infact that sounds like a great idea, considering the framework is already there for exporting to other formats. You'd still need to remove meshes associated with glows and particles, but since you've got WMV already parsing the model file you could easily choose not to export them out through WMV.
I think that's possibly the best option, a straight export option from WMV. You could have UI associated with it that woud allow you to select what animations to export and such, similar to how my M2 importer works. I'll look into it though I'm not well versed in CPP so I don't think I could code it quickly. I think it could pretty easily be done though for someone that's good with CPP and it'd make things much simpler, rather than having to import the M2 and it's cavalcade of associated files into 3ds Max to export to M3.
Perhaps you could put some of those up for download? I use a mac and cant do all that stuff and im making a fantasy map but however, every fantasy rpg must have well.... fantasy.
Hi! i was tryinhg to convert a cataclysm model to starcraft 2, but i can't because character models and character-based models can't be imported to 3ds max (i.e. thrall, ysera, etc.), it says "unknown property: "name" in undefined". How can i solve this error?
Thanks a lot.
@justdanze: Go
I haven't encountered that error. If you could provide me with the model through PM it'd go a long way to helping me troubleshoot the problem. I don't have direct access to cataclysm so I can't test it myself.
Hi, I got some kind of texture problem with my .m3 file, it seemed to be working when I exported in 3ds Max (picture) but it appears as a blue-purple model (picture) in the editor and ingame. I'm not that familiar with 3ds Max, so I got no clue about what to do. :P
Any help would be appreciated! :>
Ok, i sent you the models through PM :)
Thanks.
wow model viewer r341. http://code.google.com/p/wowmodelviewer/downloads/list
1. download, extract, load creature model (character model not work yet)
2. file -> export -> m3
3. open starcraft II editor, open importer, drag all *.tga into it, close startcraft II editor
4. open starcraft II editor, open importer, drag .m3 into it
hmm... Can't find the file in the MPQ to extract :/
EDIT: Found the file. However the scripts won't run. Think it's saying it can't find a .ini file in a folder :/
@NiNtoxicated01: Go
How am I supposed to get 3DS Max? Thats like $4000...
I also need help as I downloaded your M3 link but I dont see a way to get into the M2 editor or whatever it is? Please help.
Do you know what 3ds max is...? do you know how to use google? >.<
It's not an editor, it's a pluggin to import starcraft 2 and M2 models to 3D Studio max, edit or export them in another format...
@NiNtoxicated01: Go
hello. your post helps me.
I have problem. I want m2 export by wow-model-veiwer. In wow-model-viewer, I run <File>-<Export textures> . and by your tutorial I click the export. but problem is there are no files in <Export Folder> I don't know How to find my m2, tga files
plz..help me