Jump to content

MDB to FBX, FBX to MDB converter


FreshLook

Recommended Posts

What do you mean by "re-import the FBX"? I guess it's that you import the FBX first time, delete scene and import again in the same session?

 

Yes :

1 - MDB to FBX

2 - 3DS Max import FBX

3 - 3DS MAX save as FBX

4 - 3DS MAX reset scene

5 - 3DS Max import FBX saved during 3 above

Link to comment
Share on other sites

  • Replies 353
  • Created
  • Last Reply

Top Posters In This Topic

After many tries, import/export seem to work now

 

1 - I updated the fbx plugin to the latest found on Autodesk site

 

2 - During import I had the following :

 

Geometry => check smoothing group

Bone => use 'leave as bone' (the default option was transform to dummy)

 

3 - During export I had :

 

Geometry => check smoothing group, tangent and binormal, convert deforming dummies to bones, triangulate (I work with quadified meshes), preserve edge orientation

Deformation => check skin and morph

 

 

Problem stays as soon as I modify the mesh which is in the mdb. It seems it's related to hierarchy of bones.

 

I learned on 3DS Max 2009, and did all my custom content with it. Now I have 3DS Max 2016 (updated to 2018 yesterday) and I am not yet at ease with all the new features. Perhaps I miss an option somewhere.

 

Anyway I have advanced a bit and the path I must explore is narrowing.

Edited by phil76
Link to comment
Share on other sites

Some more testing

 

I start with an hair mdb called P_HHF_Hair21.

 

 

1 - No changes

 

- Drag P_HHF_HAir21.mdb + P_HHF_skel.gr2 to NW2FBX : result in P_HHF_Hair21.fbx

- Import P_HHF_Hair21.fbx to 3DS Max 2018 with latest FBX plugin

- Change nothing, just add skeleton=P_HHF_skel to properties of mesh

- Export to P_HHF_Hair21.fbx

- Drag just exported P_HHF_Hair21.fbx to FBX2NW : result in P_HHF_HAir21.mdb

 

The resultant mdb appears in NWN 2 character creation screen

 

2 - Change some vertices of the mesh, without modifying the skin modifier

 

- Drag P_HHF_HAir21.mdb + P_HHF_skel.gr2 to NW2FBX : result in P_HHF_Hair21.fbx

- Import P_HHF_Hair21.fbx to 3DS Max 2018 with latest FBX plugin

- Change some vertices of the mesh, without modifying the skin modifier, and add skeleton=P_HHF_skel to properties of mesh

- Export to P_HHF_Hair21.fbx

- Drag just exported P_HHF_Hair21.fbx to FBX2NW : result in P_HHF_HAir21.mdb

 

The resultant mdb appears in NWN 2 character creation screen

 

3 - Change the mesh

 

- Drag P_HHF_HAir21.mdb + P_HHF_skel.gr2 to NW2FBX : result in P_HHF_Hair21.fbx

- Import P_HHF_Hair21.fbx to 3DS Max 2018 with latest FBX plugin

- Import a mesh included in a .0bj file. This is the same basic mesh that the one in the mdb, except I have qudified it, then divided each poly in four, using tesselate. Add modifier skin and rig to bones P_HHF_skel and Head and add skeleton=P_HHF_skel to properties of mesh

- Delete initial mesh

- Export to P_HHF_Hair21.fbx

- Drag just exported P_HHF_Hair21.fbx to FBX2NW : result in P_HHF_HAir21.mdb

 

The resultant mdb doesn't appears in NWN 2 character creation screen. Strangely the fbx is larger than the non-modified fbx (normal it has four time more poly), but the mdb is smaller.

Link to comment
Share on other sites

For a mesh to be recognized as hair, the object must have the following properties:

  • HSB_LOW = 0 or 1
  • HSB_SHORT = 0 or 1
  • HSB_PONYTAIL = 0 or 1

Look at an imported hair to see this properties as an example. The documentation of my tool is scarce. As far as I know, you are the first to try my tool for hairs.

 

Is there any reason why you add skeleton=P_HHF_skel to properties of mesh? My tool doesn't need this property because if the skeleton deforming a mesh is named P_HHF_skel, it assumes this is the skeleton name that must write in the skeleton field of the MDB.

Edited by FreshLook
Link to comment
Share on other sites

I am a bit lost between what was done with mdbutilities, and what does your tool. (sorry at my age we don't learn fast)

 

With MDButilities we had to put in the properties of the hair mesh

 

UIFlag=Alpha_test
trans=1
alphablend=0
addblend=0
skelfile=P_HHF_skel
type=skin

 

I have tried and it doesn't work. Then I tried this skeleton=P_HHF_skel which I found in this forum.

 

I just tried what you suggest (HSB_LOW = 1, HSB_SHORT = 0, HSB_PONYTAIL = 0) and it still doesn't work. I thought they went to properties of the Hair dummy (it's how it worked with mdbutilities). Here is an example of properties of an hair dummy :

 

Hairflag=ponytail

flag=2

type=hair

 

 

The log file looks like this :

Importing HAIR: P_HHF_Hair21 Dummy
  Shortening: 0 (LOW)
  Position: -7.43556e-09, -0.406086, -0.170106
  Orientation:
    -1.62921e-07 -1 2.66044e-14
    -1.62921e-07 -6.12333e-17 -1
    -1 1.62921e-07 1.62921e-07
Importing SKIN: P_HHF_Hair21
  Layers: 1
  UV elements: 1 eByPolygonVertex eIndexToDirect
  Normal elements: 1 eByPolygonVertex eDirect
  Tangent elements: 1 eByPolygonVertex eDirect
  Binormal elements: 1 eByPolygonVertex eDirect
  Polygons: #4124
  Skeleton name: P_HHF_skel
    2 3 0
    0 1 2
    2 1 4
 ........ a list of numbers by rows of three
    2487 2488 1118
    1118 1109 2487
Importing COLS: COLS_Head

Animation stacks: #1
  Animation layers: #1
    - Name: BaseLayer
      Animation curve nodes: 91
Importing animation: RootNode
Importing animation: P_HHF_skel
Importing animation: P_HHF_skel
  Rotations:
    0: [-17.1288 0 0] -0.148921 0 0 0.988849

.... then a list of rotation value, and this is repeated for each bones


    3.3: [0 0 0] 0 0 0 1
    3.33333: [0 0 0] 0 0 0 1
Importing animation: P_HHF_Hair21 Dummy
Importing animation: COLS_Head
Importing animation: P_HHF_Hair21

Output is P_HHF_Hair21.anim.gr2
Importing skeleton: P_HHF_skel
  Importing bone: P_HHF_skel
    Translation: -4.15215e-07 -3.34849 44.2403
    Rotation: -0.148921 -0 0 0.988849
    Scale: 1 1 1
    Inverse World Transform:
         1 -0 0 4.15215e-07
         -0 0.955645 -0.294521 16.2297
         -0 0.294521 0.955645 -41.2918
         0 0 0 1
  Importing bone: LLeg1

.... then same thing for each bones and it ends with the two next lines

Output is P_HHF_Hair21.skel.gr2

Output is P_HHF_Hair21.MDB
Edited by phil76
Link to comment
Share on other sites

The properties that my tool expects are not related to mdbutilities at all. I have never looked at how mdbutilites does things. It doesn't expect skeleton=P_HHF_skel either, it just looks what skeleton deforms a mesh in the FBX and takes its name.

 

You are right. The properties HSB_LOW, HSB_SHORT, HSB_PONYTAIL go to the Hair dummy, not the mesh. My mistake.

 

Could you send me the FBX to test it?

Link to comment
Share on other sites

The properties that my tool expects are not related to mdbutilities at all. I have never looked at how mdbutilites does things. It doesn't expect skeleton=P_HHF_skel either, it just looks what skeleton deforms a mesh in the FBX and takes its name.

 

You are right. The properties HSB_LOW, HSB_SHORT, HSB_PONYTAIL go to the Hair dummy, not the mesh. My mistake.

 

Could you send me the FBX to test it?

 

yes, how can I send the fbx to you ?

Link to comment
Share on other sites

 

The properties that my tool expects are not related to mdbutilities at all. I have never looked at how mdbutilites does things. It doesn't expect skeleton=P_HHF_skel either, it just looks what skeleton deforms a mesh in the FBX and takes its name.

 

You are right. The properties HSB_LOW, HSB_SHORT, HSB_PONYTAIL go to the Hair dummy, not the mesh. My mistake.

 

Could you send me the FBX to test it?

 

yes, how can I send the fbx to you ?

 

 

I send you a private message with my e-mail.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...