Search Unity

► Mesh Materializer ◄

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

  1. Liviuss

    Liviuss

    Joined:
    Apr 2, 2014
    Posts:
    101
  2. Brity

    Brity

    Joined:
    Feb 27, 2016
    Posts:
    116
    unity 5.4 when selecting mesh. with terrains it fine though

    MissingMethodException: Method not found: 'UnityEditor.ShaderUtil.GetTexDim'.
    VacuumShaders.MeshMaterializer.MM_EditorWindow.TransformChanged ()
    VacuumShaders.MeshMaterializer.MM_EditorWindow.OnFocus ()
    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:187)
    UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:180)
    UnityEditor.HostView.OnFocus () (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:90)
     
  3. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    You are using version for Unity 5.3
    Download MM version for Unity 5.4 using Unity 5.4 editor.



    VacuumShaders - Facebook Twitter YouTube
     
  4. Brity

    Brity

    Joined:
    Feb 27, 2016
    Posts:
    116
    its fine now. I had to remove it from asset folder ... unity's not showing update button... same old shabby asset store service...
     
  5. SHIBAPOWER

    SHIBAPOWER

    Joined:
    Oct 16, 2012
    Posts:
    18
    Excuse me, I want to export mesh to obj file, I cannot found any tutorials.
    How can I do? thank you very much.
     
  6. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    There is no OBJ exporter in the Mesh Materializer.
    Try this free OBJ Exporter from the Asset Store.



    VacuumShaders - Facebook Twitter YouTube
     
  7. stylophone

    stylophone

    Joined:
    Aug 16, 2012
    Posts:
    37
    I too have this problem. My Unity is 5.4.1f1 Pro. I've just created a new project and imported the latest MM v1.62, but every time when I select a mesh it gives me:

    Code (csharp):
    1.  
    2. MissingMethodException: Method not found: 'UnityEditor.ShaderUtil.GetTexDim'.
    3. VacuumShaders.MeshMaterializer.MM_EditorWindow.TransformChanged ()
    4. VacuumShaders.MeshMaterializer.MM_EditorWindow.Draw_NameField ()
    5. VacuumShaders.MeshMaterializer.MM_EditorWindow.OnGUI ()
    6.  
    I then tried something like:

    Code (csharp):
    1.  
    2. [ExecuteInEditMode]
    3. public class NewBehaviourScript : MonoBehaviour
    4. {
    5.     public bool test;
    6.  
    7.     void Update()
    8.     {
    9.         if (test)
    10.         {
    11.             test = false;
    12.  
    13.             UnityEngine.Rendering.TextureDimension dim = UnityEditor.ShaderUtil.GetTexDim(Shader.Find("Standard"), 0);
    14.             Debug.Log(dim);
    15.         }
    16.     }
    17. }
    18.  
    but that doesn't causes any problem, weird..
     
  8. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    You are using version for Unity 5.3
    Download MM version for Unity 5.4 using Unity 5.4 editor.

    1) Remove MM asset from the project.
    2) Clean Asset Store cache:
    PC - C:\Users\[Your Profile Name]\AppData\Roaming\Unity\Asset Store
    MAC - "~/Library/Unity/Asset\ Store".
    3) Now, download package from the Asset Store.



    VacuumShaders - Facebook Twitter YouTube
     
  9. stylophone

    stylophone

    Joined:
    Aug 16, 2012
    Posts:
    37
    Hey, clean the asset store cache solved the problem.
     
  10. 99thmonkey

    99thmonkey

    Joined:
    Aug 10, 2012
    Posts:
    525
    I'm using the VacuumShaders/Vertex Color/On Direction Light on ALL objects and I get this see through. What is up with this? What shader should I use? I'm using Unity Personal 64 bit edition version 5.4.1f1 version. This is a single scene that I'm testing out with a PC Mac build on a PC.
     

    Attached Files:

  11. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Does it happen in the final build only or in the editor too?
    If only in build add shaders from Vertex Color Shaders/Shaders/Resources to the Always Include Shaders array in Edit/Project Settings/Graphics



    VacuumShaders - Facebook Twitter YouTube
     
  12. 99thmonkey

    99thmonkey

    Joined:
    Aug 10, 2012
    Posts:
    525
    Thanks. Please add that to your ReadMe file in whatever your next update is. That also fixed the Editor errors I was seeing with the Unlit shader. Now both are working as I was expecting.
     
  13. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Required shaders are inside Resources folder, that is considered to be added into the build automatically by Unity. Strange that it does not happen.



    VacuumShaders - Facebook Twitter YouTube
     
  14. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    hopeful likes this.
  15. j0hnbane

    j0hnbane

    Joined:
    Jul 2, 2014
    Posts:
    20
    I've been having problems exporting the Terrain Maps with the Basemap settings. I have it on PNG whenever it exports it exports a completely black diffuse texture.. I don't see any of the splats.
     
  16. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Do you use custom shader for terrain rendering?
    Basemap bakes only paint textures and only if terrain uses built-in shader. Custom shaders are not supported.



    VacuumShaders - Facebook Twitter YouTube
     
  17. j0hnbane

    j0hnbane

    Joined:
    Jul 2, 2014
    Posts:
    20
    I'm certain it is the standard Unity terrain shader. When I get back to the house, I'll start a new project and try it with terrain and the asset only.
     
  18. stylophone

    stylophone

    Joined:
    Aug 16, 2012
    Posts:
    37
    Hi, I'm working on a mobile game project that based on modular environment design. I'm thinking about using MM for generate the ambient occlusion at runtime. My question is, is it possible having the task of generating ambient occlusion on a separate thread so it could be executed in background to not freeze the main thread?
     
  19. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Some heavy calculations in MM are multi-threaded, but most of them still require main thread and can not be done in the background. Unity not freezing is not guaranteed.

    If still thinking of buying, wait several hours ;).



    VacuumShaders - Facebook Twitter YouTube
     
    99thmonkey likes this.
  20. tomraegan

    tomraegan

    Joined:
    Mar 28, 2016
    Posts:
    137
    Hi there.

    My meshes become grey when I press generate. They show the mesh facets, but the colours are missing. I've read the thread, the readme and watched the videos.

    I'm not sure what I'm doing wrong, but would love some help.

    Thanks.
     
  21. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    There are several tools in MM. What exactly you are trying to bake?



    VacuumShaders - Facebook Twitter YouTube
     
  22. tomraegan

    tomraegan

    Joined:
    Mar 28, 2016
    Posts:
    137
    The materializer.

    I'm following the process you demonstrate in the first youtube demo.

    I drag a mesh in, modify settings as you do, then hit Generate.

    sometimes everything goes white, sometimes pink, and most recently, grey.

    The grey is the most promising, because it also possesses the low poly facets. What is does not possess is a coloured texture.

    Thanks.
     
  23. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    For texture baking choose Texture #1 Name property, it is material parameter containing texture to be baked.
    If material used by mesh has no such texture it will not be baked.
    After baking any data MM prints logs inside console window about conversion and problem if there are any.



    VacuumShaders - Facebook Twitter YouTube
     
  24. tomraegan

    tomraegan

    Joined:
    Mar 28, 2016
    Posts:
    137
    Thanks for the response.

    All I really want to do is what I watch you do in the materializer video. You don't put a material in, but colours approximate to your model's texture end up decorating your new, materialized house.

    Mine go grey, white or pink. There is no hint of the original texture's colours.

    I have tried adding a material and selecting a texture, as suggested, and on 1 test, out of about 50, have I had any impact on the model. Many models are completely unaffected. The console log reveals no errors.

    Your video is quite compelling. It seems so simple.
     
  25. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Texture is baked from material attached to the mesh. And Texture #1 Name defines that texture property name inside material that will be baked per-vertex.
    Models used in video do use materials (otherwise they will not be rendered at all).
    Package includes example scenes, check 2. Faceted (low poly) effect scene and models there.



    VacuumShaders - Facebook Twitter YouTube
     
  26. tomraegan

    tomraegan

    Joined:
    Mar 28, 2016
    Posts:
    137
    Well, it's something to do with my project.

    I created a new project and it works like the video.

    Will have to come back to it later.

    Thanks for the help!
     
  27. pOgOstyle

    pOgOstyle

    Joined:
    Oct 13, 2016
    Posts:
    6
    Hi Arkhivrag,

    Where can i find
    "Export to OBJ"

    from "Terrain to Mesh" Plugin ?

    - EDIT:

    ok i read the post about the external exporter - but why is none on board..
    Tool is already included in Mesh Materializer asset.
     
    Last edited: Nov 3, 2016
  28. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Terrain To OBJ (included in the Terrain To Mesh plugin) will be added in the next weeks update.



    VacuumShaders - Facebook Twitter YouTube
     
    red2blue likes this.
  29. tomraegan

    tomraegan

    Joined:
    Mar 28, 2016
    Posts:
    137
    Update: All working. Love the asset. Really exactly what I was after, after all :)
     
  30. pOgOstyle

    pOgOstyle

    Joined:
    Oct 13, 2016
    Posts:
    6
    Thx for the super fast integration!! Works perfect for reedit stuff in Zbrush.
     
  31. DRIVER1ksa

    DRIVER1ksa

    Joined:
    May 29, 2015
    Posts:
    28
    can reduce vertex and triangle?
     
  32. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Only for terrains.



    VacuumShaders - Facebook Twitter YouTube
     
    Last edited: Dec 13, 2016
  33. RamSteelwood

    RamSteelwood

    Joined:
    Mar 6, 2013
    Posts:
    19
    Hi,

    Amazing asset. However, I keep getting the following error:
    Shader error in 'VacuumShaders/Vertex Color/Standard': invalid subscript 'boxMax' at Assets/VacuumShaders/Vertex Color/Shaders/cginc/VertexColor_UnityStandardCore.cginc(275) (on d3d11)

    Compiling Vertex program with DIRECTIONAL
    Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA

    I am using unity 5.5.0f3 though...is this just something that needs tweaked in an update? The game does still seem to build and run ok, so it's not a critical issue, just thought i'd mention it.
     
  34. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Standard shader .cginc files are changed in Unity 5.5 and need update (in all my assets). Already working on it.



    VacuumShaders - Facebook Twitter YouTube
     
  35. RamSteelwood

    RamSteelwood

    Joined:
    Mar 6, 2013
    Posts:
    19
    That's a shame for you, but glad you're working on it! :)
    Thanks for the quick reply!
     
  36. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    There is no VacuumShaders/Vertex Color/Standard shader in the package, same as VertexColor_UnityStandardCore.cginc file o_O
    As I remember there was such but removed in v1.36, so do not expect it in upcoming update.



    VacuumShaders - Facebook Twitter YouTube
     
  37. RamSteelwood

    RamSteelwood

    Joined:
    Mar 6, 2013
    Posts:
    19
    Hi. I'm not really sure what you mean. Are you saying I just have some old obsolete files in my project?
    Do I just need to remove and re-download the asset?

    On a possibly related note...I've been using your asset for a while now (so used with various different versions of unity and the asset), but whenever I've 'meshed' something (generally terrain) it initially appears as a big magenta blob. I always have to change the shader to vertex color/standard (specular setup) to get it to appear the way i'd expect. Is this normal?
     
  38. RamSteelwood

    RamSteelwood

    Joined:
    Mar 6, 2013
    Posts:
    19
    Also also (apologies for all the messages) but regarding the initial shader error, i do get the same errors with the 'Standard (Specular Setup)' shader too...game still seems to build ok manually, but it causes the unity cloud build to fail:

    340: [Unity] Shader error in 'VacuumShaders/Vertex Color/Standard (Specular setup)': invalid subscript 'boxMax' at Assets/VacuumShaders/Vertex Color/Shaders/cginc/VertexColor_UnityStandardCore.cginc(275) (on d3d9)
    341: [Unity] Shader error in 'VacuumShaders/Vertex Color/Standard (Specular setup)': invalid subscript 'boxMax' at Assets/VacuumShaders/Vertex Color/Shaders/cginc/VertexColor_UnityStandardCore.cginc(275) (on d3d11)
    342: [Unity] Shader error in 'VacuumShaders/Vertex Color/Standard (Specular setup)': invalid subscript 'boxMax' at Assets/VacuumShaders/Vertex Color/Shaders/cginc/VertexColor_UnityStandardCore.cginc(275) (on d3d11_9x)

    Again, sorry for bombarding you with all this, especially if it's something you've already got covered, just wanted to give you as much info as I could whilst I'm here!
     
  39. ina

    ina

    Joined:
    Nov 15, 2010
    Posts:
    1,085
    does Mesh asset optimizer or another tool in this series integrate with flat mesh generator to make the corresponding higher poly mesh more low-poly?
     
  40. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Such files do not exist in MM (since Unity 5.3, released Dec, 2015). Completely remove package from the project and download fresh one.
    Untitled-1.png



    VacuumShaders - Facebook Twitter YouTube
     
    RamSteelwood likes this.
  41. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    There is not tool for vertex count reduction.
    Included mesh optimizer tool reduces file size by compressing mesh per-vertex data or removing some unused buffers.



    VacuumShaders - Facebook Twitter YouTube
     
  42. RamSteelwood

    RamSteelwood

    Joined:
    Mar 6, 2013
    Posts:
    19
    Hi.
    thanks, i removed the asset, cleared the cache and re-imported. It cleared the errors i was getting, I guess i must have been stuck with some old cached version as the shader list looks totally different.

    However, I've now got a new weird issue. Everything seems fine when i run in the editor, but when i build to a standalone windows player, using either the 'physically based' or 'one directional light' shader, the mesh becomes slightly transparent...you get a weird outline effect on the objects that you can see through the 'meshed' terrain.
    if I switch to the legacy shaders then it works as expected. Any idea on that, or is this part of the unity 5.5 issue you're working on?
     
  43. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Add shaders from Vertex Color Shaders\Shaders\Resources folder to the Always Included Shaders array in the Edit\Project Settings\Graphics windows.



    VacuumShaders - Facebook Twitter YouTube
     
    RamSteelwood likes this.
  44. GambitMonkey

    GambitMonkey

    Joined:
    Apr 5, 2016
    Posts:
    65
    Support,
    So I have been trying to upgrade from the Terrain to Mesh plugin to the full blown package for over a week now. I put a support ticket into Unity but have yet to hear back from them. Im registered under garryclark@gmail.com. Everytime i click purchase after selecting the upgrade it throws an error.

    Any other paths to procuring the upgrade or anyone else had this issue?
     
  45. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    Contact Asset Store Support.



    VacuumShaders - Facebook Twitter YouTube
     
  46. RamSteelwood

    RamSteelwood

    Joined:
    Mar 6, 2013
    Posts:
    19
     
  47. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    It's strange that Unity does not add them to the build automatically as they are inside Resources folder.



    VacuumShaders - Facebook Twitter YouTube
     
  48. jeromeWork

    jeromeWork

    Joined:
    Sep 1, 2015
    Posts:
    429
    Sorry if this is a newbie question... the tutorial videos make it all look so easy but I'm getting the following warnings on all of my meshes:
    (mesh name) materials[0] texture parameter (_MainTex) is empty. Main texture will not be baked.
    and I lose the color on most of the generated mesh.

    I can see from the manual that textures need to be made read/writable, which I've done. And that only certain compression types are supported. I've set texture compression to 'Don't override' in Build Settings and set all textures to ARGB32.

    What am I doing wrong?

    Also, could you give a bit of information about the Optimize settings?
    Docs just say:
    GPU Optimize - Optimizes the mesh for GPU access.
    - but can you give examples of when would this be a good idea? And when not?​
    Save With Mesh – Excluding per-vertex data reduce file size.
    - Which of the options in the Per Vertex data can safely be removed and under what circumstances? A little more information on the theory would be really useful. From my sketchy knowledge I'm assuming I should keep uv if using textures, and uv2 if baking lightmaps, but the others?​
     
  49. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,984
    You are trying to bake _MainTex texture but material (used by mesh)has no texture assigned.
    Check texture parameter name you are baking and material, if it uses that texture.
    Untitled.png

    Untitled1.png


    It is necessary for run-time use only. Editor tool does it automatically.

    This operation can take a while, but makes the geometry displayed much faster, it optimizes the triangles for vertex cache.

    If mesh uses Unlit shader then there is no need to have Normal and Tangent buffers.
    If baking static mesh from Skeletal mesh, Skin buffer can be removed too.
    Everything depends how/where you use mesh.



    VacuumShaders - Facebook Twitter YouTube
     
  50. baroquedub

    baroquedub

    Joined:
    Aug 27, 2015
    Posts:
    11
    Thanks for that extra information, it's really useful.

    Re texture baking...
    Most do have textures, e.g.

    Could it be because I'm using ProBuilder meshes?

    Or is it just failing to detect colour very well?

    What if I'm using mesh materialiser on a collection of meshes with different materials, i.e. some have textures some don't. Is that ok? Will it transfer just the color of the ones that don't have textures and will it try to average out the colour of the ones with textures?

    I'm starting to realise that maybe I need to not combine the meshes right away and work with the color adjustments some more to make each part look right, and then to combine everything together - this time with just Color as the bake setting (and including vertex colors)

    Is that right, do I understand this asset correctly?

    Finally, can I ask whether it's possible to import a finished, generated mesh and its material into a Unity 5.3.4 project? I know the package won't import on anything lower than 5.3.6 but I can't upgrade some projects that could really benefit from this great asset...

    Many thanks