Modcraft - The community dedicated to quality WoW modding!

Content creation => Texturing and 2D Art => Topic started by: doresain on June 05, 2011, 08:13:20 pm

Title: [question]edit m2 with blender
Post by: doresain on June 05, 2011, 08:13:20 pm
i find this http://www.ridiculousx.net/Projects/M2Mod.aspx (http://www.ridiculousx.net/Projects/M2Mod.aspx" onclick="window.open(this.href);return false;)
it should convert m2 to m2i (editable with blender) and back but i can't  find a binary m2mod.exe and i can't compile it on linux
can someone give me a link with compiled m2mod.exe? i want try to edit bloodelf models and add horn and wings from felbloodelf model!
tnks

edit: sorry wrong place, i should post in 3d model section
Title: Re: [question]edit m2 with blender
Post by: schlumpf on June 05, 2011, 09:12:26 pm
If you're on linux, it wont be possible to use the binary anyway.
Title: Re: [question]edit m2 with blender
Post by: schlumpf on June 05, 2011, 09:45:13 pm
Also, this should compile fine on Linux. It does on OSX. I changed some parts due to MSVC++ specific code. Should be working though. Only did M2Lib4.

http://d.pr/O1md (http://d.pr/O1md" onclick="window.open(this.href);return false;)
Title: Re: [question]edit m2 with blender
Post by: doresain on June 06, 2011, 08:51:35 am
don't compile on linux
errors:
Code: [Select]
makrov-x64:~/Scaricati/O1md.M2Lib4$ make
Scanning dependencies of target M2Lib
[ 16%] Building CXX object CMakeFiles/M2Lib.dir/M2Lib/CM2.cpp.o
In file included from /home/doresain/Scaricati/O1md.M2Lib4/M2Lib/CM2I.h:5:0,
                 from /home/doresain/Scaricati/O1md.M2Lib4/M2Lib/CM2.h:9,
                 from /home/doresain/Scaricati/O1md.M2Lib4/M2Lib/CM2.cpp:1:
/home/doresain/Scaricati/O1md.M2Lib4/M2Lib/M2Types.h: In function ‘bool M2Lib::CompareFloatsSimilar(Float32, Float32, Float32)’:
/home/doresain/Scaricati/O1md.M2Lib4/M2Lib/M2Types.h:17:22: error: ‘abs’ was not declared in this scope
/home/doresain/Scaricati/O1md.M2Lib4/M2Lib/CM2.cpp: In member function ‘M2Lib::EError M2Lib::CM2::ImportM2Intermediate(Char8*, bool, bool, bool, bool, Float32, Float32, Float32, Float32, Float32, Float32)’:
/home/doresain/Scaricati/O1md.M2Lib4/M2Lib/CM2.cpp:823:70: error: ‘memcpy’ was not declared in this scope
/home/doresain/Scaricati/O1md.M2Lib4/M2Lib/CM2.cpp:832:70: error: ‘memcpy’ was not declared in this scope
/home/doresain/Scaricati/O1md.M2Lib4/M2Lib/CM2.cpp:839:61: error: ‘memcpy’ was not declared in this scope
make[2]: *** [CMakeFiles/M2Lib.dir/M2Lib/CM2.cpp.o] Errore 1
make[1]: *** [CMakeFiles/M2Lib.dir/all] Errore 2
make: *** [all] Errore 2

with a win32 binary it should work with Wine on linux
Title: Re: [question]edit m2 with blender
Post by: schlumpf on June 06, 2011, 01:34:58 pm
In your distribution, abs and memcpy are in other header files than they should be. man abs and man memcpy to see which ones. Then add #include <...> for the files. Should be #include <cstring> and #include <cstdlib>.
Title: Re: [question]edit m2 with blender
Post by: doresain on June 07, 2011, 02:34:29 am
ok tnks it seems to work, it creates the .m2i file but now i don't know how to import m2i into blender :P
Title: Re: [question]edit m2 with blender
Post by: doresain on June 07, 2011, 03:05:44 am
damn i can't find the script to import it into blender  :(

"Install the M2I import and export scripts for Blender
After installing Blender, you will need to copy the included python scripts "import_m2i.py" and "export_m2i.py" to Blender's scripts directory"
Title: Re: [question]edit m2 with blender
Post by: doresain on June 07, 2011, 10:43:38 am
i find it o a chinese website http://www.findmod.com/archives/1184 (http://www.findmod.com/archives/1184" onclick="window.open(this.href);return false;)
the scripts are in these files http://www.ridiculousx.net/Projects/M2Mod3.zip (http://www.ridiculousx.net/Projects/M2Mod3.zip" onclick="window.open(this.href);return false;) http://www.ridiculousx.net/Projects/M2Mod4.zip (http://www.ridiculousx.net/Projects/M2Mod4.zip" onclick="window.open(this.href);return false;)
tnks for help

edit: it works!
(http://img42.imageshack.us/img42/4944/blendert.jpg)
Title: Re: [question]edit m2 with blender
Post by: doresain on June 07, 2011, 04:27:38 pm
i had patched and compiled m2lib3 for linux and it works, it's mi first (stupid) test, i only cut off the left HumanMale hand
(http://img691.imageshack.us/img691/6484/nohand.jpg)
3.3.5a client
it works great with most animation, but when do /dance /salute or i sit down client crashes with #132 i think with replacing animation with tigurius's script it should works fine
Title: Re: [question]edit m2 with blender
Post by: doresain on June 08, 2011, 12:49:37 am
this tool is wonderfull
it's my first model-edit
(http://img231.imageshack.us/img231/4784/felblood.jpg)
model doesn't crash in  game but wings and horns animations are buggy (very buggy)
i will try to fix it with pym2
(http://img860.imageshack.us/img860/9208/felblood4.jpg)
Title: Re: [question]edit m2 with blender
Post by: doresain on June 08, 2011, 10:46:53 am
i had fix my model animation (wrong bone in blender)
now model appear good and only textures are buggy
(http://img37.imageshack.us/img37/2803/felblooda.jpg)
i thing with "fur" texture it should look better, but i don't know how to do in blender
today i will do a tutorial
Title: Re: [question]edit m2 with blender
Post by: Eluo on June 08, 2011, 04:53:27 pm
This is some good news ,that there is a good modifyer for character models!
Thank you very much for your research!

By the looks of the textures i think you just modified an exsisting geoset. Is it possible to increase the polycount with that, or better said: did you add new verts?

But i think for the textures ,that this will be a problem , as you will have to unwrap the model new , and that again was something that until now no converter could handle with animated models.

Im very intrested in the progress of that!
Keep up the good work! I'm really looking forward for new results , what is possible with that chineese tool :D
Title: Re: [question]edit m2 with blender
Post by: schlumpf on June 08, 2011, 07:02:46 pm
Christian: The tool is not Chinese but from Seattle WA/Portland OR. ;)
Title: Re: [question]edit m2 with blender
Post by: doresain on June 08, 2011, 09:11:25 pm
creating a new geoset don't work, wasn't able to export model as .m2i but probably replicating a geoset with pym2 you can delete and add vertex

to create this model i cut horn teeth and wings from felblood model and exported it in .m2i file (without deleting bones, if you delete bones m2i export fails)

i imported the wing.m2i file, delete bones and swap bones number by felblood to bloodelf model (it fix animation problems, i use pym2 bone tree) and import bloodlef.m2i, ctrl +P (make parent) and ctrl+j (join meshes) between torso and wings, exporting it, merge m2i with bloodelf.m2 (now the m2i has bones of bloodelf model) and it works great!
it's my first model-edit and i don't know how to work with texture :(
Title: Re: [question]edit m2 with blender
Post by: doresain on June 09, 2011, 11:01:25 am
pym2 corrupt my model, but in blender you can clone a geoset and export in wythout problems

now horn wings and teeth are a new geoset hairstile/root 00 but when i try to edit materials in pym2 it corrupt the model :(

exist other tool to modify textures &materials on M2 (for 3.3.5 models)???

(http://img233.imageshack.us/img233/2457/pym2.jpg)
Title: Re: [question]edit m2 with blender
Post by: doresain on June 09, 2011, 04:58:36 pm
i find how to modify textures on blender, but they are hardcoded!
i swap body with hair textures in blender (2_0_iRenderFlags 1->0 and M2_0_iTexture  1->0)
(http://img687.imageshack.us/img687/8430/felbloodhairmix.jpg)
but when i try to add new texture to the model pym2 corrupts model, so i need other tool to add a new hardcored  texture to the model
Title: Re: [question]edit m2 with blender
Post by: Eluo on June 09, 2011, 10:31:50 pm
Hum a option would be m2modder.exe
I never used it and there is also a cmd version of this tool with much more options but this ref has a gui so it is absolutely easy to handle.
Test this(backup the model!) and tell me if you need the cmd version which will definitly work.

http://www.file-upload.net/download-349 ... 2.rar.html (http://www.file-upload.net/download-3495824/M2Modder2.rar.html" onclick="window.open(this.href);return false;)
Title: Re: [question]edit m2 with blender
Post by: doresain on June 10, 2011, 02:06:31 am
no, it corrupts textures on model, it shows random texture (texture changes when you rotate point of view)
i think i must add fur texture on original model and then export it in m2i and edit
i'll make a tray!
Title: Re: [question]edit m2 with blender
Post by: doresain on June 10, 2011, 03:31:13 am
finally i fix it!
(http://img6.imageshack.us/img6/5546/felbloodperfect.jpg)

i used m2modder.exe tool with commandline (replacing hardcoded deathknighteyeglow with fur and fix dk-eye mesh)

tnks schlumpf and Eluo, now my felblood is perfect ^^
now i must do male model :D
Title: Re: [question]edit m2 with blender
Post by: Eluo on June 10, 2011, 01:01:14 pm
btw why didnt you just use the felelfcasterfemale model ,and deactivate the unused geosets?
It has everything you did , just already finished :D
Title: Re: [question]edit m2 with blender
Post by: doresain on June 10, 2011, 02:42:14 pm
because i want a full equippable models with all hair and gear geosets
felelfcaster model and all felelf models have only 2 geoset (1 for model and 1 for gear reflex)
why i should use a stupid creature model with only 1 air style if i can do a full-equippable model ?
for my server i've done a draenei-eredar reskin to have eredars with different horn-hairstile-facialfeature fully equippable
Title: Re: [question]edit m2 with blender
Post by: Eluo on June 10, 2011, 06:03:29 pm
Oh .. i didn't look at the geosets, just at the animations :/
Well okay nice work anyway!
Title: Re: [question]edit m2 with blender
Post by: doresain on June 10, 2011, 06:47:11 pm
felblood male finished
(http://img51.imageshack.us/img51/3174/felbloodmale.jpg)
Title: Re: [question]edit m2 with blender
Post by: gorq on June 12, 2011, 05:35:28 am
simply amazing. i have to learn bout ur work. keep it up :D
Title: Re: [question]edit m2 with blender
Post by: KrakHed on July 18, 2011, 08:48:02 am
Nice.

Perhaps you can make a download for them?

I was using M2mod with blender to make a new Kael'thas model once, but for some reason after my initial success I couldn't edit the model anymore... Well I could, it just wouldn't convert to M2.

After that any time I tried converting any new m2i to m2 it failed... Even on another computer.

Keep up the good work!