Jump to content

MDB to FBX, FBX to MDB converter


FreshLook

Recommended Posts

  • Replies 353
  • Created
  • Last Reply

Top Posters In This Topic

I have released version 0.6. You can download it here: https://github.com/Arbos/nwn2mdk/releases

 

Changes:

  • Now the tools use the user property TINT_MAP of nodes for the tint map name. This is because there isn’t a suitable FBX material slot for the tint map.
  • fbx2nw takes the FBX Bump material slot as the normal map if the NormalMap material slot is empty. This is because the FBX plug-in of 3ds Max exports the normal map into the Bump material slot.
  • Now the tools ignore the case of user properties.
Edited by FreshLook
Link to comment
Share on other sites

 

I've finished writing a tutorial about animated multipart placeables:

 

https://github.com/Arbos/nwn2mdk/wiki/Tutorial-Animated-Multipart-Placeable

 

Minor comment regarding this tutorial: in step 4, the value in the SoundAppType column corresponds to a row in the placeableobjssnds.2da file. This set the sounds played when you animate the placeable.

 

 

I have updated the tutorial. Thanks.

Link to comment
Share on other sites

Mini-blog

 

When I researched the compression algorithm used in the GR2 files a year ago, I didn't find anyone that had reverse engineered the algorithm. I decided to use the granny32.dll library from the NWN2 install to decompress the GR2 files, but this has two problems for my future plans:

  • Because granny32.dll is 32-bit and 64-bit programs can't be linked to 32-bit DLLs, my tools are tied to 32-bit or to use complex, annoying and ugly workarounds.
  • Because granny32.dll is a Windows library, I can't make my tools cross-platform without complex, annoying and ugly workarounds.

So I decided to revisit the compression algorithm past weekend and decided to reverse engineer it myself. I got a general high-level overview of the algorithm, but I was overwhelmed by the details, so I kept looking for every bit of info I could find and finally... I found that someone had reverse enginered the algorithm 3 years ago! In fact, it was a work to be included in xoreos-tools, but the author didn't find the time to properly rewrite it to fit in the project codebase. The work is here: https://github.com/berenm/xoreos-tools/tree/wip/granny-decoder

 

I have tested it with a bunch of GR2 files, comparing the decompressed output of this implementation with the output of granny32.dll and they are byte by byte identical!

 

Now the path is clearer for 64-bit and cross-platform :smile: .

Edited by FreshLook
Link to comment
Share on other sites

  • 3 weeks later...

It doesn' t work for 3ds max 8 (but this was just for testing purposes, I'm quite sure the fbx format has changed since 2006!). What's more problematic for me is that I can't get it to work for Blender 2.69 (in Linux).

I do get the mesh and collision balls, but only the root bone of the skeleton. So no animations either...

I'll install Blender under Win7 to see if it's an OS issue.

Link to comment
Share on other sites

It doesn' t work for 3ds max 8 (but this was just for testing purposes, I'm quite sure the fbx format has changed since 2006!). What's more problematic for me is that I can't get it to work for Blender 2.69 (in Linux).

I do get the mesh and collision balls, but only the root bone of the skeleton. So no animations either...

I'll install Blender under Win7 to see if it's an OS issue.

 

nw2fbx generates FBX binary version 7.4, which is a format from year 2014, so no wonder it doesn't work with a software from year 2006.

 

Did you compile my tools in Linux? Since currently my tools depend on granny32.dll to work with GR2 files, only if you compile in Windows or use my binary release it's going to work. Fortunately, like I explained in my last post, I could already get rid of the granny32.dll dependency, but I need to make changes to my tools.

 

Is anyone interested in running my tools in Linux or other OS?

Link to comment
Share on other sites

 

It doesn' t work for 3ds max 8 (but this was just for testing purposes, I'm quite sure the fbx format has changed since 2006!). What's more problematic for me is that I can't get it to work for Blender 2.69 (in Linux).

I do get the mesh and collision balls, but only the root bone of the skeleton. So no animations either...

I'll install Blender under Win7 to see if it's an OS issue.

 

nw2fbx generates FBX binary version 7.4, which is a format from year 2014, so no wonder it doesn't work with a software from year 2006.

 

Did you compile my tools in Linux? Since currently my tools depend on granny32.dll to work with GR2 files, only if you compile in Windows or use my binary release it's going to work. Fortunately, like I explained in my last post, I could already get rid of the granny32.dll dependency, but I need to make changes to my tools.

 

Is anyone interested in running my tools in Linux or other OS?

 

I used nw2fbx on my Win 7 laptop (the one with 3ds max) and tried the fbx it generated on the Linux desktop. It kinda worked, since I get the mesh, the collision balls and the root bone, but although no error message shows in the log, and that the log lists all the bones in the skel, there's no skeleton after I import the resulting fbx in Blender.

I'm using version 2.69, I think there's a newer one. I'll check if that gives better results.

By the way, I tried:

- mesh only --> one fbx

- skel only --> another fbx

- anim only --> third fbx

=> only the mesh shows, nothing else

- all three together dropped on nw2fbx --> larger fbx

=> as described, everything is imported except the skeleton and the animations (but I guess it's related).

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...