Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Capsule - Batch Blender to Unity FBX Plugin

Discussion in 'Asset Importing & Exporting' started by Takanu, May 6, 2016.

  1. Takanu

    Takanu

    Joined:
    May 6, 2016
    Posts:
    5
    Hey, I've been developing a plugin for Blender called Capsule, that can batch export assets as FBX files from Blender, ready to use in Unity. It augments the in-built FBX exporter in Blender, letting you automate the export of hundreds of objects in a scene with a single click, with other great features like re-usable Export Presets, automated export organisation tools and more.



    You can pay what you want for it on Gumroad - Link

    FEATURE LIST
    Batch Exports
    - Mark hundreds of objects and groups in a scene for export, and export them all with one click. If you've made changes to assets in the scene and need to re-export them, it's as simple as one more click.
    Export Lists - Get an overview of all objects prepared for export, and quickly change their settings from the list.
    Export Presets - Create detailed sets of export settings that define how your objects and groups get filtered and processed into FBX files, and that can be simply applied to objects and groups in the scenes.
    Tags and Passes - Passes let you export your objects and groups in multiple ways, creating a separate FBX file for each pass, whereas Tags let you define automatic filtering rules that make your passes even more powerful.
    Unity Tools - The plugin includes a special, in-built Unity preset that ensures exported models appear exactly as they do in Blender, fixing scale and rotation issues. I also hope to add additional tools, such as a Unity import script that lets you bundle collision and other asset types in an FBX file.

    If you have any issues in using it, or any other questions, suggestions or bugs, feel free to post and i'll help you out :)
     
    Last edited: May 23, 2016
    Alverik and steego like this.
  2. _GimbalLock_

    _GimbalLock_

    Joined:
    Feb 26, 2013
    Posts:
    137
    Very cool, after Maya got the game exporter I was wondering if anyone was cooking something up similar to it for Blender!

    Question, is it possible to have this plugin zero out the transforms for each object flagged for export? I tend to move and group things in a scene. When I've worked in Maya I would let the plugin handle zeroing transforms. In Blender I normally did it manually.

    Either, cool plugin & nice work!
     
  3. Takanu

    Takanu

    Joined:
    May 6, 2016
    Posts:
    5
    Hey, the plugin doesn't yet reset the rotation and scale of objects, but it's something i'm working on and will have added in the next few days. The location of objects and groups however will. For object exports, you can define whether the plugin uses the object or scene origin point, and for groups, you can pick the scene origin or the location of any other object in the scene.
     
    _GimbalLock_ likes this.
  4. PlatformSix

    PlatformSix

    Joined:
    Feb 27, 2014
    Posts:
    57
    Hey @Takanu, thanks a bunch for your work on this, I've been using Capsule (and GEX before) and it really makes life a lot easier!

    One question though... I can't seem to get Groups to export correctly.
    - If I don't specify an origin object, the export silently fails.
    - If I specify an empty as an origin object, the export silently fails
    - If I specify a mesh as origin object, the export succeeds, BUT that mesh is omitted from the export!

    What am I doing wrong here? Is there a setting I need to change somewhere?

    EDIT: I found a temporary solution to the above issue: I noticed that groups export correctly when using the "Basic Export All" preset. By elimination I found if you go into the Capsule settings, to the preset that suffers from this problem, to "Tags" select "Collision" and delete "_CX" from the "Tag" field, groups will export correctly.
     
    Last edited: May 13, 2016
  5. Takanu

    Takanu

    Joined:
    May 6, 2016
    Posts:
    5
    Hey, sorry to hear that! :X

    This may be to do with the way the preset is setup, if you haven't changed any settings from the default Unity 5 saved preset (something I've changed in the most recent version to avoid confusion).

    Go to the Passes menu in the add-on preferences and un-tick all the filters under the "Filter by Tag" heading. That pass will then export anything that a group has, rather than only including objects in that group that meet the Tag criteria.

    You can use Tags to match any naming conventions you might have in your scene (such as objects for Low-Poly, High-Poly, Collision, etc), to use in passes, letting you automatically split and divide asset types into different FBX files. It's useful for creating different FBX files for normal map baking or game-ready assets :)
     
    Last edited: May 18, 2016
  6. Takanu

    Takanu

    Joined:
    May 6, 2016
    Posts:
    5
    I forgot to mention that I recently released Version 1.01 of Capsule. This is a crucial update for anyone using the Unity 5 preset included in the plugin as it fixes various bugs and issues with it, including:
    • Fixed an issue where if the Delete All feature was used on the Export List, enabling any new objects or groups wouldn’t make them get added to the list
    • Changed the default UE4 and Unity presets so tags aren’t turned on by default, making it less confusing for new users to use.
    • Fixed more Unity bugs… again! Unity now properly works without issue.
    • Fixed an issue that stopped Individual Exports from working
    The update is available from Gumroad (Link), where you can pay what you want for it, as well as GitHub (Link)
     
    Last edited: May 23, 2016
  7. pawelf

    pawelf

    Joined:
    Jun 1, 2016
    Posts:
    5
    Hey Takanu, i installed your addon and i don't have built in presets for Unity/UE4. Maybe you can know what's going on?
     
  8. pawelf

    pawelf

    Joined:
    Jun 1, 2016
    Posts:
    5
    I found your solution on blenderartist forum. I need to disable and enable again addon in user preferences.
     
  9. Takanu

    Takanu

    Joined:
    May 6, 2016
    Posts:
    5
    Yeah, apologies for this! I'm looking into it, and will push an update to GitHub and Gumroad as soon as it's fixed :)
     
  10. Eriks-indesign

    Eriks-indesign

    Joined:
    Aug 15, 2012
    Posts:
    50
    I'm getting this error when trying to export.



    I'm currently using blender 2.78
     
  11. scedric

    scedric

    Joined:
    May 13, 2013
    Posts:
    4
    Hello Takanu,
    I have been using your addon for a few days, it's very promising!
    The issue I get is that it won't export custom normals no matter the option set for the normals export.
    It works fine when I export the object with the fbx exporter however with capsule the normals are messed up even when triangulate is disabled.
    Do you have any idea?
    Thanks!
     
  12. GravenFear

    GravenFear

    Joined:
    May 26, 2015
    Posts:
    11
    So two things I would request that I think could improve this quite a bit (NOTE: this applies to exporting with the unity 5 presets):
    1.
    Have your script call undo (ctrl Z) after it's finished because it positions and rotates the models to adjust for unity. Calling undo would just position them back to where they were (or at least it does when I manually do it).
    2.
    Can you add the option to bake animations. Exporting the armature and mesh separately isn't really useful for importing into unity.
     
  13. bmouret

    bmouret

    Joined:
    Dec 19, 2018
    Posts:
    2
    Hi, Really nice features ! Is there an option to export hierarchized object in the same FBX ?