This is a read only copy without any forum functionality of the old Modcraft forum.
If there is anything that you would like to have removed, message me on Discord via Kaev#5208.
Big thanks to Alastor for making this copy!

Menu

Author Topic: [TOOL][WIP] M2 Importer/Exporter 3ds max plugin  (Read 11488 times)

hornobster

  • Registred Member
  • GM Isle Explorer
  • *****
  • Posts: 17
    • View Profile
[TOOL][WIP] M2 Importer/Exporter 3ds max plugin
« on: August 29, 2011, 02:55:25 pm »
Hi everyone :D
I'm currently working on a M2 importer/exporter for 3ds max 2012 so that everything the model needs could be set within 3ds max without external programs...

I managed to make a simple importer so far. It imports vertex positions, normals and UV coords...
More features will be added in the future and then I'll make an exporter.

Atm the importer looks for the first .skin file only (name00.skin) since I can't realise what the other skins are used for(does LOD mean "level of detail"?)...

Works with 3ds max 2012:
64-bit: http://www.mediafire.com/?xd5rlw2qq47b459
32-bit: http://www.mediafire.com/?a7d583swh3jg3db //NOTE: not tested

Usage: in 3ds max, File>Import.. Choose Blizzard (.M2) and open the M2... the skin file must be in the same folder.

Features
Importer:
  • Vertex positions DONE!
  • Vertex normals DONE!
  • Vertex texture coordsDONE!
  • Attachments 90% they arent linked to their bone
  • Submeshes TO DO
  • Texture Units (they are needed for models with more than one texture right?) TO DO
  • Cameras TO DO
  • Animations TO DO last thing I will implement xD
  • Et cetera... xD TO DO

Exporter: TO DO

I'm thinking of making a modifier plugin which will hold all the data and then the export will take that data into an M2...

I don't know what modeling programs you are using, but if this works we won't need all the different programs we have now to change little parts, everything will be included in 3ds max.

Please report any bug :P
« Last Edit: August 30, 2011, 05:48:32 pm by Admin »
http://modcraft.superparanoid.de/viewtopic.php?f=7&p=4468[/url]

There are 10 kinds of people: who knows binary and who doesn\'t.

doresain

  • Contributors
  • Model Change Addict
  • *****
  • Posts: 202
    • View Profile
Re: [TOOL][WIP] M2 Importer/Exporter 3ds max plugin
« Reply #1 on: August 29, 2011, 04:14:11 pm »
why writing a importer/exporter plugin for a closed source program?
make a plugin for an opensource program and release source code, a lot of people may be interesting to the project and help you to development
:D
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

hornobster

  • Registred Member
  • GM Isle Explorer
  • *****
  • Posts: 17
    • View Profile
Re: [TOOL][WIP] M2 Importer/Exporter 3ds max plugin
« Reply #2 on: August 29, 2011, 05:01:21 pm »
Quote from: "doresain"
why writing a importer/exporter plugin for a closed source program?
make a plugin for an opensource program and release source code, a lot of people may be interesting to the project and help you to development
:D
because I've always used 3ds max and gmax.... I tried to learn blender what it was too difficult xD
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
http://modcraft.superparanoid.de/viewtopic.php?f=7&p=4468[/url]

There are 10 kinds of people: who knows binary and who doesn\'t.

Laniax

  • Registred Member
  • Polygonshifter
  • *****
  • Posts: 62
    • View Profile
Re: [TOOL][WIP] M2 Importer/Exporter 3ds max plugin
« Reply #3 on: August 29, 2011, 08:04:00 pm »
Huge props for this, exactly what we need.

I dont know to much about maxscript, but i've been modelling and animating in 3dsmax for years, if you need any info. let me know.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
Current project: AIO Emulation solution.

Garthog

  • Contributors
  • Polygonshifter
  • *****
  • Posts: 56
    • View Profile
Re: [TOOL][WIP] M2 Importer/Exporter 3ds max plugin
« Reply #4 on: August 29, 2011, 11:56:00 pm »
LOD means level of detail yep. It's the file that the object looks better when you get closed !
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Steff

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 4551
    • View Profile
Re: [TOOL][WIP] M2 Importer/Exporter 3ds max plugin
« Reply #5 on: August 30, 2011, 04:00:54 am »
I also use only max :)
I dont get warm with blender.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
Please mark as solved if solved.
Don't ask if you could ask a question... JUST ask the Question.
You can send me also offline messages. I will answer if I get online.
Skype: project.modcraft
Discord: steff#6954

hornobster

  • Registred Member
  • GM Isle Explorer
  • *****
  • Posts: 17
    • View Profile
Re: [TOOL][WIP] M2 Importer/Exporter 3ds max plugin
« Reply #6 on: August 30, 2011, 12:09:30 pm »
Quote from: "Garthog"
LOD means level of detail yep. It's the file that the object looks better when you get closed !
so modelname01.skin is more detailed than modelname00.skin or the opposite?
thanks for the info anyway :D

Now I'm working on attachments which will be displayed as little cubes and then linked with the correct bone... but how many bytes is it big? because there's that ABlock at the end, and I don't know its dimension... someone should add it to the wiki :P
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
http://modcraft.superparanoid.de/viewtopic.php?f=7&p=4468[/url]

There are 10 kinds of people: who knows binary and who doesn\'t.

schlumpf

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 2967
    • View Profile
Re: [TOOL][WIP] M2 Importer/Exporter 3ds max plugin
« Reply #7 on: August 30, 2011, 12:33:57 pm »
Actually, I'm not sure about it being LOD. It should be though.

Animation blocks are documented at the top. Also, they all have the same size except for what they point to.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

hornobster

  • Registred Member
  • GM Isle Explorer
  • *****
  • Posts: 17
    • View Profile
Re: [TOOL][WIP] M2 Importer/Exporter 3ds max plugin
« Reply #8 on: August 30, 2011, 05:37:47 pm »
Quote from: "schlumpf"
Actually, I'm not sure about it being LOD. It should be though.

Animation blocks are documented at the top. Also, they all have the same size except for what they point to.
I found they are 20 bytes long... add it to the wiki please :P

UPDATE:
Added attachments import.
64-bit: http://www.mediafire.com/?xd5rlw2qq47b459
32-bit: http://www.mediafire.com/?a7d583swh3jg3db

They will be shown as little cubes (0.1 size) and the name changes depending on the id...
They aren't linked to their bone yet since there are no bones at the moment xD

I found some interesting things using it :P
for example the bloodelf male has 2 demolishervehicle attachments in his left hand xD
attachments IDs 9 and 10 might be related to HipSheath or somehing to do with waist... who knows?
also I noticed that the importer found some duplicate attachments... I mean 2 or more attachments with the same ID... is it normal?? how can WoW recognise the difference?

in addition, I didnt know that character models contained all the models for shirts, boots, gloves, cloaks, leggings and kilts, all the hair styles... they're all together.. I guess they are registered in the Submeshes block and when they're not needed WoW applies a completely transparent texture...


Another thing I noticed is that attachment position is NOT relative to the bone pivot as stated in the wiki.. it is linked with that bone and shares its rotation and translation but the position is absolute not relative...
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
http://modcraft.superparanoid.de/viewtopic.php?f=7&p=4468[/url]

There are 10 kinds of people: who knows binary and who doesn\'t.

Tigurius

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 126
    • View Profile
Re: [TOOL][WIP] M2 Importer/Exporter 3ds max plugin
« Reply #9 on: August 30, 2011, 05:41:29 pm »
http://wowdev.wiki/index.php?tit ... animations

and LOD was something about Bone Level of Detail or so.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

hornobster

  • Registred Member
  • GM Isle Explorer
  • *****
  • Posts: 17
    • View Profile
Re: [TOOL][WIP] M2 Importer/Exporter 3ds max plugin
« Reply #10 on: August 30, 2011, 06:02:56 pm »
Quote from: "Tigurius"
http://wowdev.wiki/index.php?title=Talk:M2/WotLK#On_animations

and LOD was something about Bone Level of Detail or so.
thanks I didn't notice that page!

I've checked different skins for Belfmale and the geometry doesn't change, same faces and same vertices... so it's not "geometry" level of detail
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
http://modcraft.superparanoid.de/viewtopic.php?f=7&p=4468[/url]

There are 10 kinds of people: who knows binary and who doesn\'t.

Zim4ik

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 407
    • View Profile
Re: [TOOL][WIP] M2 Importer/Exporter 3ds max plugin
« Reply #11 on: August 31, 2011, 10:39:29 am »
I think that m2 importer allready created
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Laniax

  • Registred Member
  • Polygonshifter
  • *****
  • Posts: 62
    • View Profile
Re: [TOOL][WIP] M2 Importer/Exporter 3ds max plugin
« Reply #12 on: August 31, 2011, 11:15:52 am »
Quote from: "Zim4ik"
I think that m2 importer allready created

I guess your talking about this
http://3d-inferno.com/Diverse/index.php ... orter&v2=0

It's horribly outdated, and i doubt if it still works. Result isn't really beautiful either.
Maybe you can use it for some structure info though.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
Current project: AIO Emulation solution.

Guest

  • Guest
Re: [TOOL][WIP] M2 Importer/Exporter 3ds max plugin
« Reply #13 on: August 31, 2011, 01:48:17 pm »
possibly a nice place to start but if you read it only supports to wow version 2.xx-2.7 (which I did not realise existed)

so props to the dev, amazing work!, has anybody made an adt importer as that could be very useful
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

schlumpf

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 2967
    • View Profile
Re: [TOOL][WIP] M2 Importer/Exporter 3ds max plugin
« Reply #14 on: August 31, 2011, 01:53:26 pm »
Quote from: "tyler durtan"
possibly a nice place to start but if you read it only supports to wow version 2.xx-2.7 (which I did not realise existed)

so props to the dev, amazing work!, has anybody made an adt importer as that could be very useful
The last version of 2 was 2.4.3.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »