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
    Update v1.01 available
    • Fixed unlit shaders not receiving fog in Unity 5.



    VacuumShaders - Facebook Twitter YouTube
     
  2. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    Damn you are good.
    upload_2015-4-16_12-40-29.png

    *thinks of some other corner-case minutia*.... hmm... I got nothing..

    oh wait..

    The U5 Standard shader appears to also not have the fog.
    Or am I being stupid again...

    upload_2015-4-16_12-43-25.png

    sorry to be such a pain

    clearer shot
    upload_2015-4-16_13-33-1.png
     
    Last edited: Apr 16, 2015
  3. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    Strange, before uploading I tested all shaders on fog, all of them worked.
    Now even Unity 5 own built-in shaders do not receive fog.
    fog.png



    VacuumShaders - Facebook Twitter YouTube
     
    Last edited: Apr 16, 2015
  4. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    crazy right?
     
  5. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    Unity 5 fog problem solved. There is no fog in Deferred rendering. Only in Forward and VertexLit modes.
    In Deferred rendering fog works only through image effect - Global Fog.



    VacuumShaders - Facebook Twitter YouTube
     
  6. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    oh. I see. I had read that on a few posts myself.. however... does it not seems odd to you that the surrounding mesh created by Horizon[on] is coping with the fog just fine if it is not possible to do?

    moreover, it was this that made me report it being possible in a deferred path.

    upload_2015-4-16_15-9-59.png

    ah well. I guess it will have to be a "far plane dependent" second-rate fog script for now.
    Perhaps I can figure out from the Horizon[on] shaders how they managed it.

    thanks for looking.
     
  7. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    I will work my way through what I have, your shader, this post: http://forum.unity3d.com/threads/of...is-done-in-unity-shaders.261217/#post-1738681 and the horizon[on] shader and see if I can spot the difference. If they have got those macros working perhaps it is doable, maybe it is a vertex thing I dunno. Perhaps they use a different type of shader.

    If you say it can't be done, fair enough. I'll work around it.
     
    Last edited: Apr 16, 2015
  8. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    Hi,

    -All generated prefabs are white after generation.
    -To read/write texture inside script Unity requires texture with corresponding formats: ARGB32, RGBA32, BGRA32, RGB24, Alpha8 and DXT, otherwise it just don't.

    -No error appeared. Just one because of the floating text which I deleted:
    -Mesh Materializer tries to catch program errors during conversion and output them in a 'friendly way'. That's why there are not log errors and conversion crashes.

    -Is there a way I can change multiple colors to something specific?
    -Mesh Materializer reads texture and color values from material attached to mesh. You can choose from which material property MM will read values.
    -Also after conversion you can use Color Adjustments tool.

    -How to add shadows? Casting/Receive is enabled but there is no.
    -Shadow cast/receive depends on material shader. MM contains various shaders with full lighting support and without it(unlit).


    EDIT: Before conversion I check texture formats to avoid further conversion problems and seams I missed some Android compression formats. Try to fix it and make update for tomorrow.



    VacuumShaders - Facebook Twitter YouTube
     
  9. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    Update v1.1
    • Removed restriction on texture formats, all type of textures are supported (only in editor).
    • Added 'benchmark' option to the build log type for displaying each conversion step time and some statistic info.
    • Fixed IBL calculation (reading wrong cubmap uvs).
    • Fixed custom material editor (showing hidden parameters).
    • Even more stable editor. Catching more exceptions.



    VacuumShaders - Facebook Twitter YouTube
     
  10. 99thmonkey

    99thmonkey

    Joined:
    Aug 10, 2012
    Posts:
    525
    Sometimes the Mesh is not assigned back to the Mesh Collider, if the object has a Mesh Collider on it before using your tool. Something to consider. It's not too bad reassigning all this.
     
  11. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    Yes, I forgot about mesh colliders. I'll fix it.



    VacuumShaders - Facebook Twitter YouTube
     
    99thmonkey likes this.
  12. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    v1.2 released
    • Added option to skip texture compression (speeds up conversion). More details in ReadMe file.
    • Fixed - Mesh collider not receiving converted mesh.
    • Fixed - Disabled objects in hierarchy not converted.
    • Unity editor warnings:
    • PPtr cast failed
    • Check consistancy
    • Prefab does not reference component 'T'
    • and other not related to MM warnings will not bother any more.​

    mesh-materializer-low-poly-planet.png
    Above scene is included in U5 package :)



    VacuumShaders - Facebook Twitter YouTube
     
    Last edited: Apr 30, 2015
    twobob likes this.
  13. 99thmonkey

    99thmonkey

    Joined:
    Aug 10, 2012
    Posts:
    525
    I'd like to see more tutorials. Maybe in more depth. I end up playing around with the settings and re-running each object until I'm happy. Also, how does the preset thing work? I'm not sure how to use this.
     
  14. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    Preset saves all Mesh Materializer or Color Adjustments editor window controls so you can use them next time without going through parameters for tweaking them all the time.
    For example you can setup MM controls
    one - for only Flat style conversion (save it as preset) and
    second - for Flat style with bluring texture and Ambient Occlusion, + other options (save it also as preset)

    Lately you can load which one want without going through the same setup steps.

    Presets are accessible from context(right click) menu.



    VacuumShaders - Facebook Twitter YouTube
     
  15. S_Darkwell

    S_Darkwell

    Joined:
    Oct 20, 2013
    Posts:
    320
    I know you had mentioned a few months ago that your asset was unable to work on SpeedTree models due to their animations. Will it still work on the model itself, simply rendering it without motion, or does it not work at all? Or, have you happened to come up with a solution to this limitation?
     
  16. cj31387

    cj31387

    Joined:
    May 23, 2012
    Posts:
    143
    I see this is on sale. Looks very interesting and has more features than Polyworld.
    I would like to mess around in unreal 4, is there any way to use this in unity and then export to unreal 4? Do you have any plans for a a fbx exporter in this package? I've asked this for Quantum theory Polyworld and have tried all 3rd party exporters he has suggested but none of them work, I get no vertex color data to use in unreal 4.
     
  17. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    Mesh Materializer converts SpeedTree mesh to faceted style, but Unity does not give its animation information to bake, like blend shapes info - it's there inside Unity - but not accessible. More info here: http://forum.unity3d.com/threads/mesh-materializer.293796/#post-1972057

    Mesh Materializer exports converted meshes as .asset files only. Currently I have no plans for adding FBX exporter.



    VacuumShaders - Facebook Twitter YouTube
     
  18. reese01

    reese01

    Joined:
    Oct 21, 2014
    Posts:
    21
  19. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
  20. Walterlin

    Walterlin

    Joined:
    May 6, 2015
    Posts:
    2
    upload_2015-5-6_23-52-30.png how i can get the function lightmap in your vedio upload_2015-5-6_23-53-45.png ?
     
  21. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    Lightmap baking works in Unity 4.
    There is bug (not mine :cool:) in Unity 5 related to lightmaps and I had to temporarily disable it there. Waiting Unity to fix its bugs.



    VacuumShaders - Facebook Twitter YouTube
     
  22. Walterlin

    Walterlin

    Joined:
    May 6, 2015
    Posts:
    2
    alright !
    i install unity4 to use , thanks for your height level plugin , love it very much
     
  23. Rod-Galvao

    Rod-Galvao

    Joined:
    Dec 12, 2008
    Posts:
    210
    What if I want to generate a mesh from a terrain at runtime? Is it possible?
     
  24. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    Yes!



    VacuumShaders - Facebook Twitter YouTube
     
  25. Rod-Galvao

    Rod-Galvao

    Joined:
    Dec 12, 2008
    Posts:
    210
    Is it slow to generate (at runtime) from a terrain of 512x512?
    Does it support skinned meshes?
     
    Last edited: May 7, 2015
  26. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    Materializer algorithm is SUPER fast.
    Terrain dimension has no sense, only final mesh vertex count and features you are baking.
    Skinned mesh are supported.



    VacuumShaders - Facebook Twitter YouTube
     
  27. radimoto

    radimoto

    Joined:
    Aug 23, 2012
    Posts:
    257
    I'm using Mesh Materializer to convert 4x high detailed seamless terrains to meshes. For this it is excellent converting the 4x terrains to 64k meshes without seams.

    Does Mesh Materializer have any capability to further reduce the mesh while keeping the edges seamless (ie all the edge verts should match) ?

    I have tried using Cruncher but the seams go out of alignment. The only solution I've found so far is to export the 4x 64k meshes out as .obj to Blender, join the meshes and then weld the seams. I then decimate and then bring it back into Unity as a single mesh under 64K.

    Any ideas on how to improve this workflow? I would rather stay within Unity if possible....
     
  28. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    Polygon reduction tool :rolleyes:. It would be great. May be I'll work on it after finishing upgrading my other plugins.
    For now there is no other way, maybe some plugins from asset store, but can not recommend any of them (have non of them).



    VacuumShaders - Facebook Twitter YouTube
     
  29. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    Trying to build for WebGL? Did you check that the substance support stuff was excluded for this build type?

    EDIT: This is fixed in later version.

    Failed running D:\Unity_5_0_1f1\Editor\Data\Tools/UnusedByteCodeStripper2/UnusedBytecodeStripper2.exe -out "D:\UNITY 5.0 PROJECTS\Tile\Temp\StagingArea\Data\Managed" -l none -c link -x "D:\Unity_5_0_1f1\Editor\Data\Tools\native_link.xml" -f "D:\Unity_5_0_1f1\Editor\Data\il2cpp\LinkerDescriptors" -x "D:\UNITY 5.0 PROJECTS\Tile/Temp/StagingArea/Data/methods_pointedto_by_uievents.xml" -d "D:\UNITY 5.0 PROJECTS\Tile\Temp\StagingArea\Data\Managed" -a "D:\UNITY 5.0 PROJECTS\Tile\Temp\StagingArea\Data\Managed\Assembly-CSharp-firstpass.dll" -a "D:\UNITY 5.0 PROJECTS\Tile\Temp\StagingArea\Data\Managed\Assembly-CSharp.dll" -a "D:\UNITY 5.0 PROJECTS\Tile\Temp\StagingArea\Data\Managed\Assembly-UnityScript.dll" -a "D:\UNITY 5.0 PROJECTS\Tile\Temp\StagingArea\Data\Managed\UnityEngine.UI.dll" -a "D:\UNITY 5.0 PROJECTS\Tile\Temp\StagingArea\Data\Managed\VacuumShaders.MeshMaterializer.dll"

    stdout:
    Fatal error in Mono CIL Linker
    System.Exception: Error processing method: 'System.Void VacuumShaders.MeshMaterializer.MMGenerator::????????????????????????????????????????(UnityEngine.Material,System.String,UnityEngine.Texture2D&)' in assembly: 'VacuumShaders.MeshMaterializer.dll' ---> Mono.Cecil.ResolutionException: Failed to resolve UnityEngine.ProceduralTexture
    at Mono.Linker.Steps.MarkStep.MarkType (Mono.Cecil.TypeReference reference) [0x00000] in <filename unknown>:0
    at Mono.Linker.Steps.MarkStep.MarkMethodBody (Mono.Cecil.Cil.MethodBody body) [0x00000] in <filename unknown>:0
    at Mono.Linker.Steps.MarkStep.ProcessMethod (Mono.Cecil.MethodDefinition method) [0x00000] in <filename unknown>:0
    at Mono.Linker.Steps.MarkStep.ProcessQueue () [0x00000] in <filename unknown>:0
    --- End of inner exception stack trace ---
    at Mono.Linker.Steps.MarkStep.ProcessQueue () [0x00000] in <filename unknown>:0
    at Mono.Linker.Steps.MarkStep.Process () [0x00000] in <filename unknown>:0
    at Mono.Linker.Steps.MarkStep.Process (Mono.Linker.LinkContext context) [0x00000] in <filename unknown>:0
    at Mono.Linker.Pipeline.Process (Mono.Linker.LinkContext context) [0x00000] in <filename unknown>:0
    at Mono.Linker.Driver.Run () [0x00000] in <filename unknown>:0
    at Mono.Linker.Driver.RunDriver (Mono.Linker.Driver driver) [0x00000] in <filename unknown>:0
    stderr:

    UnityEngine.Debug:LogError(Object)
    UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:66)
    UnityEditorInternal.AssemblyStripper:RunAssemblyLinker(IEnumerable`1, String&, String&, String, String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:192)
    UnityEditorInternal.AssemblyStripper:StripAssembliesTo(String, String, String&, String&, String, String, IEnumerable`1) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:185)
    UnityEditorInternal.AssemblyStripper:Strip(String, String, String&, String&, String, String, IEnumerable`1) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:136)
    UnityEditorInternal.AssemblyStripper:Strip(String[], String[], String, String, String&, String&, String, String, IEnumerable`1) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:121)
    UnityEditorInternal.IL2CPPBuilder:RunAssemblyStripper(IEnumerable, String, String[], String[], String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:445)
    UnityEditorInternal.IL2CPPBuilder:StripAssemblies(String[], String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:433)
    UnityEditorInternal.IL2CPPBuilder:Run() (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:273)
    UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:218)
    UnityEditor.HostView:OnGUI()


     
    Last edited: May 8, 2015
  30. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    Firstly, this asset is great, after i showed it to some folks they went and grabbed it straight away

    Regarding decimation, i can recommend the krabl mesh processors, the asset hasn't been updated in some time but still works fine, with a few lines of code needing to be removed (regarding platforms that are no longer supported)
     
    twobob likes this.
  31. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    Yes, bug exists, but it is not Mesh Materializer.
    Current version of Unity 5 can not build WebGL with "ProceduralTexture" variable.

    1. Create empty project (Unity 5).
    2. Create one simple script with ProceduralTexture varialbe inside and assign to any object (Camera).
    3. Save scene.
    4. Switch build target to WebGL and add current scene.
    5. Hit Build button.

    Crash! The type or namespace name `ProceduralTexture' could not be found. Are you missing a using directive or an assembly reference?


    @lazygunn
    Thanks



    VacuumShaders - Facebook Twitter YouTube
     
  32. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    update v1.21 available
    • Added MeshMaterializer.dll without ProceduralMaterial support for WebGL builds. Check MeshMaterializer/Scripts/ folder.




    VacuumShaders - Facebook Twitter YouTube
     
    twobob likes this.
  33. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    Thanks, as ever you are super reactive.

    Hope the Curved World Update goes well :)
     
  34. andyz

    andyz

    Joined:
    Jan 5, 2010
    Posts:
    2,276
    Can you just use this asset to bake ambient occlusion and IBL on a per-vertex level?
    If so how does it calculate the AO?
     
  35. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    Yes, you can generate only Ambient Occlusion or IBL and save them to vertex color without flattening mesh or baking any additional data.



    VacuumShaders - Facebook Twitter YouTube
     
  36. superflyninja

    superflyninja

    Joined:
    Mar 8, 2013
    Posts:
    24
    Hi,
    I purchased this recently but seem to have an issue. Not all options are showing on the Mesh Materializer window.
    MM.PNG
    I've removed Mesh Material and reimported etc. but no joy. Still only the above options appear. Same story for the image adjustment window. Any ideas? Im running unity 5.
     
  37. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    @superflyninja

    1. Mesh Materializer window shows all parameters. There are no other options available for terrain conversion, only those you have on image.
    2. Which OS are you running?
    3. Are there any other VacuumShaders plugins in project?
    4. Did you move VacuumShaders folder? It should be in the main Assets folder, not in any other sub folders.
    5. What are those 50% of meshes that MM can not work with?
    6. What exceptions does MM throws when it checks for file path?



    VacuumShaders - Facebook Twitter YouTube
     
    Last edited: May 11, 2015
  38. superflyninja

    superflyninja

    Joined:
    Mar 8, 2013
    Posts:
    24
    Ooops false alarm, my fault. All fine now thanks.
     
  39. superme2012

    superme2012

    Joined:
    Nov 5, 2012
    Posts:
    207
    Very interesting! Is it possible to feed in a high poly model and result in a low poly?
     
  40. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
  41. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,360


    Hi

    Are these samples/assets included in the pack ?

    Thanks
     
  42. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,360
    I just saw this, so diregard the previous question

    The question is how easy it is to get such results with the system, without the specific sample. Is everything described in the pic in the pack features or need extra work to achieve ? Is the exact procedure to get the same result described in the manual ?

    Thanks
     
  43. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    Package does not contain polygon reduction tool.

    From above image package has no only realtime reflection shader (it is just written exactly for that project). And meshes.

    Package contains tool to convert mesh to faceted style.
    + Bake additional data (as written in description) to vertex color.
    + Optimize resultant mesh (various options for optimization).
    + Vertex Color Adjustment tool if you need to tweak results.
    + Shaders supporting vertex color.

    Using tool is very easy. Everything is automated and very very optimized.



    VacuumShaders - Facebook Twitter YouTube
     
  44. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,360
    Thanks for the clarifications
     
  45. schmosef

    schmosef

    Joined:
    Mar 6, 2012
    Posts:
    852
    I'm having an issue with compiling a Windows Store Build of a project that uses Mesh Materializer.

    The Build from Unity is successful but when I open the exported VS project and attempt to compile it for either x86 or ARM I get an error referencing VacuumShaders.MeshMaterializer.dll saying that:

    The command ""C:\Program Files\Unity\Editor\Data\PlaybackEngines\metrosupport\Tools\AssemblyConverter.exe" [snipped list of assemblies including MeshMaterializer] exited with code 1.
    If I take MeshMaterializer out of the project, then rebuild the VS project in Unity, it compiles and runs fine (obviously, without the MeshMaterializer effects).

    Has anyone else has success or figured out a work around for compiling for Windows Store?
     
  46. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    Confirm, working on fix.



    VacuumShaders - Facebook Twitter YouTube
     
  47. schmosef

    schmosef

    Joined:
    Mar 6, 2012
    Posts:
    852
    Thanks.
     
  48. Rod-Galvao

    Rod-Galvao

    Joined:
    Dec 12, 2008
    Posts:
    210
    Is it possible to generate a more detailed mesh of a character's head?
     
  49. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    Mesh Materializer does not change mesh topology, does not add or remove triangles. It converts mesh to faceted style imitating low poly.



    VacuumShaders - Facebook Twitter YouTube
     
  50. redchurch

    redchurch

    Joined:
    Jun 24, 2012
    Posts:
    63
    Mesh Materializer is great!

    Quick question;

    Is there a way to export the mesh or render a texture of the flat shading to use as a base for doing hand painted style? Was hoping to save out the result as a new texture, or open the mesh and bake a new diffuse from it, but the only exporters are OBJ format which doesn't support vertex color information.