Jump to content

MDB to FBX, FBX to MDB converter


FreshLook

Recommended Posts

I have tested this: the column NWN2_Skeleton within placeables.2da for the placeable RuralBWindmill2 is PLC_BR_WINDML2. I have overrided PLC_BR_WINDML2.gr2 with an empty GR2 and the result is that the placeable is not animated anymore. So I guess animated placeables need a skeleton.

 

I have examined PLC_BR_WINDML2.gr2 and It has three bones:

  • PLC_BR_WINDML2: named same as the main model
  • PLC_BR_WINDML2_01: named same as the first attached model
  • PLC_BR_WINDML2_02: named same as the second attached model

I guess what Exportron does under the hood when exporting a skeleton as a model is to create a bone for each model. So when my tool supports converting FBX skeleton to GR2 I think it should be possible to create animated placeables by manually creating a skeleton with a bone for each part (no rigging needed) and creating animation for this skeleton, although it would be more tedious that Exportron.

Edited by FreshLook
Link to comment
Share on other sites

  • Replies 353
  • Created
  • Last Reply

Top Posters In This Topic

When importing a FBX skeleton into Blender, it's better not to check the option Automatic Bone Orientation. What this option does is to automatically change bone orientations so they look more naturally connected. This option is useful because FBX skeletons are joint-based while Blender skeletons are bone based. The problem with this option is that if the bones are reoriented then the imported skeleton is not the same as the original one. So, when animating this reoriented skeleton, in fact you are not animating the original one. By setting the Primary Bone Axis to Z Axis when exporting a FBX animation from Blender it seemed that worked right but further tests show some problems.

 

In the end, when importing a FBX into Blender it's better not to use Automatic Bone Orientation but use the default bone axis and when exporting a FBX from Blender use the default bone axis too. The imported skeleton will not look as nice but will be faithful to the original one. New skeletons can be created as nice as you want.

 

I'm already testing FBX skeleton to GR2.

Edited by FreshLook
Link to comment
Share on other sites

When importing a FBX skeleton into Blender, it's better not to check the option Automatic Bone Orientation. What this option does is to automatically change bone orientations so they look more naturally connected. This option is useful because FBX skeletons are joint-based while Blender skeletons are bone based. The problem with this option is that if the bones are reoriented then the imported skeleton is not the same as the original one. So, when animating this reoriented skeleton, in fact you are not animating the original one. By setting the Primary Bone Axis to Z Axis when exporting a FBX animation from Blender it seemed that worked right but further tests show some problems.

 

In the end, when importing a FBX into Blender it's better not to use Automatic Bone Orientation but use the default bone axis and when exporting a FBX from Blender use the default bone axis too. The imported skeleton will not look as nice but will be faithful to the original one. New skeletons can be created as nice as you want.

 

I'm already testing FBX skeleton to GR2.

 

Huh.. Okay!

Link to comment
Share on other sites

Now that I have implemented FBX skeleton to GR2 I have tried to animate a placeable and I got it. I have animated PLC_MC_TyrBanner:

  1. Created a skeleton in Blender named same as the model.
  2. Created a single bone named same as the model.
  3. Animated the bone in Blender.
  4. Exported to FBX and converted to GR2, generating a skeleton file and an animation file.
  5. I renamed the GR2 files: PLC_MC_TyrBanner.gr2 for the skeleton and PLC_MC_TyrBanner_idle.gr2 for the animation.
  6. Edited placeables.2da.

 

It's very near to being possible to create new animated creatures too, I need to implement collision spheres and some other features, but I think that the biggest and hardest parts are done.

Edited by FreshLook
Link to comment
Share on other sites

 

Amazing.. :happy:

 

Upload Latest Binary when?! (Don't forget to build as Release in VS ! )

 

I have released version 0.2 which supports converting FBX skeleton to GR2.

 

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

 

 

Playing around with it. Thanks for making those changes.

 

It seems like the First Frame of the Animation (Pose?) is being exported as the skeleton as opposed to the actual skeleton I imported.

 

 

Did I Mess Something Up?

 

1) I Click Drag: Skel + MDB + Animation onto converter

2) Rename Skel, Do Update My Keyframes

3) (Looks good in blender, export and convert)

4) Reopen Skel in 3DS and it's no longer in T-Pose but using the first frame of my exporter.. Hrmm

 

I did rename the Pose + Skel the same.. maybe that's the issue, I'll try renaming the animation to _una_idle or something and report back.

 

 

--

EDIT:

 

For some reason my renamed Skeleton never exports.. it's just taking the first frame of the animation for my Skel creation. Did I do something wrong?

Edited by TrinitalMod
Link to comment
Share on other sites

 

 

Amazing.. :happy:

 

Upload Latest Binary when?! (Don't forget to build as Release in VS ! )

 

I have released version 0.2 which supports converting FBX skeleton to GR2.

 

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

 

 

Playing around with it. Thanks for making those changes.

 

It seems like the First Frame of the Animation (Pose?) is being exported as the skeleton as opposed to the actual skeleton I imported.

 

 

Did I Mess Something Up?

 

1) I Click Drag: Skel + MDB + Animation onto converter

2) Rename Skel, Do Update My Keyframes

3) (Looks good in blender, export and convert)

4) Reopen Skel in 3DS and it's no longer in T-Pose but using the first frame of my exporter.. Hrmm

 

I did rename the Pose + Skel the same.. maybe that's the issue, I'll try renaming the animation to _una_idle or something and report back.

 

 

--

EDIT:

 

For some reason my renamed Skeleton never exports.. it's just taking the first frame of the animation for my Skel creation. Did I do something wrong?

 

 

I have tested it and I think what's happening. It seems that Blender exports the skeleton to the FBX as it's posed at the current frame. I have explored the export options and I see nothing. I don't know if Blender is supposed to work this way. The only solution I see is when you want to export a skeleton to FBX make sure it's in its default pose.

 

Just before exporting to FBX from Blender try this:

  1. Switch to pose mode.
  2. Select all bones with A key.
  3. ALT R to reset all rotations.
  4. ALT G to reset all translations.
  5. ALT S to reset all scales.
  6. Export to FBX.
  7. As you haven't modified any keyframe, change to another frame and come back to see it's posed as before reseting.
Edited by FreshLook
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...