Search Unity

Unity Fbx Exporter - Export Meshes, Skinned Meshes, Terrains and Textures

Discussion in 'Assets and Asset Store' started by UnLogick, Oct 2, 2016.

  1. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    The Unity Fbx Exporter - windows only!
    Price: 100$ on the asset store

    The Unity Fbx Exporter is an easy to use powerful fbx exporter that will allow you to export models and even scenes from Unity. It works on skinned meshes, regular static meshes, cloth and even terrains!

    In addition it can export baked textures from any standard lighting material. This means you can bake your substances, uma atlasses or custom shaders! Please note that space aware shaders doesn't work at this time. (tri-planar, worldspace, reflection, refraction, etc.)

    The Unity Fbx Exporter uses the powerful fbx sdk from Adobe to deliver you robust compliant fbx files both binary and ascii!

    Supported 3rd party tools
    The resulting fbx files has been successfully tested with the following tools.
    • Maya and Maya LT
    • 3d Studio Max
    • Blender
    • Poser Pro
    • Unity
    If you wish to test my tool against a particular 3rd party tool not on the list please check the known issues and pm me in advance.

    How to use
    Simply open the Fbx Exporter Window by clicking on the "Window|Unity Fbx Exporter" Menu item.


    As you can see there is three export buttons
    1. Export Entire Scene
      This button will export every transform, mesh and skinned mesh in your scene as a single fbx file.
    2. Export the selected object(s) - as a single Fbx
      Simply select what you wish to export and press this button.
    3. Export the selected objects - as multiple Fbx
      Simply select what you wish to export and press this button.
    Best Practices
    Fbx files are not designed for unity scenes so when exporting scenes only the transforms and the geometry are saved, all components are lost. Also the meshes are duplicated for each position as there is no instancing support.

    While you can export multiple rigged characters into one fbx file, please note that Unity will still import the entire thing into ONE prefab and so you can only get one Mecanim Avatar from each fbx file. Making this a bad idea for characters intended to be imported back into Unity. It works fine to export multiple characters but one character per fbx file is recommended!

    Does this work from inside my game?
    This works inside both 64 bit and 32 bit standalone builds. All you have to do is select the native dll inside the DLL folder and

    Known Issues
    This list was updated: 06-11-2016

    DAZ Studio

    Not supported.

    Unity Import scale 100
    As with most other fbx files from Adobe tools you need to set the Unity import scale to 100

    Unity Materials only have diffuse texture set up
    This is I set up the materials with all information and other tools can link the file textures, but not unity. If someone has an example of this working that I can use for reference I'd be happy to fix this.

    Windows only!
    I plan to add mac/linux support at some point.

    No Animations
    The Fbx Exporter does not export animations, there is no immediate plans to add this functionality.

    Future Plans
    Progressing very slowly!
    • Keep it running without bugs!
    • Investigate how to support static mesh blendshapes
    • Add unity Lightmap export
    • Improved Terrain export (export huge terrain as LOD chunked tiles, with a texture for each)
    • Support worldspace shaders like Megasplat and models without uv (typical voxel generated terrain)
    • Add mac support
    Feedback and Support
    Please use this forum thread for feedback and support requests!

    Generated Sample Fbx for compatibility testing: UMA_Female_Unified_FbxExporter.fbx
     
    Last edited: Mar 20, 2018
    SecretAnorak likes this.
  2. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    Just had confirmation that the outputted fbx files works in Blender and Poser Pro!
     
  3. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    Opening week sale 50% off!

    Offers runs until 10-10-2016.
     
  4. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    Version 1.0.3 released
    Changelog
    Fixed a problem with static mesh placement.
     
  5. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    Using the Unity Fbx Exporter I took this scene and exported it as an fbx, then I imported it back into Unity and Maya.

    Please note that the materials are bound to loose some properties when exporting to fbx and importing back into various tools. So the tree leaves lost both their color tint and their transparency. And all specular parts lost their reflection cube maps. The effect of this is clearly visible in the difference between the first and the second Unity screenshots.

    In the third screenshot I've imported the fbx into maya and positioned the camera, I made sure that the textures resided in a Textures folder right next to the fbx file so that Maya could find the textures but other than that I've made no tweaks!






    As you can see the Maya lighting is very different and so is the field of view, but other than that everything was imported correctly.

    Tomorrow I'll add a similar set of screenshots for skinned meshes.
     
  6. jikkim55

    jikkim55

    Joined:
    Oct 6, 2016
    Posts:
    1
    I've just purchased your FBX exporter, but it doesn't work.
    I don't know the reason why there's no happening, when I tried Export Entire Scene and others.


    I would like to refund and cancel my purchase. Please reply me ASAP
     

    Attached Files:

  7. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    Hi jikkim55

    I'm sorry you had a bad experience. Perhaps you could send me the error messages in the console, that way I could probably fix it. It says there is a null reference of some sort.

    Come to think about it, I forgot to add defensive checks against mesh renderers with null meshes and meshes with null materials, this is most likely the cause of your problems. I will correct these mistakes immediately, you can expect a 1.0.4 update in a couple of hours.

    If you still wish to get a refund, please pm me the invoice number and I will contact unity to get you a refund.
     
  8. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    I've submitted version 1.0.4, I hope this will fix your problem.

    If my update does not fix your problem please post a screenshot showing your console window with the top most error selected.
     
  9. TechDeveloper

    TechDeveloper

    Joined:
    Sep 5, 2016
    Posts:
    75
    does it export vertex color information?
     
  10. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    @TechDeveloper yes, vertex colors are saved too.

    The normal uv is saved, but not additional uv channel. I haven't checked how complex it would be to add multiple uv channels.
    The only thing that is not exported is tangents, I'll try to add that later but since the fbx format is in a different world space than unity I deliberately postponed it.

    Also please note terrains are currently not supported, but I am gonna add a basic terrain support later.
     
  11. SecretAnorak

    SecretAnorak

    Joined:
    Mar 19, 2014
    Posts:
    177
    Works great!
    Being a ProBuilder user, I am really interested in exporting my prototype levels to build upon and refine in other modelling packages. So far, the output from this exporter has worked in every package I've thrown it at.

    Here's a unity scene made with ProBuilder:


    And in 3dsmax:


    And in Maya LT:


    And in 3dCoat:


    And in Blender:


    And in XNormal:


    Very happy, with the results so far, also happy how the object hierarchy comes across intact.

    I've known UnLogick for a while now, (mostly asking him for help), and have always found him to be keen to help and a bit of a perfectionist with what he does.

    Brilliant work UnLogick,.... Keep it up.
     
    theANMATOR2b and hopeful like this.
  12. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    Thanks man! I can't help but think of the disaster this would have been without you and the other beta testers, throwing all your tools at this. :)

    I tested out my clockwork based test scene in blender, at first everything was strangely transparent, apparently the textures alpha channel held data in them. After disabling the transparency and adding some lighting, but without doing anything else it ended up looking like this.


    Moving on to making screenshots for skinned meshes / rigged meshes.
     
  13. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    I started with the free Goblin Ranger package by Shunsuke Yamamoto exported one of the goblins as a binary fbx. I made sure to place the textures inside a Textures/ folder right next to the fbx file itself. This is the relative path that the Fbx Exporter writes into the generated fbx files.

    Blender
    I imported my fbx into Blender. It was tiny so I scaled it up by a factor of 100 (shortcut s for scale, and then while in scale mode just type "100" and press enter). It now had the right scale but was semi transparent so I went to the material and unchecked the entire Transparency group, this made it solid. But now I could see that the colors were wrong, it was quite gray so I move on to the texture and unchecked "Use Alpha", boom all the colors appear. Jobs Done! The rest was just setting up lighting.



    Maya
    I imported the fbx file into Maya and at a glance everything looked right, the scale was good the model was opaque. On closer inspection I could see the normal map was all horrible wrong. I found the material an followed the reference into the Bump Mapping, I notice the color space is set to sRGB which is technically incorrect so I set it to raw for good measure, that didn't fix the problem so I moved on and notice the "Alpha Gain" is set to 1, I set it down to 0 and boom everything looks good. Jobs Done!


    Unless I get any bug reports I'll just move on to adding terrain support.
     
  14. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    I'm still working on the terrain, but I thought I'd show you a couple of screenshots.


    First we have a very simple terrain made with Gaia.


    Then we have the same simple terrain now all in one fbx file. Both the terrains, trees, rocks and houses. Adding terrain texture support is a challenge of it's own that I'll be attacking later, right now I just offer a number of subsampling options.

    The true subtle trick of the screenshots is however is that Gaia terrains uses LOD, there is a lot of far off invisible trees, rocks and houses and the far away tree has lower quality than the trees closer to the camera. I have duplicated how Unity resolves the LOD and can offer the exact same results in the fbx export.

    The default LOD option is of course to export everything at maximum quality. But for big scenes this LOD option will allow you to capture the atmosphere of a location, without completely killing your system.

    Similarly while I give you the option to export the terrain at 1:1 resolution, the default option is to sub sample it down to whatever fits inside Unity's 64k triangle limit for a single mesh. The reason you want this is simple math, a terrain can often be a 2k x 2k heightmap, this translates into 4m quads or 8 million triangles! Believe me neither Maya, Max, Blender or Unity likes that. :)
     
  15. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    I had to dive deep into tech land to add these newest features for the upcoming 1.1 release.

    Texture Exporting!
    Through shader magic I am now able to export diffuse, specular and normal textures for almost any unity material... this means that you will get decent results even in third party tools that does not support your special unity shaders. As you can see it generates artifacts on transparent edges so I'll have to write some code that removes those.


    This here is a nice and simple terrain I cooked up with Gaia.


    And here is how it looks in Maya LT. Clearly it's not a 1:1 representation yet, but I think most people will agree that it's the same scene. And artists will be able to model stuff on top of this. Notice how the terrain has been converted into a 2k texture, horrible for nearby ground, but pretty good for distant mountains.

    New Features

    • Terrain
      You can select terrain quality from the exporter window
    • LOD
      You can filter which cameras the LOD is based on, you can toggle if the exporter should also use culling to export exactly what is visible.
    • Logging
      You can set multiple log levels for more or less information about the export
    • Texture Export
      You can select to export textures for Meshes, SkinnedMeshes and Terrains independently.
      You can control what size the exported textures should have.
      And finally you can control what color space the textures should use.
    • Clean Api
      I've added a new clean api for all of these new features. I made configuration classes for the LOD and the Texture system.
      In addition I made key methods virtual so you can override the configuration classes and add your own code to select lod levels and texture resolutions on a per item basis.

    Known problems

    Blender imported the mesh pieces at incorrect locations.

    I have several ideas on how to tackle this, the simplest would simply be to remove the deep hierarchy. I tried manually flattening the scene prior to export and that worked out nicely. Hopefully I'll find a better solution but that is certainly a possible fix.

    Maya running out of gpu memory.
    One thing I noticed is Maya resource consumption, in the above scene we only have around 20 materials, but I managed to make Maya run out of memory on it. First I thought it was my fault as I wasn't reusing the fbx materials among the meshes. I quickly fixed that but the problem continued and it seems Maya is loading the textures to the gpu on a per mesh basis.

    If someone has some information on how to avoid this in Maya I'd love to hear from you. But it seems to me that I'll have to include an export option where I combine the meshes that shares the same material into one, such preventing Maya from loading the textures multiple times.

    Transparent textures have dark edges
    I need to come up with a way to color the transparent pixels based on their nearest neighbors.

    Problem exporting non square textures
    This is a high priority issue for me, since it's blocking support for uma characters.
     
    AdamGoodrich likes this.
  16. imasa

    imasa

    Joined:
    Oct 25, 2016
    Posts:
    2
    Hello UnLogick, i have a question for you. I´m interesting to export uv channel 2, that contains lightmap inside, but i don´t know if the exporter do it. All this is because i´m trying take the lightmap generated .psd in Unity and the Uv channel 2 with the model inside, trying that works in another engine.

    Use Unity in this case to do lightmap and export all i need, to add all this in anothe engine.
     
    Last edited: Oct 25, 2016
  17. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    The fbx exporter does not support exporting of uv2 at this point in time. I plan to add it in the future, but unless a multitude of users request this we're talking at least a month into the future!
     
  18. imasa

    imasa

    Joined:
    Oct 25, 2016
    Posts:
    2
    Ok, i´m very interesting in this point to buy it, if you can send me a message to know when you finish this, i appreciate that :)

    Thanks for the quickly answer.
     
  19. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    Fbx Exporter v. 1.1 Released!
    There is some major goodies in here.
    • Terrains
      I've showed you screenshots, but now it's here!
    • LOD Groups
      You can now control which areas are exported in which qualities. Default is of course everything.
    • Texture export
      The Fbx Exporter can now generate Diffuse, Normal and Specular pbr textures for any standard lighting compatible material!
      Please note this export generates edge artifacts on transparent textures.
    • Dynamic Texture export!
      The texture export also works for dynamic materials like substances and UMA atlasses.
      Please note this export generates edge artifacts on transparent textures.
    • UV2, UV3 and UV4 support
      Allows you to export lightmaps, flowmaps, etc.
    • And of course a lot of bug fixes
      Most notably blender position bugs in nested hierarchies
    Enjoy!
     
  20. Forux

    Forux

    Joined:
    Oct 20, 2015
    Posts:
    8
    Hello, I post the review at the plugin.

    Thanks for fast reaction!

    I need that tiling that was set on textures, and there are two different tiling for two uvs. And it can be 1000 or 0.0001 and can be different for x and y.

    Also if it is possible i need renaming from utf8to English only because I need to use models in SketchUp and it becomes broken if model contains non-English characters in textures names at least or textures folders.
     
  21. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    I've been diving into the fbx format to set the texture scale, as usual setting the scale is not the problem, the problem is that 3ds max is doing some internal corrections. So that if I set a texture scale 2 it magically invents an offset that I then have to compensate for. And then the fbx file doesn't look the same in Unity and max.

    One of the big problem with the fbx format is that there are multiple ways to do everything but most tools only reads one of them. It would be helpful if you have a sample (simple) fbx file that has a texture both scaling and offset which works correctly in both Unity and max. Then I can analyze that and see what flag/setting they use to make it work.

    I hadn't thought about renaming transforms/meshes/materials/textures to ascii but that's an excellent idea. How would you want me to handle names that ends up being empty after applying the filter?

    It's around midnight here so I will continue tomorrow.
     
  22. kenshin

    kenshin

    Joined:
    Apr 21, 2010
    Posts:
    940
    Hi, nice idea!

    Does it works also outside the editor?
     
  23. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    Currently it only works on windows 64 bit, both editor and standalone.

    I'm hoping to get my hands on a mac so that I can add mac support. Since I'm relying on the native autodesk fbx sdk I will probably never add support for all the unity platforms: ios, android, webgl, playstation, xbox, etc.
     
    kenshin likes this.
  24. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    I'm having some difficulties with the texture scaling and offset bug.

    I can export it so that Unity is happy, or I can export it so that 3ds max is happy, but I haven't found a way to export it so they both happy with the same fbx file.

    One solution would be that you select which application you want the export for, but I've worked hard to avoid all the complex import/export settings that is normally associated with the fbx format so I would hate to do that.

    If any artists have an fbx file that correctly handles scaled textures in both max/maya and Unity I would appreciate a copy. I'm fairly certain it's possible, but I simply do not know which fbx flag to set. Having access to a working sample would allow me to reverse engineer the solution easily.
     
  25. M_Cios

    M_Cios

    Joined:
    Jan 9, 2017
    Posts:
    1
    Hi there, before i'm buying the exporter i need a question answered.
    Currently im using some obj exporter that probably happens to change the object's pivot point to 0/0/0 of the whole scene.
    Here are screenshots that should describe the problem.
    Object in unity

    Changed pivot point in blender. Same thing happens in maya 2017

    The thing is that i need the pivot point of objects exported from scene to be in the same exact place as in the unity editor. Can your fbx exporter do that? Thanks!
     
  26. SpikeP

    SpikeP

    Joined:
    Jan 10, 2017
    Posts:
    3
    Hi UnLogick

    We recently bought FBX exporter but we are facing some problems. All the exported textures are flat gray. (see the attached file pls)
    Is there a way to get the textures exported correctly? (i tried with the standard shader and the mobile vertex lit shader applied but both end with the same result...)
     

    Attached Files:

  27. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    That is very strange, I've never seen this kind of thing before. I've sent you a pm with my email, please send me an fbx that produce this result so that I can investigate further.
     
  28. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    Yes! The FbxExporter exports each mesh object with correct pivot points. However I'm seeing very high texture memory usage from having a large amount of objects in a scene. When exporting a full Gaia terrain scene with several hundred meshes I need to reduce texture ql significantly for Maya to load the scene correctly. I am joining the materials in the fbx file but still maya doesn't seem to share between the objects post import.

    As usual if anyone can provide me with a sample fbx file that handles hundreds of meshes with high res textures without killing Maya I can analyze it and replicate that in my fbx files.

    The Obj format does not contain transform hierarchies, so it's just something an obj exporter is badly suited for and not something that the Obj exporter developer can do anything about.
     
  29. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    Not to butt into the conversation - because I don't use this plugin and I'm not a Maya artist, but thought I might be able to help a little related to 3D stuff.
    Does Maya have an adaptive degradation setting, and also xref (cross referencing) setup for both textures and meshes? As a Max artist I always assumed Maya had related/similar tools that Max does specifically related to file management, and optimization workflow.

    Xref is the older process of allowing a scene to have 1000s of meshes consisting of 10s millions of polygons in one scene and keep a constant desired framerate.
    The newer (5+years old) adaptive degradation allows the user to set a constant framerate and Max will change the display setting per mesh object to mesh wireframe, outline, down to bounding box, and also degrade the visual quality of textures while still retaining the high resolution textures applied to all the meshes. There is also an extra setting on viewports to keep a high resolution texture, but only display 1024, 512, 256, 128 textures in all viewports. This is helpful when dealing with very large dense scenes when creating animations or working on compositing complex particle systems into a scene.
     
  30. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    Your input is most welcome, I honestly cannot imagine that this is a true limitation of Maya. However since I'm not an artist my knowledge of the inner workings of max and maya is very limited.

    If you could provide me with an fbx that have this xref set up correctly so that when you import it back into max it just works that would be really helpful. It is very likely that Maya is set up to correctly load Max's fbx files with whatever internal tech maya uses for this. If you can help me get this working I see no problem in giving away a voucher for such crucial help.
     
  31. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    I highly doubt this is a Maya limitation - to agree with you.
    Unfortunately/fortunately I have no need for this workflow anymore so I do not have 'files' setup this way. As a previous contract animator I've received files setup like this in the past, but I can not share those files - and it is not a trivial workflow to setup a file to be used in this manner. Usually this is a workflow created to allow for multiple stages of development to occur at the same time, level design, lighting, modeling, animating, post effects - etc.

    Another workflow I forgot to mention (I know Maya has this setup) is layers. Separate layers can have different meshes, different lighting support, and different viewport display settings to show one layer in bounding box mode, one layer in wire frame display, and another layer in full high poly mesh and full texture resolution level. This is similar to an adaptive degradation but is layer based so I were to put all my trees on a separate layer they could be represented by bounding boxes or even low poly proxy models when performing other design/development work.

    Friendly suggestion - I think it would be beneficial to befriend a Maya artist to assist with this issue. :)
     
  32. saverermreve_unity

    saverermreve_unity

    Joined:
    Jan 30, 2017
    Posts:
    1
    I'm having an unusual issue that's likely not explicitly related to only this exporter, but ever since I started using a 4k monitor I've had issues with windows not appearing on screen. When I select Unity Export FBX from the window menu nothing happens, nothing pops up and nothing appears in the console. Any suggestions? Usually I can get around this with windows key + direction arrow and the window will walk left and right. But this isn't working in this case.
     
  33. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    That sounds very weird, I'm not sure this will help but have you tried to load default layout in unity? That should discard the incorrectly cached window position and make the window spawn on a proper location again.
     
  34. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    Due to lack of sleep during my paternity leave I've asked @SecretAnorak to handle support for the remainder of the month.

    Secret Anorak has been using the fbx exporter since it's beta stage and I expect him to be able to answer most questions quickly and accurately. Of course he does have a direct chat line with me in case something serious pops up.

    I'll be back early April to properly address any issues that might have popped up.
     
  35. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    Congrats! Now the real work begins. :eek:
     
    hopeful likes this.
  36. FernandoHerrera

    FernandoHerrera

    Joined:
    Mar 14, 2017
    Posts:
    1
    @SecretAnorak @UnLogick

    Hello, my textures are not exporting correctly I get an all black png for a diffuse. Any idea why that happens?

    Thanks
     
  37. SecretAnorak

    SecretAnorak

    Joined:
    Mar 19, 2014
    Posts:
    177
    Hi Fernando, what version of Unity are you using and what shader do you have on your model?

    If you could drop me a zip with an example scene that would be fabulous. Drop me a PM and I'll give you an address to send it to.

    Hopefully we can get you up and running quickly.
     
  38. Lempereur

    Lempereur

    Joined:
    Dec 18, 2015
    Posts:
    7
    Hey,

    Just bought FBX Exporter and so far so good but I had a question about the export process.

    Is there a way to add additional attributes to object definitions as part of the FBX export process?
     
  39. SecretAnorak

    SecretAnorak

    Joined:
    Mar 19, 2014
    Posts:
    177
    Hi Lempereur, glad you're getting the results you're after.

    Unfortunately I'm not entirely sure I understand what you're asking for (I'm not as bright as UnLogick). Any chance you could give an example?
     
  40. Lempereur

    Lempereur

    Joined:
    Dec 18, 2015
    Posts:
    7
    Thanks for your reply.

    In the the ASCII version of an FBX file, you have defined at the top the ObjectType: "Model". Each object contains the PropertyTemplate. I'm looking for a way to modify the exporter to insert additional Properties specific to a model type that can be used in a third party modeling application via scripting.
     
  41. SecretAnorak

    SecretAnorak

    Joined:
    Mar 19, 2014
    Posts:
    177
    Hi there Lempereur, as I suspected, that's a bit beyond what my temporary support can offer.

    However, I have had a quick chat with UnLogick and it sounds like what you're after is not outside the realms of possibility. The tricky part is making a suitable way to specify what additional attributes to add.

    Sorry I can't be much more help but if you could be patient and wait for UnLogick to return from his paternity leave, I'm sure he can help you out. Hopefully he will be back in a week or so.
     
  42. Lempereur

    Lempereur

    Joined:
    Dec 18, 2015
    Posts:
    7
    Thanks again for your reply.

    I've done some digging of my own in the meantime and may have come across a possible solution. It might be possible to create a new binding in the UntiyFbxExporterBinding.cs to the FBX SDK method that allows you to add object properties.

    I'm not extremely familiar with the FBX SDK, so without testing it myself it's a shot in the dark. However it looks promising. Still in the research stages of the solution, and there's the additional part needed on the other end of the pipeline where the properties will be used that I also have to research, so there's a few aspects to the whole shebang that still need to be sorted.
     
  43. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    Well it seems like you did your research. The FBX SDK does have an api method for adding an attribute, so I know we can make it work, however we still need to find a good way to control which attributes gets added where. In the fbx format every mesh and transform usually have 2+ FBX objects and we need to add the attributes to the right objects. For me to map the sdk method is trivial, but I need to come up with some sort of callback that you can hook into where you get the intptr for the right fbx objects so that you can add the attributes you want.
     
  44. Lempereur

    Lempereur

    Joined:
    Dec 18, 2015
    Posts:
    7
    I understand FBX format has a minimum of two objects, one is the parent, and the mesh is another object attached to the parent. I would assume the attributes would need to be added to the parent objects. I believe It would be the Model ObjectType Properties is where they would best be added. Again, not knowing a whole lot about the FBX formatting, this is a very limited educated guess. But I am assuming the callback you'd come up with would be capable of adding the properties to any object regardless of the type?
     
  45. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    What I was thinking would be a generic callback for every "fbx node" as well as specialized callback for meshes, materials and textures. The goal would be to provide both the native intptr as well as the corresponding unity object.
     
  46. Lempereur

    Lempereur

    Joined:
    Dec 18, 2015
    Posts:
    7
    You'll have to forgive me for not fully understanding. Is the intptr basically the hash value associated with the unity object? Would the function be run during the processing of the fbx exporter? or would it insert the properties after the export has completed? My best guess would be that it would be ideal to insert the properties on a per object basis during the export process, basically by taking the name of whatever node is being exported, looking for the corresponding object data that is to be inserted as properties, and create the properties as you go through the Unity hierarchy.
     
  47. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    The intptr I keep mentioning is a native pointer to the fbx sdk objects. In short I know how to add support for this feature, but it might still take you a couple of tries to get exactly what you expect.
     
  48. eaiinfo

    eaiinfo

    Joined:
    Oct 29, 2014
    Posts:
    7
    So just to confirm. I have a complex scene that is taking way too long to lightmap and keeps crashing my computers... I want to purchase this tool so that I can break apart the scene and do subsections of the scene and lightmap them individually, then export these subsections with this tool with all my baked lighting in tact.

    Then I will reimport everything back into Unity and save my scene with the new FBX objects with all my baked lighting in the objects instead of in the scene

    Sound doable?
    I'll purchase immediately if so
    Thanks
     
  49. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    Hey @gmort346

    It sounds very interesting, I have never tried anything like that. All I can say for sure is that the Fbx Exporter does export all mesh uv channels. It certainly does not export the light maps themselves so all of this would come with some assembly required.

    Feel free to purchase it and try it out, if it doesn't work just pm me with the invoice number and I will contact Unity to get you a refund
     
  50. Iegor-Malovanyi

    Iegor-Malovanyi

    Joined:
    Aug 30, 2014
    Posts:
    4
    Hi!
    Just faced with a problem - can't export scene with baked lightmap.
    I tried Unity 5.4.0 and Unity 5.6.0 - same problem, no lightmaps in final scene, but in the message from Nov 6, 2016 you mentioned updates to version 1.1:
    • UV2, UV3 and UV4 support
      Allows you to export lightmaps, flowmaps, etc
    Please help, I really need lightmaps in my scenes