Jump to content

MDB to FBX, FBX to MDB converter


FreshLook

Recommended Posts

Sure, I'll give it a shot. Thanks.

 

Ed.: yes, that works.

 

I think I'll implement the following:

  • Get rid of the cmd files.
  • Drag&drop directly to nw2fbx.exe and fbx2nw.exe.
  • If the tool is executed from command line, print messages to console.
  • If the tool is executed directly (double-click, drag&drop, ...), print messages to log.txt.
Link to comment
Share on other sites

  • Replies 353
  • Created
  • Last Reply

Top Posters In This Topic

 

Sure, I'll give it a shot. Thanks.

 

Ed.: yes, that works.

 

I think I'll implement the following:

  • Get rid of the cmd files.
  • Drag&drop directly to nw2fbx.exe and fbx2nw.exe.
  • If the tool is executed from command line, print messages to console.
  • If the tool is executed directly (double-click, drag&drop, ...), print messages to log.txt.

 

 

The lag time of outputting to the console slows things down. so piping to a log by default would be great.

Thanks.

Link to comment
Share on other sites

I have finished updating the tutorial about animating the banner of Tyr for version 0.4.

 

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

 

I'm wondering what future tutorials would be more useful:

  • Animated placeable with attached parts and multiple states (close, open, ...).
  • Creating animated creature from scratch.
  • ...

For next version of the tool, I'm planning adding checks like checking that a skeleton has no more than 54 bones (the maximum supported by NWN2 I think).

Link to comment
Share on other sites

I confirm the 54 bones limit per skeleton.

There's a work around though: use tail and wings (even if they're not actually tails or wings), this would allow 53 more bones (the base skeleton of the tail/wings being duplicated from its counterpart in the main skeleton). If both tail and wings parts are used, then the total would be 3 x 54 - 2 = 160 bones.

Link to comment
Share on other sites

I'm trying to animate a secret door by having it lower into the ground. The lowering animation exported properly, but then I went back to create an idle animation (by re-importing the .fbx). This consists of a range of 144 frames with location keyframes only at the start and end. When I exported it per the tutorial, I only got the 'skel' GR2 file and no animation GR2. Is the idle just part of the 'skel' file?

Link to comment
Share on other sites

By the way, facial bones (the f_* bones in the head skeletons) don't count in the 54 total, but they're only use for facial animations (wink, smile, etc...)

 

I didn't know that facial bones don't count. I have started to write all the constraints for art content here: https://github.com/Arbos/nwn2mdk/wiki/Tutorial:-FBX-to-MDB-GR2-(drag&drop)

 

I'm trying to animate a secret door by having it lower into the ground. The lowering animation exported properly, but then I went back to create an idle animation (by re-importing the .fbx). This consists of a range of 144 frames with location keyframes only at the start and end. When I exported it per the tutorial, I only got the 'skel' GR2 file and no animation GR2. Is the idle just part of the 'skel' file?

 

In Blender, the default options for exporting a FBX causes simplification of the animation (Armature tab, Simplify = 1.0). So, if all the keyframes of a channel have the same value, the channel isn't exported. For an idle animation, the exported FBX won't contain any animation, so the tool won't generate .anim.gr2. You can set Simplify to 0.0 to disable simplification.

Edited by FreshLook
Link to comment
Share on other sites

Thanks!

 

Ed.: My secret door consists of three packets, which I placed under the same .PIVOT per your tutorial. I re-imported the original plc_du_secret_door.mdb and generated plc_du_secret_door_open.gr2 files via nw2fbx.exe. When I ran the animation in blender, the main door packet lowered below the floor level as expected. However, the additional packets were lowered twice as far, completely disrupting the model.

 

https://www.dropbox.com/s/w09h2dkwzwii4yg/plc_du_secret_door.7z?dl=0

Edited by rjshae
Link to comment
Share on other sites

Thanks!

 

Ed.: My secret door consists of three packets, which I placed under the same .PIVOT per your tutorial. I re-imported the original plc_du_secret_door.mdb and generated plc_du_secret_door_open.gr2 files via nw2fbx.exe. When I ran the animation in blender, the main door packet lowered below the floor level as expected. However, the additional packets were lowered twice as far, completely disrupting the model.

 

https://www.dropbox.com/s/w09h2dkwzwii4yg/plc_du_secret_door.7z?dl=0

 

The tutorial about animating the banner of Tyr only explains the animation of one packet and there is one thing you need to know in order to animate a placeable with multiple packets. One packet must be the main part and the other packets must be the attached parts. The main part must be the only child of the animation pivot and the attached parts must be children of the main part. The animation pivot can have no more than one child.

 

Lower-level technical information: for animated placeables, NWN2 needs a skeleton where the root bone corresponds to the main part and the children of the root bone correspond to the attached parts. This is the skeleton that fbx2nw generates under the hood. Since a skeleton in NWN2 can have no more that one root bone, there can only be one main part.

Edited by FreshLook
Link to comment
Share on other sites

I didn't know that facial bones don't count. I have started to write all the constraints for art content here: https://github.com/Arbos/nwn2mdk/wiki/Tutorial:-FBX-to-MDB-GR2-(drag&drop)

there's another constraint: one vertex is allowed to only be influenced by a maximum of three bones at once. i believe the default in most applications (and game engines nowadays) is set to 4. your tool could warn the user that there are vertices with more then three bone weights, and give an option to either cancel the exporting process or to automatically delete the fourth weight per vertex with the least influence.

Edited by Semp3r
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...