phil76 Posted February 1, 2018 Share Posted February 1, 2018 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 FBX2 - 3DS Max import FBX3 - 3DS MAX save as FBX4 - 3DS MAX reset scene5 - 3DS Max import FBX saved during 3 above Link to comment Share on other sites More sharing options...
FreshLook Posted February 1, 2018 Author Share Posted February 1, 2018 Is there a reason to save a FBX and reimport it later? Would saving as max file to reopen it later serve you better? Link to comment Share on other sites More sharing options...
phil76 Posted February 2, 2018 Share Posted February 2, 2018 (edited) 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 February 2, 2018 by phil76 Link to comment Share on other sites More sharing options...
phil76 Posted February 2, 2018 Share Posted February 2, 2018 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 More sharing options...
FreshLook Posted February 2, 2018 Author Share Posted February 2, 2018 (edited) For a mesh to be recognized as hair, the object must have the following properties:HSB_LOW = 0 or 1HSB_SHORT = 0 or 1HSB_PONYTAIL = 0 or 1Look 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 February 2, 2018 by FreshLook Link to comment Share on other sites More sharing options...
phil76 Posted February 2, 2018 Share Posted February 2, 2018 (edited) 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_testtrans=1alphablend=0addblend=0skelfile=P_HHF_skeltype=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=ponytailflag=2type=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 February 2, 2018 by phil76 Link to comment Share on other sites More sharing options...
FreshLook Posted February 2, 2018 Author Share Posted February 2, 2018 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 More sharing options...
phil76 Posted February 2, 2018 Share Posted February 2, 2018 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 More sharing options...
FreshLook Posted February 2, 2018 Author Share Posted February 2, 2018 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 More sharing options...
phil76 Posted February 2, 2018 Share Posted February 2, 2018 OK, thanks Link to comment Share on other sites More sharing options...
Recommended Posts