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. Dismiss Notice

Pro Material Combiner, Combine Materials Quick and easy with just 2 clicks!

Discussion in 'Assets and Asset Store' started by jmunozar, Feb 12, 2015.

  1. nadhimali

    nadhimali

    Joined:
    Apr 4, 2015
    Posts:
    17
    Tons of errors
    Not working after purchase
    even your example doesn't work
    Stuck on message saying (Optimization in progress ..)

    Couldn't create asset file!
    UnityEditor.AssetDatabase:CreateAsset(Object, String)
    ProMaterialCombiner.MaterialCombiner:CombineMaterials(Boolean, String, Boolean, Boolean) (at Assets/ProMaterialCombinerPlusPlus/Editor/Core/MaterialCombiner.cs:102)
    ProMaterialCombiner.CombinableObject:CombineObject(String, Boolean, Boolean) (at Assets/ProMaterialCombinerPlusPlus/Editor/Core/CombinableObject.cs:63)
    ProMaterialCombiner.ProMaterialCombinerMenu:OnGUI() (at Assets/ProMaterialCombinerPlusPlus/Editor/ProMaterialCombinerMenu.cs:228)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)




    UnityException: Creating asset at path Leve-Atlas\Combined [Blocks 1 (1)]20966\1 Standard-Opaque-Mai8172602Mat.mat failed.
    ProMaterialCombiner.MaterialCombiner.CombineMaterials (System.Boolean usesSkinnedMeshRenderer, System.String customAtlasName, System.Boolean reuseTextures, System.Boolean generatePrefabs) (at Assets/ProMaterialCombinerPlusPlus/Editor/Core/MaterialCombiner.cs:102)
    ProMaterialCombiner.CombinableObject.CombineObject (System.String customAtlasName, System.Boolean reuseTextures, System.Boolean generatePrefab) (at Assets/ProMaterialCombinerPlusPlus/Editor/Core/CombinableObject.cs:63)
    ProMaterialCombiner.ProMaterialCombinerMenu.OnGUI () (at Assets/ProMaterialCombinerPlusPlus/Editor/ProMaterialCombinerMenu.cs:228)
    System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <437ba245d8404784b9fbab9b439ac908>:0)
    Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <437ba245d8404784b9fbab9b439ac908>:0)
    System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <437ba245d8404784b9fbab9b439ac908>:0)
    UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at <6f28216fea9f453abf2e05b770ed3ee4>:0)
    UnityEditor.HostView.Invoke (System.String methodName) (at <6f28216fea9f453abf2e05b770ed3ee4>:0)
    UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition, UnityEngine.Rect viewRect) (at <6f28216fea9f453abf2e05b770ed3ee4>:0)
    UnityEditor.DockArea.DrawView (UnityEngine.Rect viewRect, UnityEngine.Rect dockAreaRect) (at <6f28216fea9f453abf2e05b770ed3ee4>:0)
    UnityEditor.DockArea.OldOnGUI () (at <6f28216fea9f453abf2e05b770ed3ee4>:0)
    UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Boolean canAffectFocus) (at <a6a3aac9b47844afbb8dcc407683ae01>:0)
    UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Boolean canAffectFocus) (at <a6a3aac9b47844afbb8dcc407683ae01>:0)
    UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Boolean canAffectFocus) (at <a6a3aac9b47844afbb8dcc407683ae01>:0)
    UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUI (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus) (at <a6a3aac9b47844afbb8dcc407683ae01>:0)
    UnityEngine.UIElements.IMGUIContainer.HandleEvent (UnityEngine.UIElements.EventBase evt) (at <a6a3aac9b47844afbb8dcc407683ae01>:0)
    UnityEngine.UIElements.CallbackEventHandler.HandleEventAtTargetPhase (UnityEngine.UIElements.EventBase evt) (at <a6a3aac9b47844afbb8dcc407683ae01>:0)
    UnityEngine.UIElements.MouseCaptureDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <a6a3aac9b47844afbb8dcc407683ae01>:0)
    UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <a6a3aac9b47844afbb8dcc407683ae01>:0)
    UnityEngine.UIElements.EventDispatcher.ProcessEventQueue () (at <a6a3aac9b47844afbb8dcc407683ae01>:0)
    UnityEngine.UIElements.EventDispatcher.OpenGate () (at <a6a3aac9b47844afbb8dcc407683ae01>:0)
    UnityEngine.UIElements.EventDispatcherGate.Dispose () (at <a6a3aac9b47844afbb8dcc407683ae01>:0)
    UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <a6a3aac9b47844afbb8dcc407683ae01>:0)
    UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at <a6a3aac9b47844afbb8dcc407683ae01>:0)
    UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at <a6a3aac9b47844afbb8dcc407683ae01>:0)
    UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <a6a3aac9b47844afbb8dcc407683ae01>:0)
    UnityEngine.UIElements.UIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <a6a3aac9b47844afbb8dcc407683ae01>:0)
    UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <59837000ebf54955a9cb1d31caa86097>:0)
     
    Last edited: May 16, 2020
  2. jmunozar

    jmunozar

    Joined:
    Jun 23, 2008
    Posts:
    1,091
    Hello, could you please contact me to my email so we can sort this out?. I just have another customer that had this issue and seems it’s a problem with the asset store. Looking forward to hear from you ! :)
     
  3. nadhimali

    nadhimali

    Joined:
    Apr 4, 2015
    Posts:
    17
    Hi, sure I will
     
  4. nadhimali

    nadhimali

    Joined:
    Apr 4, 2015
    Posts:
    17
    Thank you for your support
    works fine after your email
     
  5. jmunozar

    jmunozar

    Joined:
    Jun 23, 2008
    Posts:
    1,091
    Yess!!, glad it worked out :).
     
  6. rc318

    rc318

    Joined:
    Apr 16, 2018
    Posts:
    4
    I'm having this same issue
     
  7. jmunozar

    jmunozar

    Joined:
    Jun 23, 2008
    Posts:
    1,091
    Hello, seems there is an issue with the Asset store, Currently I am pushing an update of the tool and should be live within the next couple of days; Being said that. Could you contact me on my support email with the order number so I can share with you the version that is sent for review?
     
  8. cjackcandy

    cjackcandy

    Joined:
    Sep 8, 2013
    Posts:
    23
    Hi,
    Is this asset still supported?
    The latest released version on April 17, 2020 (v1.36) seems to be causing multiple errors judging from the above posts. @jmunozar indicates above (in June) that an update is coming; however, doesn't appear that ever happened (if the April date shown on the asset store is correct). Trying to decide whether or not to purchase this asset, but can't tell if it is works as advertised or if it is still supported. Also, does this asset only work on single color texture/materials? The pictures in the asset store seem to indicate this. My use case is a player character that has nine different materials, each material has its own set of diffuse, normal, and metallic textures which are complex (not single color). I'd like to know if anyone has successfully used this tool to combine these types of materials. FYI, I'm using Unity 2020 and all materials are using the same standard shader.

    Thanks in advance for any insight anyone can provide.
     
  9. jmunozar

    jmunozar

    Joined:
    Jun 23, 2008
    Posts:
    1,091
    Hallo Hallo There,

    Yes, its still supported and if someone has purchased the tool and is having issues I am always more than happy to figure things out through either email, posting here or sending me a DM.

    An update is still pending and its taking me more time that I would like to; not only because of time constraints / work and whatnot but also since there have been so many changes in the way Unity handles rendering I have come up with some roadblocks that I still need to figure out. I will contact you through a DM to inquire better about your specific case.
     
    Last edited: Mar 16, 2021
  10. cjackcandy

    cjackcandy

    Joined:
    Sep 8, 2013
    Posts:
    23
    Thank you for the quick response. Dumb question: how do you DM? Does this forum allow this, or do you use Discord or some other method?
     
  11. jmunozar

    jmunozar

    Joined:
    Jun 23, 2008
    Posts:
    1,091
    I just sent you a DM, but to send a DM just click on my name and hit "Start a conversation" :) Cheers! :)
     
  12. cjackcandy

    cjackcandy

    Joined:
    Sep 8, 2013
    Posts:
    23
    I'm happy to report that this asset is alive and well supported! Juan went well above and beyond in helping me figure out if this asset would meet my use case. Turns out, that it does not; however, letting me try the asset out before buying it, is very much appreciated! Turns out that ProDrawCall optimizer is the right tool for what I needed. Juan sent me that package to try out and then proceeded to work with me via several emails over a period of an hour or so, and in the process, he taught me not only how to use the tool, but also how to modify my texture import settings so that they worked with the tool. FYI - I'm using ProDrawCall Optimizer under Unity 2020.3 (standard shedder) and it works great!
     
  13. RREALITY

    RREALITY

    Joined:
    Jul 17, 2013
    Posts:
    6
    hi, I was looking for a material combiner and I found you.

    I tried to combine all 3 materials used in this bamboo tree found on sketchfab:




    This is what I got, the left one is the original and the right one is after using your tool. I am curious to find what causes this visual difference with the combined materials and is there a way I can make it better.

    Edit: I looked at the console, and saw a warning saying:
    Malformed UV Map for 'Bamboo Tree' some meshes might look bad when atlassed.
    UnityEngine.Debug:LogWarning(Object)

    I saw you already answered the question earlier, I will watch your video first. Thanks!



    Thanks for your time.
     
    Last edited: Jul 24, 2021
  14. jmunozar

    jmunozar

    Joined:
    Jun 23, 2008
    Posts:
    1,091
    Hello @RREALITY,

    Sorry for the late reply ^^", I was outside the city. I Noticed that you saw the console log :) hehe, yup, if UVs are outside of [0,0 - 1,1] then your mesh will look strange; still on this case, your mesh looks kinda good.

    It is expected that when you finish the atlasing and material combine process you will have to tweak your shader, either to adjust the alpha values or tinting, since the tool when the process finishes, it leaves the shader with its default values since if you have different shaders with different tweaked values the tool will now know which one to use.

    Do tweak the final generated material values and you should end up with a similar material than your original. In this case I would say its a matter of tinting and modifying the cutout value a little bit :).

    Hope it helps!, and thanks for supporting my work! :)
     
  15. DamirS

    DamirS

    Joined:
    Aug 28, 2013
    Posts:
    19
    Hi,
    i bought the asset and have the problem that the newly created Prefab + Mesh doesnt have Lightmap UVs. So lightmapping doesnt work.
    Unity 2019.4 Built-in

    Any ideas?
    cheers
     
  16. jmunozar

    jmunozar

    Joined:
    Jun 23, 2008
    Posts:
    1,091
    hello @DamirS,

    Thanks for supporting my work!, Unfortunately ProMaterialCombiner only compresses the materials that have the gameobject and doesnt process other UV channels since there is a new texture generated. The best workaround would be to combine the materials and then after calculate lightmaps.

    I have DMd you for more details on your specific project to see how can I help you out with that :)