Jump to content

Photo

MDB to FBX, FBX to MDB converter


  • Please log in to reply
343 replies to this topic

#1
FreshLook

FreshLook

    Enthusiast

  • Members
  • PipPip
  • 129 posts

Hi.

 

Do you think a MDB to FBX and FBX to MDB converter would be useful to the NWN2 community? The idea is this:

 

1) Convert MDB to FBX.

2) Import the FBX into your preferred computer graphics program (Blender, Maya, 3dsmax, ...).

3) Edit the model or create a new one.

4) Export to FBX.

5) Convert FBX to MDB.

 

I started to develop a MDB to FBX converter and I got this:

 

1) Converted PLC_MC_BARREL01.MDB to PLC_MC_BARREL01.fbx

2) Imported the FBX into Blender

 

KXNDi1n.jpg



#2
FreshLook

FreshLook

    Enthusiast

  • Members
  • PipPip
  • 129 posts

Oh well, nobody seems to be interested. I will continue for fun and post progress here in case someone is interested in the future.

 

Added importing of COL2 and COL3 meshes. Now I will add importing of skins. I think the skeletons and animations are in GR2 files.



#3
Semp3r

Semp3r

    Newbie

  • Members
  • Pip
  • 19 posts

i am very interested in this! would also be amazing if there's a functional animation im- and exporter for blender. dunno if it's possible, but it would greatly enhance the rather tiny custom content community around nwn2. especially creature rigs and/or animations are almost impossible to create, because the whole pipeline is based on 3dsmax 6-8.


Edited by Semp3r, 03 February 2017 - 01:54 PM.


#4
4760

4760

    Enthusiast

  • Members
  • PipPip
  • 103 posts

I think the skeletons and animations are in GR2 files.

That's right. But the gr2 animations are protected. Like Semp3r, I'd be delighted if you find out how to import the animations.

And it's not that nobody's interested, it's rather there aren't so many still modding NWN2!


Edited by 4760, 03 February 2017 - 05:12 PM.


#5
FreshLook

FreshLook

    Enthusiast

  • Members
  • PipPip
  • 129 posts

Added importing skins:

 

XZ7z9tF.jpg

 

 

I think the skeletons and animations are in GR2 files.

That's right. But the gr2 animations are protected. Like Semp3r, I'd be delighted if you find out how to import the animations.

And it's not that nobody's interested, it's rather there aren't so many still modding NWN2!

 

 

I've started to investigate the gr2 files. I think they are compressed using Oodle. Guess that's why you say they're protected? As far as I now, nobody has reverse engineered this algorithm and the only way to decompress them is using the granny2.dll library.



#6
4760

4760

    Enthusiast

  • Members
  • PipPip
  • 103 posts

Guess that's why you say they're protected?

 

Exactly.



#7
FreshLook

FreshLook

    Enthusiast

  • Members
  • PipPip
  • 129 posts

I've looked at the source code of the 3ds Max MDB Importer/Exporter by Tazpn. What it does is call GrannyConvertFileToRaw from granny2.dll and then parses the raw data. There is source code to parse animation data, but I don't know if it's complete or used. Does anyone know if Tazpn's plugin imports animations? Or does it only imports skeletons?


Edited by FreshLook, 05 February 2017 - 02:11 PM.


#8
4760

4760

    Enthusiast

  • Members
  • PipPip
  • 103 posts

As far as I know, it only imports skeletons. I checked if anybody found a way to get the animations too (this forum looked promising), but it appears the Oodle compression prevented it.



#9
FreshLook

FreshLook

    Enthusiast

  • Members
  • PipPip
  • 129 posts

I've managed to get all the information of a skeleton from a gr2 file.

 

hGwLtbV.png

 

This is not yet a skeleton in Blender, but it was the easiest way to verify that I understood the data. A gr2 skeleton doesn't map easily to a Blender skeleton because a gr2 skeleton is joint-based while a Blender skeleton is bone-based, but I'm getting there.

 

There's also a lot of data in a gr2 skeleton that I see no use in importing it: mass, elasticity, friction, ... I don't kown if NWN2 uses this data. It'll be important to know when exporting a skeleton to gr2.



#10
Semp3r

Semp3r

    Newbie

  • Members
  • Pip
  • 19 posts

looks promising. imo i don't think that nwn2 uses all the data stored. that should be a left over from the rad game tool which can be used in combination with physics middleware.






Page loaded in: 0.785 seconds