Search Unity

► Mesh Materializer ◄

Discussion in 'Assets and Asset Store' started by Arkhivrag, Jan 27, 2015.

  1. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    DirectX 11 Low Poly Shader renders any mesh in low-poly style without converting mesh or baking texture and has no limitation on vertex count, but requires device with geometry shaders support.

    Low Poly Mesh Generator bakes texture inside mesh vertex color and can be used on any device. Max allowed vertex count per-mesh is 21.000. Baked mesh also will have increased vertex count.



    VacuumShaders - Facebook Twitter YouTube
     
  2. udede

    udede

    Joined:
    Jul 26, 2011
    Posts:
    72
    Hi

    Built-in support for Substance Designer materials has been removed from Unity. To continue using Substance Designer materials, you will need to install Allegorithmic's external importer from the Asset Store.

    Any ideas how to fix this?
     
  3. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    You will need to install Allegorithmic's external importer from the Asset Store.
    Manually extract texture from the material and use it with any simple shader. Mesh Materializer then will bake it into vertex color.
    Currently there is no other way.



    VacuumShaders - Facebook Twitter YouTube
     
  4. ParadoxSolutions

    ParadoxSolutions

    Joined:
    Jul 27, 2015
    Posts:
    325
    Been thinking of a way to add transparency to vertex colors, the default vertex shaders don't seem to support alpha channels but I do see in the legacy shaders there is a transparency setup that supports a mask. Is there a new vertex color shader that supports alpha transparency that I am missing, or is that not possible for some reason? I'd like to know, thanks.
     
  5. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    Unlit, One Directional Light and PBR shaders support vertex color alpha in transparency shaders.
    upload_2018-6-13_11-34-6.png

    Legacy shaders no, but it is very easy to manually implement it.
    Code (CSharp):
    1. o.Alpha = c.a * IN.color.a;


    VacuumShaders - Facebook Twitter YouTube
     
  6. ParadoxSolutions

    ParadoxSolutions

    Joined:
    Jul 27, 2015
    Posts:
    325
    How did I miss that o_O

    Thanks!
     
  7. udede

    udede

    Joined:
    Jul 26, 2011
    Posts:
    72
    hi

    how to this issue?

    Adsız.jpg
     
  8. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
  9. udede

    udede

    Joined:
    Jul 26, 2011
    Posts:
    72
    please asset store link share

    thanks
     
  10. zoltanBorbas

    zoltanBorbas

    Joined:
    Nov 12, 2016
    Posts:
    83
    Hi there!

    I am getting these errors when trying to convert a terrain into mesh.

    FYI: On unity 2018.1.3f1

    Editor error :(
    Could not load type 'VacuumShaders.MeshMaterializer.ProceduralMaterialImportSettings' from assembly 'VacuumShaders.MeshMaterializer_Editor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.

    TypeLoadException: Could not load type 'VacuumShaders.MeshMaterializer.ProceduralMaterialImportSettings' from assembly 'VacuumShaders.MeshMaterializer_Editor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
    VacuumShaders.MeshMaterializer.MM_EditorWindow.Draw_GenerateButtons ()
    VacuumShaders.MeshMaterializer.MM_EditorWindow.OnGUI ()
    System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
    Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
    System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
    UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:291)
    UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:284)
    UnityEditor.HostView.InvokeOnGUI (Rect onGUIPosition) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:251)
     
  11. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    You are using asset for Unity 2017 in Unity 2018.
    Procedural materials have been removed from Unity 2018 engine.
    Remove asset from the project, clear Asset Store cache folder and re-download asset using Unity 2018.



    VacuumShaders - Facebook Twitter YouTube
     
    zoltanBorbas likes this.
  12. zoltanBorbas

    zoltanBorbas

    Joined:
    Nov 12, 2016
    Posts:
    83
    Thank you very much!
     
  13. MegaCo

    MegaCo

    Joined:
    Jan 24, 2018
    Posts:
    84
    Hello can I use the combine mesh with changing the model to lowpoly?
     
  14. Artini

    Artini

    Joined:
    Jan 29, 2016
    Posts:
    181
    Are there any possibility, that you could change the name of Runtime.cs to something else,
    so I can use Mesh Materializer with other assets?
    I got an error after importing it to my project:
    Assets/VacuumShaders/Mesh Materializer/Example Scenes/Files/Scripts/Runtime.cs(9,14): error CS0101:
    The namespace `global::' already contains a definition for `Runtime'
    Thanks.
     
  15. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    @Artini in the interim couldn't one change the other thing
     
    ParadoxSolutions likes this.
  16. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    Digging around in what I have it would seem that the runtime.cs is only used in the demo.
    just delete it? (okay, okay, so move it somewhere safe, check you don't need it, then delete it. OBVIOUSLY)

    (Assets\VacuumShaders\Mesh Materializer\Example Scenes\Files\Scripts\)
     
    hopeful likes this.
  17. Artini

    Artini

    Joined:
    Jan 29, 2016
    Posts:
    181
    Thanks. I've just realized that and delete it. After that, the error was gone.
     
    twobob likes this.
  18. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058

    I believe is contextually accurate for this thread ;)
     
    TyGameHead likes this.
  19. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    Or you can just rename it.



    VacuumShaders - Facebook Twitter YouTube
     
  20. transat

    transat

    Joined:
    May 5, 2018
    Posts:
    779
    Loving the asset. Any chance to add the option of automatically generating LODs for each chunk?
     
  21. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    Added to a wish-list.



    VacuumShaders - Facebook Twitter YouTube
     
    transat and twobob like this.
  22. JesterGameCraft

    JesterGameCraft

    Joined:
    Feb 26, 2013
    Posts:
    452
    Hi Davit,

    Is it possible to burn the light map data to the vertex but keep the model texture based. Not vertex coloured? If so what would be the steps to achieve this?

    Thank You.
    Regards.
     
  23. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    All meshes generated by Mesh Materializer are 'texture based'.
    Data baked inside vertex is revealed only by using shaders supporting vertex color.



    VacuumShaders - Facebook Twitter YouTube
     
  24. JesterGameCraft

    JesterGameCraft

    Joined:
    Feb 26, 2013
    Posts:
    452
    Perhaps I should clarify. Is there a way to use vacuum shaders to display the texture over the model like a regular Unlit shader with texture and ONLY have the vacuum shader use the lighting data from the vertices. So only storing the lighting information in the vertices and applying that information to the texture to lighten/darken the given vertex effected areas. Not sure if this would look good or weird.
     
  25. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    Package includes shaders multiplying vertex color data with textures.
    upload_2018-9-27_14-17-47.png



    VacuumShaders - Facebook Twitter YouTube
     
  26. JesterGameCraft

    JesterGameCraft

    Joined:
    Feb 26, 2013
    Posts:
    452
  27. transat

    transat

    Joined:
    May 5, 2018
    Posts:
    779
    @Arkhivrag Any chance you might relocate the VacuumShaders tools from Unity's "Window" menu to its "Tools" menu? I find that other asset makers now seem to be placing their utilities there, where it makes more sense. :)
     
    Arkhivrag likes this.
  28. voncarp

    voncarp

    Joined:
    Jan 3, 2012
    Posts:
    187
    Using Unity 18.2.2f1 I am getting a number of issues trying to build on iOS. The first issue :

    Assets/VacuumShaders/Mesh Materializer/Example Scenes/Files/Scripts/Runtime_OBJExporter.cs(59,66): error CS0103: The name `AssetDatabase' does not exist in the current context

    I can get around with #if UNITY_EDITOR

    The second issue while trying to build is this:

    Shader error in 'VacuumShaders/Terrain To Mesh/One Directional Light/Diffuse/4 Textures': '' : 'UNITY_PASS_FORWARDBASE' already defined at line 47 (on gles)

    Compiling Vertex program with UNITY_PASS_FORWARDBASE DIRECTIONAL
    Platform defines: UNITY_NO_DXT5nm UNITY_NO_RGBM UNITY_ENABLE_REFLECTION_BUFFERS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_ENABLE_NATIVE_SHADOW_LOOKUPS UNITY_NO_CUBEMAP_ARRAY UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF3 SHADER_API_MOBILE UNITY_HARDWARE_TIER1 UNITY_COLORSPACE_GAMMA UNITY_LIGHTMAP_DLDR_ENCODING

    Which I am not sure what to do. So, I just deleted the shader and I can get further at least to Xcode until the next issue comes up:

    https://www.dropbox.com/s/imqnvyz3v3bxbkf/Screen Shot 2018-10-10 at 7.02.40 AM.png?dl=0

    I see others from above with this issue and would like to resolve this. I followed what I thought your instructions were and that was to delete mesh materializer from the project and Unity Cache and reinstalled it to no avail.

    Please advise.
     
  29. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    You are using asset for Unity 2017.x
    Update Unity to 2018.2.5 (or later version) and re-download asset.



    VacuumShaders - Facebook Twitter YouTube
     
  30. voncarp

    voncarp

    Joined:
    Jan 3, 2012
    Posts:
    187
    After updating Unity to 18.2.11f1 and redownloading asset it can now build. However, I can use mesh materializer on all terrains except the one I was to trying to use in the prior build. The error I get is this:

    https://www.dropbox.com/s/jy38eglek814j7o/Screen Shot 2018-10-10 at 11.54.10 AM.png?dl=0

    and this

    Failed writing to: '/Users/vc/Library/Caches/com.unity3d.UnityEditor/GiCache/ae/aee5eaeab2648602a03cfbbecb9a0b52.ppg.tmp'.

    Error: 'Failed writing Precomp Packed Geometry file.' - Mesh: 'BaseTerrain'
     
  31. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    Can you send me that problematic terrain with all its textures as package. I'll check it manually.



    VacuumShaders - Facebook Twitter YouTube
     
  32. voncarp

    voncarp

    Joined:
    Jan 3, 2012
    Posts:
    187
    My issue was resolved promptly. Outstanding publisher support.
     
    hopeful likes this.
  33. amoeba_VR

    amoeba_VR

    Joined:
    Nov 28, 2015
    Posts:
    8
    using unity 2017.4 trying to convert a terrain to mesh just get a [red error with conversion failed smiley face icon ] no specific error message tried [terrain to mesh I bought that works in unity 5.6] just error smiley face, bought new mesh materialiser with terrain to mesh included, updated to new version, same error with smiley face and no other number etc. Any clue?
    thanks
    /sct
     
  34. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    There are 3 versions of the Mesh Materializer on the store: for Unity 5.6, Unity 2017 and 2018, but you need Unity editor version to be the same as asset has been submitted or newer.

    upload_2018-10-26_22-39-20.png

    For Unity 5.6 you need editor version to be 5.6.4 or the latest
    For Unity 2017 - 2017.4.10
    For Unity 2018 - 2018.2.5

    Update Unity to appropriate version and re-download asset.



    VacuumShaders - Facebook Twitter YouTube
     
    amoeba_VR likes this.
  35. amoeba_VR

    amoeba_VR

    Joined:
    Nov 28, 2015
    Posts:
    8
    thanks for the prompt answer and solution.
     
  36. ivolga-indi

    ivolga-indi

    Joined:
    May 18, 2017
    Posts:
    22
    Does this tool increase the number of vertices?
     
  37. ivolga-indi

    ivolga-indi

    Joined:
    May 18, 2017
    Posts:
    22
    Why, on the main page of the product you write:
    "Tool works with all types of meshes with any amount of vertices and hierarchy"

    And now:
    "Low Poly Mesh Generator bakes texture inside mesh vertex color and can be used on any device. Max allowed vertex count per-mesh is 21.000. Baked mesh also will have increased vertex count."

    How to understand this?
     
  38. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    Unity mesh has limit of 65.000 vertices.
    Converting mesh to 'Low Poly' means - each face of a mesh must have 3 unique vertices. If original mesh has for example 22.000 vertices, after converting it may increase to 66.000 and Unity just does not import it.
    To avoid such situation for Low Poly Mesh Generator max allowed vertex count per-mesh is 21.000 to guarantee mesh flawless conversion.

    If using Low Poly Mesh Generator editor tool, meshes with more than 21.000 vertices are automatically split and after that converted to 'Low Poly'. So it works with meshes with any amount of vertices.



    VacuumShaders - Facebook Twitter YouTube
     
  39. ivolga-indi

    ivolga-indi

    Joined:
    May 18, 2017
    Posts:
    22
    How does this affect performance? (Such a large number of vertices.)
    Not everything handles :(
     

    Attached Files:

  40. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    Note, 'Low Poly' mesh generated by this plugin in reality just has look of low poly, it is so called flat shaded effect. Converting HD meshes to 'Low Poly' just has no sense, they have too much vertices and 'Low Poly' effect will not be visible.
    It's better to reduce vertices first and after that use this plugin. Such meshes has no impact on performance.



    VacuumShaders - Facebook Twitter YouTube
     
  41. daville

    daville

    Joined:
    Aug 5, 2012
    Posts:
    303
    Hello, Just got the Asset and works as expected.

    I have some requests

    Request:
    - Could you add to the AO and Thickness Bakers "Save Channel" options to store the data on individual R,G,B channels? So I could store the thickness in perhaps R, and AO in Alpha or whatever....

    - Also if I could store just the Light intensity to another individual chanel that would be great (So I could put the light intensity in G).

    - Do you think you could add a "UnOptimize" option? to Add extra Geometry? like a Tesselation or subdivide the model so the Vertex baker could have more data to work with in very low poly models
     
  42. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    Can be added.


    What is Light Intensity and where should I read them from? Scenes active lights or from baked lightmaps?


    Not possible.



    VacuumShaders - Facebook Twitter YouTube
     
    daville likes this.
  43. daville

    daville

    Joined:
    Aug 5, 2012
    Posts:
    303
    Nice :D

    What I mean is... hmm... imagine you pass the Lighting info you already bake through a desaturate function or what happens when you put the Saturation value to the minimun in HSL, so the Lighting data could be converted to just a Grey Scale value, instead of having Color information, so this added with the previous request, will allow me to store Lighting Data in R, AO in G, Thickness in B, and I still have Alpha to store something else (assuming the bakers don't erase existing Vertex data on the model)



    Ok, no problem, that was just a random idea, I can do it externally :)
     
  44. Hivemind9000

    Hivemind9000

    Joined:
    Mar 2, 2014
    Posts:
    11
    Hi

    I am wanting to generate (and save to file) AO and Thickness maps for a model. The model is a single mesh that has multiple vertex groups (which are mapped to separate materials - Face, Torso, Arms, Legs). Does your tool handle this situation - i.e. so I can export separate AO texture maps for Face, Torso, Arms and Legs?
     
  45. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    AO and Thickness are generated per-vertex and saved inside mesh vertex color (not texture).
    And both are generated for the entire mesh.



    VacuumShaders - Facebook Twitter YouTube
     
  46. Hivemind9000

    Hivemind9000

    Joined:
    Mar 2, 2014
    Posts:
    11
  47. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    Yes, Mesh vertex color to texture baker tool does what it say.
    After baking texture you may need to extend colors on the edges using this Photoshop plugin.



    VacuumShaders - Facebook Twitter YouTube
     
  48. Hivemind9000

    Hivemind9000

    Joined:
    Mar 2, 2014
    Posts:
    11
    Sorry I'm still not clear - does the texture baker tool bake one texture per material (i.e. so it produces several textures for a multi-material mesh)?
     
  49. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    One texture per-mesh, not per-material.



    VacuumShaders - Facebook Twitter YouTube
     
  50. Hivemind9000

    Hivemind9000

    Joined:
    Mar 2, 2014
    Posts:
    11
    Ok. Thanks for your quick replies. I guess I can write my own version of the texture baker tool (or copy/modify yours?) to export multiple textures using submeshes (via Mesh.GetTriangles). I would simply add a numerical suffix to the texture name based on the sub-mesh index (e.g. texture001.jpg, texture002.jpg etc). Would that be the approach you would suggest?


    Also, with the texture baker tool, can I specify the texture resolution?
     
    Last edited: Dec 5, 2018