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] LKBC M2 Converter v0.4  (Read 7422 times)

spik96

  • Registred Member
  • Model Change Addict
  • *****
  • Posts: 275
    • View Profile
Re: [TOOL] LKBC M2 Converter v0.4
« Reply #15 on: July 24, 2015, 07:52:51 pm »
New Update ! Compatible with WoD character models and the program can now also convert to Classic ! (1.x)
So I guess it's LKBCCL now, but let's keep the name it will be easier.
There is even help showing in the terminal when you do something wrong !

Quote from: "sshroud"
I haven't really looked at how you did it, but knowing the data structures and the significant differences in the data is it feasible to turn it into something that we can use as a generic platform for handling conversions?

Not just the significant differences. All differences. A single thing could make the client crash and if you ever had a WoW Error you know WoW errors are NOT easy to understand (I don't at all, in fact x) ).
And that's the problem. We don't have a nice documentation about these formats. There is a big lack of knowledge.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
Github ]https://github.com/Koward[/url]    Skype : koward723 =)

sshroud

  • Registred Member
  • Race Changer
  • *****
  • Posts: 25
    • View Profile
Re: [TOOL] LKBC M2 Converter v0.4
« Reply #16 on: July 24, 2015, 10:41:40 pm »
Quote from: "spik96"
New Update ! Compatible with WoD character models and the program can now also convert to Classic ! (1.x)
So I guess it's LKBCCL now, but let's keep the name it will be easier.
There is even help showing in the terminal when you do something wrong !

Quote from: "sshroud"
I haven't really looked at how you did it, but knowing the data structures and the significant differences in the data is it feasible to turn it into something that we can use as a generic platform for handling conversions?

Not just the significant differences. All differences. A single thing could make the client crash and if you ever had a WoW Error you know WoW errors are NOT easy to understand (I don't at all, in fact x) ).
And that's the problem. We don't have a nice documentation about these formats. There is a big lack of knowledge.

It's certainly finicky, but don't you require full knowledge of the 3.3.5 .m2 format for writing to the 1.12.1 .m2 format? (Which could then be potentially reversible?)
« Last Edit: July 25, 2015, 02:20:05 am by Admin »

spik96

  • Registred Member
  • Model Change Addict
  • *****
  • Posts: 275
    • View Profile
Re: [TOOL] LKBC M2 Converter v0.4
« Reply #17 on: July 24, 2015, 11:45:30 pm »
Quote from: "sshroud"
It's certainly finicky, but don't you require to full knowledge of the 3.3.5 .m2 format for writing to the 1.12.1 .m2 format? (Which could then be potentially reversible?)

Oh 1.12.1 to 3.3.5a, sure I could (not sure if really worth it as the few good models that are not in the game anymore can be opened in MDLVis, converted to Mdx then converted using Skarn's tutorial).
But I was talking about alpha models. Those are in a special mdx format derivated from the Warcraft 3 model format and we don't have sufficient information about it, as far as I know.
You need people with retroengineering abilities (I don't have this kind of skill) to get a more complete doc. Back then nobody cared about alpha models, and nowaday they are all gone from the WoW scene. And anyway I doubt they would put so much effort (because retroengineering is really f*cking hard) just for something people will barely use.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
Github ]https://github.com/Koward[/url]    Skype : koward723 =)

leeviathan

  • Registred Member
  • Loreweaver
  • *****
  • Posts: 107
    • View Profile
Re: [TOOL] LKBC M2 Converter v0.4
« Reply #18 on: November 04, 2015, 03:17:09 am »
(First off, thanks so much for this tool, I'm using it a lot!)

I'm trying to convert the 3.3.5a NightElfMale.M2 to 1.12.1. (Aside: I'm trying to add Barbershop hairstyles to character models in 1.12.1.) Everything seems to work fine except that the "eyeglow" geoset is missing.

Is the eyeglow considered a "light", would that be why it doesn't translate?

---------->link to my work

leeviathan

  • Registred Member
  • Loreweaver
  • *****
  • Posts: 107
    • View Profile
Re: [TOOL] LKBC M2 Converter v0.4
« Reply #19 on: November 10, 2015, 05:41:51 am »
I'm trying to make a modification to the source in order to adjust some of the fallback animations for certain models. However, compiling the source has even my mighty software engineer friend stumped. Can you provide any guidance for compiling your source code?

thankkkkkkkkk

spik96

  • Registred Member
  • Model Change Addict
  • *****
  • Posts: 275
    • View Profile
Re: [TOOL] LKBC M2 Converter v0.4
« Reply #20 on: November 10, 2015, 11:58:08 am »
I use CMake to organize a bit the code structure, but if you don't know how it works you can still take all the includes (.h files), all the source (.c files), put them in one folder then compile the main with your favorite compiler I use Linux's GCC but any converter should work.
I don't think the Night elf glow is considered a light. My converter removes the Death Knight geoset but the standard Night elf eyes should be fine. Note its texture is hardcoded, however.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
Github ]https://github.com/Koward[/url]    Skype : koward723 =)

leeviathan

  • Registred Member
  • Loreweaver
  • *****
  • Posts: 107
    • View Profile
Re: [TOOL] LKBC M2 Converter v0.4
« Reply #21 on: November 11, 2015, 12:40:53 am »
The hardcoded blp is where it needs to be, it's just that the eye geoset is missing--I looked in WoWModelViewer and toggled all the geosets to make sure. Have a look if you get the time (I linked it in my post about the Night Elf eyes)

In trade for your attention, I humbly offer you this Tauren Bear model. I changed a render flag set on its eye geoset, which was causing the eye to glow in the dark.

spik96

  • Registred Member
  • Model Change Addict
  • *****
  • Posts: 275
    • View Profile
Re: [TOOL] LKBC M2 Converter v0.4
« Reply #22 on: November 11, 2015, 12:31:34 pm »
Interesting. I thought renderflags did not changed between the two periods. I bet it's again the default value problem.
See, before LK all model had to specify exactly their settings, but since LK, they often left a blank (under the form of an nRefs=0) and it magically works because the client knows that nothing equals a default behaviour. But when you want to convert the formats, you have to find all these blanks (so you have to know how to differentiate a 0 that means don't use that and a 0 that means use the default value) then you have to find the default value you should replace the 0 with... And that's hard.
That's even harder because to make the converter, at start I was of course looking at old models since they were on both LK and BC/Vanilla clients. But older models (still on WoD today) have still their settings entirely set and don't use default values at all.
I first found that with the attachments that were not always properly displayed and I couldn't figure why.
There was a default=true. This change was unnoticed while it's still used today (now it has been added to the wiki thanks to schlumpf) !
I will look at the renderflags. There is also one other big problem with my converter. Try to convert arctic bird. It will have no wings. The part of the geoset (and I insist on the part of the geoset and not the geoset which is also a part of the model) will disappear. This problem is also on the Jaina.m2 and all the Warlords of Draenor character models. Fixing it would allow the conversion of those problems.

Also, you had a problem with the animations of your bird. My algorithm was supposed to fix that automatically (http://hastebin.com/oberimiwap.cpp) but it seems it's still not complete. Sorry.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
Github ]https://github.com/Koward[/url]    Skype : koward723 =)

stan84

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 184
    • View Profile
Re: [TOOL] LKBC M2 Converter v0.4
« Reply #23 on: November 15, 2015, 08:13:18 pm »
Quote from: "spik96"
I use CMake to organize a bit the code structure, but if you don't know how it works you can still take all the includes (.h files), all the source (.c files), put them in one folder then compile the main with your favorite compiler I use Linux's GCC but any converter should work.
I don't think the Night elf glow is considered a light. My converter removes the Death Knight geoset but the standard Night elf eyes should be fine. Note its texture is hardcoded, however.

Hi Spik :)

I'd like to compile your converter,  unsucessfully :(
recevied such report:

Scanning dependencies of target UAll
[  6%] Building C object CMakeFiles/UAll.dir/tests/UDummy.c.o
[ 13%] Building C object CMakeFiles/UAll.dir/tests/CuTest.c.o
[ 20%] Building C object CMakeFiles/UAll.dir/src/conversion.c.o
[ 26%] Building C object CMakeFiles/UAll.dir/src/fallback.c.o
[ 33%] Building C object CMakeFiles/UAll.dir/src/reading.c.o
/home/develop/LKBC_Converter/src/reading.c: In function ‘read_model’:
/home/developLKBC_Converter/src/reading.c:893:20: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
    anim_files = (FILE *) fcaseopen(
                    ^
[ 40%] Building C object CMakeFiles/UAll.dir/src/common.c.o
[ 46%] Building C object CMakeFiles/UAll.dir/src/fcaseopen.c.o
Linking C executable UAll
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
collect2: error: ld returned 1 exit status
make[2]: *** [UAll] Error 1
make[1]: *** [CMakeFiles/UAll.dir/all] Error 2
make: *** [all] Error 2

could You post compiled executable, or give tip to solution ?

Stan ;)
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

spik96

  • Registred Member
  • Model Change Addict
  • *****
  • Posts: 275
    • View Profile
Re: [TOOL] LKBC M2 Converter v0.4
« Reply #24 on: November 16, 2015, 12:42:42 pm »
The compiled version is always available in the Binaries section on Github : https://github.com/Koward/LKBC_Converter/releases
Concerning the last rev, I have been told there is a bug with models where they crash the game at sight. I'm exhausted trying to fix this god damn converter. It's really painful x)

I'm considering porting this project to Java or Scala for modern and easier maintainability. And to fit the new specifications schlumpf adds from the source.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
Github ]https://github.com/Koward[/url]    Skype : koward723 =)

stan84

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 184
    • View Profile
Re: [TOOL] LKBC M2 Converter v0.4
« Reply #25 on: November 16, 2015, 02:24:24 pm »
Thanks for the link dude.

Even now, Your tool is big step forward in tbc- vanilla modding. Keep working Spik, and don't lose heart for it.
:)
Stan
« Last Edit: January 01, 1970, 01:00:00 am by Admin »