MDB/GR2 to FBX & FBX to MDB/GR2 tools


#1

I developed tools to convert MDB/GR2 to FBX and FBX to MDB/GR2.

Latest release:

https://github.com/Arbos/nwn2mdk/releases

Documentation:

https://github.com/Arbos/nwn2mdk/wiki

There a two tools:

  • fbx2nw: converts FBX to MDB/GR2, It’s a complete replacement of Expotron. For the first time, you can create animated placeables and creatures with your DCC of choice (Blender, 3ds Max, Maya, …).
  • nw2fbx: converts MDB/GR2 to FBX. It would be “Impotron”.

The tools are feature complete, but I consider them to be in alpha state.

See my YouTube channel for videos.

This project started here:

https://forums.nexusmods.com/index.php?/topic/5319220-mdb-to-fbx-fbx-to-mdb-converter/


Project FL
How creating new custom characters?
The FaerzressSparkles Project Thread
#2

It’s a very good tool. Without it I would not have been able to modify my old head models, or to create new ones.

Freshlook assistance is very good too.

I use it with 3DS MAX 2018. Most of the problems I encounter are due to the way max handles fbx files, the other being because my old brain is not as adaptable to new things as it was.


#3

Yes, these are terrifically useful. It has let me animate placeables, containers, and build new working doors entirely in Blender, for example.


#4

love those tools. finally nwn2 is free of max and the whole community is able to produce new content!


#5

Freshlook has done a great service to the modding community - I can’t thank you enough and have been spreading this across the PW’s as best I can.

Thank you so much for your amazing work.


#6

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.

#7

Confirmation that it works very well now.

All textures are exported/imported to/from the fbx file. It greatly simplify the creation of race variants…

Thanks


#8

This is very promising! Hope, that I’ll find the time to check this out in detail! Good job! Thank you!


#9

I dreamed of this when i was on nwn 2.Great addition.


#10

then it’s time to come back :wink:


#11

Well once you tested Unreal Engine or another recent one…kinda hard to come back in the stone age :stuck_out_tongue:
But well it s cool to know we can bring in some maya animation now.
And as most recent tool allow to redirect animation from one skeleton to another as long as they have “similar human shape”,we can imagine some improvement in the futur.


#12

Hi FreshLook,

I was wondering if you had looked at implementing the helm-hair-hiding-behavior flag export for the fbx2nw.exe tool? I’ve got a helm I want to export, but the resulting conversion is missing that packet. Everything else seems to be working though. It’s be great if we had that. Thank you.


#13

It’s already implemented. An easy way to see how it works is by converting a MDB helm to FBX and import it. You will see and empty object with the following custom properties:

  • HHHB_HAIR_HIDDEN
  • HHHB_HEAD_HIDDEN
  • HHHB_NONE_HIDDEN
  • HHHB_PARTIAL_HAIR

If the property is 0, then the flag it’s not set. If the property isn’t 0, the flag is set.


#14

Ah, I see what my problem was; I didn’t check the Custom Properties flag on the FBX export. Thanks.


#15

Hello again,

I have a German army helmet attached to a human male skeleton and I believe (or at least I hope) I’ve got the bone weights 100% attached to the head bone correctly. However, when I try to run the exported FBX model through fbx2nw.exe, the log.txt shows this error:

Animation stacks: #0
Importing skeleton: P_HHM_skel
ERROR: Skeleton has more than 54 render bones.

I’m probably doing something wrong again.


#16

I guess that you should uncheck Add Leaf Bones in the Armature Tab of the FBX export options.


#17

Thank you for the fix! It seems to be exporting correctly now, although it doesn’t show up as a half-plate helm in the game. I’ll keep investigating.


#18

Okay, I’m still trying to figure out how to get this to work.

The exported helm seemingly has everything it needs, but it doesn’t display in the game.

I tried running the resulting P_HHM_PH_Helm80.MDB file plus P_HHM_skel.gr2 back into nw2fbx.exe, then import the resulting P_HHM_PH_Helm80.fbx file back into Blender. The model then has a different COLS sphere named COLS_RLegAnkleDigit011, the meshes are no longer under the P_HHM_skel parent, and there are no vertex groups or weights.

For the FBX Import I have ‘Force Connect Children’ and ‘Automatic Bone Orientation’ selected under the Armatures menu. But the options don’t seem to matter.


#19

Before exporting to FBX:

  • Is the skeleton name P_HHM_skel?
  • Where is the collision sphere positioned? What matters is its position.

When converting from MDB to FBX, if the meshes aren’t parented to the skeleton P_HHM_skel could be because the skeleton field in the MDB isn’t P_HHM_skel. Could you verify this with MDBConfig?

Could you post log.txt?


#20

Yes, it is as in the blender file I have in that DropBox file linked above. The meshes are parented to the skeleton P_HHM_skel and the collision sphere, COLS_Head, is centered on the head.

fig01

In comparing to P_HHM_PH_Helm01, the one difference I noticed is that my meshes don’t have a Neck vertex group. I’ll give that a try after I’m back from our Easter gathering.