Search Unity

Easy Combine - Two Clicks Mesh Combining

Discussion in 'Assets and Asset Store' started by Sycoforge, Sep 18, 2016.

  1. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    Easy Combine

    Sign up for the public beta here.
    The beta subscription has been closed.

    The Easy Combine system provides a very simplified workflow for combining mesh objects.

    The intention behind this plugin was to give the artists/developers a two-click combine solution without the needs of manually building complex preparatory steps in the scene.

    Key Features
    • Easy usage
    • Non-destructive workflow
    • Scene overview
    • Mesh export
    • Group by Shader or Material
    • Lightmapping ready

    easy_combine_ss_artefacts.png

    easy_combine_ss_two_click.png

    easy_combine_ss_by_material.png

    easy_combine_ss_ui.png
     
    Last edited: Oct 5, 2016
  2. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    What would be the difference here?
    Can you explain this a little more in detail?
    If a model shares the same shader but a different material with another model - would they be able to be combined?
    If a model shared the same texture - but had a different shader as another model - would they be able to be combined?
     
  3. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    The material, as a semantic unit, is reffered here as shader instance.

    At the current state of the plugin, this is just to control how the objects get grouped (into meshes/submeshes). However, the split options will become more important when the texture baking feature will be introduced.

    Yes. Draw call reduction is only possible with the upcoming texture baking feature.
    But some improvements may be achieved when it comes to GI.

    These split mode permutations are possible.
    • None: One mesh with two submeshes. One submesh per material
    • Per Material: Two meshes with no submeshes.
    • Per Shader: One mesh with two submeshes. One submesh per material

    Yes. But no draw call reduction possible here (even with the texture baking feature).
    But some improvements may be achieved when it comes to GI.

    These split mode permutations are possible.
    • None: One mesh with two submeshes. One submesh per shader/material
    • Per Material: Two meshes with no submeshes.
    • Per Shader: Two meshes with no submeshes.
    Hopefully, this helped.
     
    theANMATOR2b likes this.
  4. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    I just imported Easy Combine into a project where I also have GPFX installed and I'm getting the following error after importing:

    Assets/nu Assets/GPFX/Scripts/Editor/DualBloomEditor.cs(7,36): error CS0118: `ch.sycoforge.Editor' is a `namespace' but a `type' was expected

    [EDIT]
    I realized I was one version out of date with GPFX so I installed the new version and the error goes away.
     
    Last edited: Oct 4, 2016
  5. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Will there be texture atlasing capability?
     
  6. DroidifyDevs

    DroidifyDevs

    Joined:
    Jun 24, 2015
    Posts:
    1,724
    Can this bake lightmaps on individual objects? For example, right now I'm working on a procedurally generated world, but because it is random I can't bake lighting which really bugs me.
     
  7. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    Since version 1.0.0 GPFX is part of the Sycoforge namespace to reduce redundancy.

    Yes. It's fixed on the dev timetable. It will be part of the 1.0.0 update.
     
    magique likes this.
  8. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    Easy Combine does prepare all meshes for GI baking, but is actually not a replacement for Unity's Enlighten.

    Is your world generated at runtime or at design time in the editor? It's important to create/prepare the other UV channels that Unity need for lightmapping.
     
  9. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    Version 0.9.7 available for download.

    Changelog

    Features
    • Combine: Added auto-group support for mesh selections with more than 65535 vertices.

    Fixes
    • UI: Fixed null-ref issue when inspecting an object with no materials. (ISSUE-K8N19O463V)
    • UI: Fixed OnSelectionChange event unhook when reloading/recompiling script context. (ISSUE-F8Q6A1X581)
    • Combine: Fixed issue when trying to combine objects with an empty material slot on their Renderer. (Subsequent ISSUE-K8N19O463V)
    • Combine: Selected objects can be reverted even if the parent object is not a CombineShadow instance. (ISSUE-9U4S9Q4341)

    Changes
    • UI: Popup notification slides top-down now to prevent multi-display issues.
    • UI: 'Revert Selected' button is now inaccessible when no objects are selected.
    • Combine: Changed parenting order.
     
    magique likes this.
  10. DroidifyDevs

    DroidifyDevs

    Joined:
    Jun 24, 2015
    Posts:
    1,724
    Basically I'm spawning prefabs as the player moves along. So I'm instantiating prefabs throughout the whole game.
     
  11. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    This makes it almost impossible to bake GI on those objects. The baked intensities/light bounces are location-dependent. A dynamic environment needs a dynamic GI volume or a presampled light probe grid. The amazing guy from @sonicether is in the process of developing exactly what you need.
     
    DroidifyDevs likes this.
  12. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    If I select a bunch of objects and some of them are dynamic will Easy Combine ignore the dynamic objects? In any case it would be nice to have an option to tell it to ignore dynamic objects.

    [EDIT]
    Through experimentation it seems to ignore dynamic objects, which I think is good. However, It is having issues with static items that have dynamic children. If the parent is static then it mesh combines the parent, but then the entire hierarchy ends up getting deactivated once the combined meshes are enabled. The problem is that the child objects, in this case, are a particle system and a point light. So they end up not being available in the combined scene. I can see why it's doing this, but what it should do is to disable the mesh renderer on the static object instead of deactivating it. That's the way Mesh Baker does it and it works better in this case.
     
    Last edited: Oct 9, 2016
  13. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Some more issues I can see are as follows:
    1. It combines meshes that currently have their mesh renderer disabled. This ends up enabling meshes that I may have been using for for collision purposes, but don't want visible.
    2. Despite what I thought about dynamic objects being ignored, I am seeing some dynamic objects being combined and then the original deactivated. So my item pickups are stuck to the floor and can't be picked up.
    3. The option to add a mesh collider might work for some things, but in my scene it causes meshes that are combined that didn't originally have a collider to now have one. With mesh baker it uses the disable mesh renderers on the original objects and thus the original colliders for all objects are used as well. If I tell Easy Combine not to generate a mesh collider then I would currently be left with a scene devoid of collision and all my original objects deactivated and would have to go back one by one and activate them and disable their renderers.
    4. When I bake lighting, there are lots of blotches all over the place.
     
  14. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    Thank you for sharing your thoughts. These are very valuable for us!

    We have plans to add an advanced settings panel to filter and exclude objects as a preprocessing step. But we also want to avoid a very cluttered UI with tons of settings and rules as this will deface the spirit of the plugin. The intention behind Easy Combine was to keep things as simple as possible.

    Dynamic objects are not ignored by default. Everything (meshes) that is selected in the moment you press the combine button, gets combined. While this is maybe not optimal for a "combine-the-whole-scene-at-once" approach, this is suitable for spatial grouped scenes following best-pratice guidelines for hierarchical and functional grouping.

    ec-scene-grouping.jpg

    Totally aggreed. A "keep-colliders" post-procession option is mandatory. It's already on the to-do-list.

    That's because the Unity UV mapper has its flaws with compound geometry (when working with shared UVs). When following the Enlighten guidlines on pages 9-10 the baking artifacts can be avoided.

    We are currently designing a rule set to move non-mesh objects into new groups. This will help getting rid of wrongly disabled elements in prefabs.
     
  15. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Thanks for responding. I am already grouping things fairly well, but I agree I can do more with separating out pickups and other things like that. It's a balancing act though because sometimes these separations are more complex to work with. For example, I can separate all lights and particle effects, but when you have objects like a torch that has a light and a particle effect it is obviously so much easier to prefab it and then just place the object all at once. Separation in these cases makes far more work than would be necessary. But I'll definitely be thinking about more efficient ways to get the best of both worlds.
     
  16. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    Confirmed. :)

    You are absolutely right. We are in the process of designing an lean (settings) workflow for composed prefabs. So any idea/input is highly appreciated.
     
    magique likes this.
  17. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Are there any updates to this? I haven't seen anything new for a long time. I'm really interested in the atlasing and keep-colliders functionality. Can we expect a new version soon?
     
  18. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    Yes. But everything is iterating somewhat slower because of the upcoming GDC. We are a small team and an event like this will delay the complete dev timetable.

    Unfortunately not. At least not in the next few weeks. We have a functional freeze until after GDC to ensure quality updates. But we have reserved some time for hotfixes and critical issues.

    I hope you can understand this. Thank you.
     
  19. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    OK, thanks for the update.
     
  20. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    Version 0.9.8 available for download.

    Changelog

    Features
    • Combine: Added initial support for skinned meshes (Base pose).
    • Core: Added support for Unity 5.6.

    Fixes
    • Export: Fixed issue when canceling path selection. (ISSUE-K8N19O463V)

    Changes
    • Structure: Harmonized package structure across all shared libraries.
     
  21. trooper

    trooper

    Joined:
    Aug 21, 2009
    Posts:
    748
    Can you make it sort the mesh renderers by material before it iterates through them so I get similar materials always combining first and not doubling up meshes when the 65k limit is reached?

    You could even look forward at the next 'group' to see if the total verts would fit in the remaining space and add them in, if not, split out to a new mesh and keep going.

    After combining i have 9 meshes but I think they should really be 6, here's what your tool creates:

    CombinedGarageProps_01_d (UnityEngine.Material) 18k verts
    CombinedGarageProps_03_m (UnityEngine.Material) 19k verts
    CombinedGarageProps_02_m (UnityEngine.Material) 10k verts
    CombinedGarageProps_01_m (UnityEngine.Material) 16k verts
    CombinedGarageProps_02_alpha_m (UnityEngine.Material) 1k verts
    log_wood (UnityEngine.Material) 1k verts
    CombinedGarageProps_03_m (UnityEngine.Material) 5k verts
    CombinedGarageProps_02_m (UnityEngine.Material) 3k verts
    CombinedGarageProps_01_m (UnityEngine.Material) 1k verts

    If you want to add this feature I'd be happy to test it.
     
  22. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    Added the "sorting thing" to the to-do-list. :)

    Actually, the combiner should handle this already. Can you post or send us a small video showing this? The combiner should only make a new mesh if the currently inspected mesh would not fit into the current mesh group.

    But this should be handled much better when the "Mesh Packer" feature will be released.

    Thank you for actively supporting the development of Easy Combine by sharing your thoughts and ideas!
     
  23. Deleted User

    Deleted User

    Guest

    Hi,

    Your solution works in runtime ?
    For example i import several obj or fbx file in runtime and use your solution for combining mesh.

    Thanks.
     
  24. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    Hi there,
    Yes, you can use the plugin to combine meshes at runtime. Please have a look at the online example here.
    If you need an evaluation version don't hesitate to ask. :)
     
  25. LukeDawn

    LukeDawn

    Joined:
    Nov 10, 2016
    Posts:
    404
    In 2018.2.7f1 I'm getting this error in the editor:

    Unloading broken assembly Assets/nu Assets/Shared/Scripts/Editor/ch.sycoforge.Unity.Editor.Workspace.dll, this assembly can cause crashes in the runtime

    As it's unloaded, it means Easy Combine doesn't work. Anyone else getting this?
     
  26. BitAssembler

    BitAssembler

    Joined:
    Jul 13, 2017
    Posts:
    90
    You can safely delete this library. It's legacy content. :)
     
    LukeDawn likes this.
  27. MoribitoMT

    MoribitoMT

    Joined:
    Jun 1, 2013
    Posts:
    301
    Couple of questions

    Does it auto handles over 64k vertices ( like only combines 64k, then goes the next mesh until new 64k ) ?
    Does it have ability to combine same material user objects into single object ?
    Will it have some kind of chunk mode, like we can select grid size, 8x8, so every cell chunk combined seperately ( easier for occlusion culling ) ?
     
  28. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    @Sycoforge Is atlasing still coming for this? If so, do you have any idea when? Thanks

    [EDIT]
    Also, why does this now only work on 2018?
     
  29. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    Yes.

    Yes.

    No. We have this on our brainstorm-roadmap. This feature could also be built on top of the current API.

    Hope this helped. :)
     
    MoribitoMT likes this.
  30. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    It's on the official roadmap. But I cannot give you an ETA for this.

    It does work on Unity 5.3.6+. We just changed the versioning scheme to a year-based one instead of the classic "Major.Minor.ReleaseRevision".
     
    magique likes this.
  31. MoribitoMT

    MoribitoMT

    Joined:
    Jun 1, 2013
    Posts:
    301
    Chunk mode could be amazing, I hope it arrives soon..
    I have seen "MeshBaker" asset's MeshGrouper it has amazing chunking / clustering modes, I do not like mesh baker interface, this is why I have eye on your asset too.. :D
     
    Sycoforge likes this.
  32. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    Don't forget that you can request an evaluation version, just like it's possible with all of our plugins. Just drop us a mail. Happy developing! :)
     
  33. MoribitoMT

    MoribitoMT

    Joined:
    Jun 1, 2013
    Posts:
    301
    Hi, the pivot point of combined objets goes far beyond off its center.. Any fix to this ?
     
  34. BitAssembler

    BitAssembler

    Joined:
    Jul 13, 2017
    Posts:
    90
    The pivot gets always set to the origin of the world space. You can activate the "Transform Space" option to transform the vertices to have the pivot within the parent's origin.
     
  35. Jackless

    Jackless

    Joined:
    Jan 9, 2018
    Posts:
    19
    Is the "add Mesh Collider" function broken at the moment? After combining a lot of static level assets i can walk through all of them although they apparently have a mesh collider on them...
     
  36. LukeDawn

    LukeDawn

    Joined:
    Nov 10, 2016
    Posts:
    404
    I'd like to see an origin option. I often build things in-situ in the world then combine, which is ok for the first one, but a pain when I want to reuse the prefab over and over. Would be nice to be able to combine and set the origin to the center of the combined meshes.
     
  37. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    We have some more advanced transform features on the roadmap. Have you tried using the "Transform Spac" option in conjunction with a single parent? This way the combined meshes get retransformed to the parent's space. Let me know if this helped for now.
     
    LukeDawn likes this.
  38. LukeDawn

    LukeDawn

    Joined:
    Nov 10, 2016
    Posts:
    404
    I'm getting a really odd result when exporting combined meshes as obj files. The resultant mesh seems to be a mirror image of what it should be.
     
  39. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    We have a look at this issue. On what Unity version are you? Is the whole mesh mirrored or just the normals?
     
  40. LukeDawn

    LukeDawn

    Joined:
    Nov 10, 2016
    Posts:
    404
    Image1.png 2018.2.12f1 It's the whole combined mesh. This is combined mesh of the windows (minus a material so it shows up better, and I've moved the combined mesh in the x axis to you can see it in comparison to the original building. It shows that the combined mesh is a perfect mirror image.
     
    Last edited: Mar 25, 2019
  41. LukeDawn

    LukeDawn

    Joined:
    Nov 10, 2016
    Posts:
    404
    Yes, I've narrowed it down now. It's the object exporter that is causing the mirroring. Once exported the resultant obj has a mirrored mesh

    Select the object to combine
    Step 1.jpg
    Combine it Step 2.jpg

    The resultant combined mesh is good
    Step 3.jpg

    Now export it
    Step 4.jpg

    The resultant obj file is mirrored
    Step 5.jpg
     
    Last edited: Mar 26, 2019
  42. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    Thanks for the additional information. Until it has been fixed, I recommend using the Unity FBX exporter.
     
  43. noobynobody

    noobynobody

    Joined:
    May 9, 2019
    Posts:
    75
    I got this error when importing. Using Unity 2018.4.8f1.

    System.InvalidOperationException: Operation is not valid due to the current state of the object.
    at Mono.Cecil.ModuleDefinition.ReadSymbols (Mono.Cecil.Cil.ISymbolReader reader) [0x0002f] in <a3989f8c34e6476eaca56644d5639ee8>:0
    at Mono.Cecil.ModuleReader.ReadSymbols (Mono.Cecil.ModuleDefinition module, Mono.Cecil.ReaderParameters parameters) [0x0004a] in <a3989f8c34e6476eaca56644d5639ee8>:0
    at Mono.Cecil.ModuleReader.CreateModule (Mono.Cecil.PE.Image image, Mono.Cecil.ReaderParameters parameters) [0x00081] in <a3989f8c34e6476eaca56644d5639ee8>:0
    at Mono.Cecil.ModuleDefinition.ReadModule (Mono.Disposable`1[T] stream, System.String fileName, Mono.Cecil.ReaderParameters parameters) [0x0000d] in <a3989f8c34e6476eaca56644d5639ee8>:0
    at Mono.Cecil.ModuleDefinition.ReadModule (System.String fileName, Mono.Cecil.ReaderParameters parameters) [0x0006c] in <a3989f8c34e6476eaca56644d5639ee8>:0
    at Mono.Cecil.AssemblyDefinition.ReadAssembly (System.String fileName, Mono.Cecil.ReaderParameters parameters) [0x00000] in <a3989f8c34e6476eaca56644d5639ee8>:0
    at AssemblyUpdater.Core.AssemblyUpdaterContext.ReadAssembly (System.String assemblyPath, APIUpdater.Framework.Log.IAPIUpdaterListener listener, System.IO.FileAccess mode, System.String nugetPath, System.String[] searchPaths) [0x00058] in <2fa25e32f701445881986f6fb8162ba1>:0
    at AssemblyUpdater.Core.AssemblyUpdaterContext.From (System.String assemblyPath, APIUpdater.Framework.Configuration.IConfigurationProvider configuration, System.String[] assemblySearchPaths, System.String nugetPath, AssemblyUpdater.Core.UpdaterMode mode, APIUpdater.Framework.Log.IAPIUpdaterListener listener) [0x00038] in <2fa25e32f701445881986f6fb8162ba1>:0
    at AssemblyUpdater.Core.AssemblyUpdaterContext.From (System.String assemblyPath, System.String[] assemblySearchPaths, System.String nugetPath, AssemblyUpdater.Core.UpdaterMode mode, APIUpdater.Framework.Log.IAPIUpdaterListener listener) [0x00001] in <2fa25e32f701445881986f6fb8162ba1>:0
    at AssemblyUpdater.Application.Program.CheckForObsoleteAPIUsage (AssemblyUpdater.Application.CommandLineSpec config, APIUpdater.Framework.Log.ConsoleUpdateListener logger) [0x00013] in <2fa25e32f701445881986f6fb8162ba1>:0
    at AssemblyUpdater.Application.Program.Main (System.String[] args) [0x00057] in <2fa25e32f701445881986f6fb8162ba1>:0
    UnityEditor.Scripting.APIUpdaterAssemblyHelper:DoesAssemblyRequireUpgrade(String)
     
  44. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    Thanks for connecting! Do you experience broken features? Unity sometimes displays this message because of minor issues that dont affect the actual functionality. Please let us know.
     
  45. AdrianoVerona_Unity

    AdrianoVerona_Unity

    Unity Technologies

    Joined:
    Apr 11, 2013
    Posts:
    317
    This usually means that you have some corrupted pdb file.

    Can you share your Editor.log

    If this is reproducible, can you file an issue?

    Adriano
     
  46. GambitMonkey

    GambitMonkey

    Joined:
    Apr 5, 2016
    Posts:
    65
    Is this project still being actively developed as it appears to have been a year since the last release? Was going to pick this up but if it has been abandoned then there is no reason.
     
  47. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    It's maintained and always tested in the latest version of Unity. There was no critical bug and no new feature added in a while.
     
  48. noobynobody

    noobynobody

    Joined:
    May 9, 2019
    Posts:
    75
    Is it okay to combine an object with a combined object, or should we revert the combined object first?
     
  49. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    Theoretically yes. :) But with time this will maybe create a little mess in the scene hierarchy because all the original game objects are still kept around.
     
    noobynobody likes this.
  50. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    You can ignore this message. It's related to a corrupted pdb file and does not affect the functionality of the plugin.