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 cloned the repository from GitHub and I am following it so I should be notified of your future commits. so far just one header and one source file ... so it looks like there is work to do :)

 

I am currently reviewing what's int the repository so far. My username is Snowmane72 on Github, same as here, in case you want to move our conversation to GitHub.

Link to comment
Share on other sites

What are typical NWN2 installation directories? This is for automatically looking for NWN2 files. For now, I have this list:

  • C:\Program Files\Atari\Neverwinter Nights 2
  • C:\Program Files (x86)\Atari\Neverwinter Nights 2
  • C:\GOG Games\Neverwinter Nights 2 Complete
Link to comment
Share on other sites

I have cloned the repository from GitHub and I am following it so I should be notified of your future commits. so far just one header and one source file ... so it looks like there is work to do :smile:

 

I am currently reviewing what's int the repository so far. My username is Snowmane72 on Github, same as here, in case you want to move our conversation to GitHub.

 

I have create an issue for the roadmap: https://github.com/Arbos/nwn2mdk/issues/1. Anyone can comment there for feature requests or anything.

Link to comment
Share on other sites

 

What are typical NWN2 installation directories? This is for automatically looking for NWN2 files. For now, I have this list:

  • C:\Program Files\Atari\Neverwinter Nights 2
  • C:\Program Files (x86)\Atari\Neverwinter Nights 2
  • C:\GOG Games\Neverwinter Nights 2 Complete

 

Some people may load it on a SSD other than C:. I used J:, for example.

Link to comment
Share on other sites

 

What are typical NWN2 installation directories? This is for automatically looking for NWN2 files. For now, I have this list:

 

  • C:\Program Files\Atari\Neverwinter Nights 2
  • C:\Program Files (x86)\Atari\Neverwinter Nights 2
  • C:\GOG Games\Neverwinter Nights 2 Complete

Some people may load it on a SSD other than C:. I used J:, for example.

Exactly. It might be bst to allow users to pass the path in as a command line parameter or use a configuration file (similar to how doxygen works.)

Link to comment
Share on other sites

 

 

What are typical NWN2 installation directories? This is for automatically looking for NWN2 files. For now, I have this list:

  • C:\Program Files\Atari\Neverwinter Nights 2
  • C:\Program Files (x86)\Atari\Neverwinter Nights 2
  • C:\GOG Games\Neverwinter Nights 2 Complete

Some people may load it on a SSD other than C:. I used J:, for example.

Exactly. It might be bst to allow users to pass the path in as a command line parameter or use a configuration file (similar to how doxygen works.)

 

I decided to use a configuration file if it exists and look for typical installation directories if it doesn't exist. An error message is displayed if NWN2 is not found.

 

It seems that the Blender MDB plugin doesn't import the normals of the MDB. Look at the seam of this barrel:

 

http://i.imgur.com/zj4RnCR.jpg

 

Fortunately a FBX file can store normals and Blender have an option (enabled by default) to import these normals. Here an FBX of the same barrel imported in Blender:

 

http://i.imgur.com/QOz682t.jpg

 

FBX can store tangents and binormals also, but I don't know if Blender imports them also. I will have to test.

Link to comment
Share on other sites

The MDB import script does read in and store the RVert information, which includes normal and tangent data. However, it's entirely possible the Python code isn't processing the information correctly -- I don't have the intimate knowledge of Blender 3D graphics math to know for sure. It's handled by the processMesh() subroutine in the nwn2mdb.py script, if anybody wants to take a look.

Link to comment
Share on other sites

The MDB import script does read in and store the RVert information, which includes normal and tangent data. However, it's entirely possible the Python code isn't processing the information correctly -- I don't have the intimate knowledge of Blender 3D graphics math to know for sure. It's handled by the processMesh() subroutine in the nwn2mdb.py script, if anybody wants to take a look.

 

I've taken a look and it seems the script doesn't set the normals of the Blender mesh, however it doesn't surprise me because Blender only supports custom normals since version 2.74. Moreover, Blender doesn't currently support custom tangents and binormals.

Link to comment
Share on other sites

Thanks. I think the seam in your example shows up where the UV positions don't match. There's an option for merging doubles across the mesh, but it's not very refined. Perhaps a better approach would be to cycle through the mesh and merge double vertices where the normals nearly match? Hmm...

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...