Search Unity

► Lowpoly Mesh Generator ◄

Discussion in 'Assets and Asset Store' started by Arkhivrag, Apr 1, 2016.

  1. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    Last edited: Jul 22, 2021
    funkyCoty likes this.
  2. Yaken

    Yaken

    Joined:
    Apr 6, 2016
    Posts:
    6
    Great package!
    But:
    Is there any way to get detailed error messages?
    Because I want to generate my unity terrain (it is simple, new Terrain -> some mountains with brush for test purposes) to flatmesh, but every time I call this method:
    "FlatMeshGenerator.GenerateFlatTerrain(...)" on runtime in this class "Runtime_FlatTerrain" I got this warning:
    "Generating Flat Terrain: Object reference not set to an instance of an object" and my mesh did not created.

    Pls any solution? we have a strict deadline :(

    Yaken
     
    Last edited: Apr 15, 2016
  3. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    It is possible to output detail info about conversion during run-time.
    If you check included example script (Runtime_FlatTerrain) for run-time terrain conversion you will find line with
    Code (CSharp):
    1.  
    2. //Check reports
    3. if (convertionInfoString != null)
    4.      for (int i = 0; i < convertionInfoString.Length; i++)
    5.      {
    6.           Debug.LogWarning(convertionInfoString[i]);
    7.      }
    8.  
    You can modify it to output additional conversion info
    Code (CSharp):
    1.  
    2. //Check reports
    3. if (convertionInfoString != null)
    4.      for (int i = 0; i < convertionInfoString.Length; i++)
    5.      {
    6.           Debug.LogWarning(convertionInfo[i].ToString());
    7.           Debug.LogWarning(convertionInfoString[i]);
    8.      }
    9.  
    Terrain conversion may fail if: Terrain data is null.


    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: Mar 2, 2020
  4. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    Just submitted v1.01
    • Fixed bug with terrain conversion failing if any of its paint textures are missing.



    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: Mar 2, 2020
    Thomas-Pasieka likes this.
  5. Yaken

    Yaken

    Joined:
    Apr 6, 2016
    Posts:
    6

    I think something is with my terrain textures causes this problem.
    After some research I figured it out :)
    If my terrain textures is not "Read/Write Enabled" = True, then the generator is not working.
    In unity I must set true this checkbox in the Advanced Textures
     
    HogofSteel and Penguin343 like this.
  6. Yaken

    Yaken

    Joined:
    Apr 6, 2016
    Posts:
    6
    Thanks for the fast reply and fixes, great support.
     
    Penguin343 likes this.
  7. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    Editor tool does it automatically but it run-time, yes, you have to manually take care of texture to be readable.



    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: Mar 2, 2020
  8. Dominik523

    Dominik523

    Joined:
    May 6, 2016
    Posts:
    23
    Can this asset divide terrain into chunks and use occlusion culling? Does it also auto generate LOD for the terrain?
     
  9. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    Yes, you can divide terrain into multiple chunks with controllable vertex count. If need LOD just generate another one with less vertices.



    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: Mar 2, 2020
  10. Dominik523

    Dominik523

    Joined:
    May 6, 2016
    Posts:
    23
    Alright, thanks!
     
  11. Nadan

    Nadan

    Joined:
    Jan 20, 2013
    Posts:
    341
    I was wondering are the assets generated with flat mesh generator more effective on performance? Or is just the look different?
     
  12. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    Vertex Color shaders used for this effect are very fast.
    Mesh itself will have increased vertex count.
    Check asset description in the very first post of this thread, it's described how faceted mesh is generated.



    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: Mar 2, 2020
    HogofSteel likes this.
  13. fred2507

    fred2507

    Joined:
    Mar 3, 2015
    Posts:
    4
    Hi, are SpeedTree models with their vertex animations stored in the uv channels supported, or just as static models?
     
  14. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    With full vertex animation.





    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: Mar 2, 2020
  15. fred2507

    fred2507

    Joined:
    Mar 3, 2015
    Posts:
    4
    yeah, thanks. you got a new customer!
     
  16. saenkoav

    saenkoav

    Joined:
    May 31, 2016
    Posts:
    4
    Just ONE question, and I buy you perfect work). How about Water? Можно сделать воду LowPoly без потери физики?
     
  17. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    Asset converts mesh into flat/faceted style mesh and bakes texture(s) inside vertex color. That's all.
    Water effect is not part of this tool, but shaders instead.

    BTW I'm working on DirectX 11 Lowpoly Shader pack and it will have lowpoly water shader too.



    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: Mar 2, 2020
    HogofSteel likes this.
  18. Sx3

    Sx3

    Joined:
    Sep 25, 2012
    Posts:
    6
    If I look at the models it looks like the vertex count is less. How come it's more? And is there a way to reduce it?
     
  19. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    Vertex count is tripled for every vertex using this technique. Removing the smoothing information require each face to have unique vertices at each corner - so even though two adjoined faces are part of the same model/mesh - they do not share vertices. Each face has it's own vertices.

    afaik there is not workable solution to reduce vertex count.
     
  20. Sx3

    Sx3

    Joined:
    Sep 25, 2012
    Posts:
    6
    Ok thanx for the update. I also ran into the problem that some of my models are really dark after conversion. I use the Unit Shader with Image Based Lighting and use the intensity to lighten it up a bit. Can you give a better solution?
     
  21. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    Sorry Sx3 I have no info regarding lighting.

    About poly count - @Arkhivrag DirectX 11 Lowpoly Shader will not triple the polycount. This shader is going to be very useful for any dev doing low poly modeling games.
    He mentioned it was going to be released after Unity 5.4 drops - which was yesterday. ;)
     
  22. scott5678

    scott5678

    Joined:
    May 15, 2013
    Posts:
    13
    Hi, just bought and love it so far! On some models, it gets converted to all white. Is this because there isn't a texture? Or I'm choosing the wrong color?

    This is what the materials look like:

     
    Last edited: Sep 10, 2016
  23. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    You can bake only texture or color parameter of the material. Both parameters names are defined inside editor.
    Untitled.png



    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: Mar 2, 2020
  24. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    I saw there is Mesh Compression on the latest update. How does this work? Is there need for a component to unpack the mesh or does it just remove unused uv2 etc?
     
  25. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    Mesh compression does not remove any used/unused buffers.
    It just reduces vertex data precision and saved file size is smaller.
    It does not need any unpack or some special loading tools.
    It has no performance cost at all, during loading or run-time.

    Compressing meshes saves space in the built game, but more compression introduces more artifacts in vertex data. Best choice is Low compression.



    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: Mar 2, 2020
  26. gterveen

    gterveen

    Joined:
    Dec 17, 2012
    Posts:
    22
    Any chance we might see an option to export the vertex colors back to a Texture? Looking for a tool like that so I can use Meshmaterializer for many aspects of my workflow without having to port everything to work with vertex colors.
     
  27. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    Mesh Materializer includes tool for exporting vertex color into texture.
    Menu/Window/Vacuum Shaders/Vertex Color Exporter.
    VCE_Window.png



    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: Mar 2, 2020
  28. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,649
    This option does it available for 'Per-Vertex Ambient Occlusion and Indirect Lighting Generator' ?.
     
  29. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    Vertex Color Exporter is available only in Mesh Materializer.



    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: Mar 2, 2020
  30. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,649
    Thanks. :(
     
  31. Codetrix

    Codetrix

    Joined:
    Oct 13, 2016
    Posts:
    7
  32. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    You can not reduce or increase triangle count of the mesh, it is out of scope of this tool.



    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: Mar 2, 2020
  33. Ithkul

    Ithkul

    Joined:
    Apr 8, 2012
    Posts:
    22
    Any chance it will work for Unity 4.6? I'm willing to be your labrat. But if you are 100% sure it will not work, I'll look elsewhere.
     
  34. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    Only for Unity 5.3 and 5.4



    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: Mar 2, 2020
  35. Ithkul

    Ithkul

    Joined:
    Apr 8, 2012
    Posts:
    22
    Thanks for the quick answer. I might go so far as to try to upgrade my old project just to use your tool. :)
     
  36. I have a couple questions regarding this asset -
    Let's say i have this model from the AS
    https://www.assetstore.unity3d.com/en/#!/content/14233

    Can i convert it to a Low Poly Mesh using your package?

    And can it be exported to a 3D model file (fbx, obj, dae)?

    If it can't, is it possible to acess the classes like Mesh lowPoly = Converter.ConvertToLowPoly(original); to allow for obj exporting?
     
  37. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    Triangle count will not be reduced. 'Low Poly' effect is achieved by baking texture color inside mesh vertex color and flattening face normal.

    There is no FBX or OBJ file exporter.

    Yes.



    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: Mar 2, 2020
  38. Will there be a performance increased using your package to convert it to low poly rather than using the high-poly mesh itself?
     
  39. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    Non of the tools available in the Asset Store for generating faceted style meshes will give you performance increase.
    As written in description mesh triangle count after conversion remains the same, while vertex count may increase.
    If you are targeting device with Geometry Shaders better use DirectX 11 Low Poly shader.



    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: Mar 2, 2020
  40. It's a pitty then - apparently there is no tool to do what i was looking. Thanks for the quick replies.
     
  41. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    Last edited: Mar 2, 2020
  42. ApexofReality

    ApexofReality

    Joined:
    Feb 14, 2016
    Posts:
    102
    Can you convert some of the weapons for us to see im getting very intrested.
     
  43. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    Send mesh or AS link.



    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: Mar 2, 2020
  44. ApexofReality

    ApexofReality

    Joined:
    Feb 14, 2016
    Posts:
    102
  45. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    Last edited: Mar 2, 2020
  46. ApexofReality

    ApexofReality

    Joined:
    Feb 14, 2016
    Posts:
    102
  47. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    Triangle count will not change, just texture baked inside mesh vertex color.



    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: Mar 2, 2020
  48. coverpage

    coverpage

    Joined:
    Mar 3, 2016
    Posts:
    385
    Are there more optimization options if I upgrade to mesh materializer. This asset is wonderful btw.
     
  49. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    The only additional mesh optimization feature in the Mesh Materializer is an option to exclude some of the unnecessary per-vertex data (like UVs, Normals, Tangents, Skin info) from the mesh, that reduces file size.

    For other tools included in the Mesh Materializer and how they work check tutorial videos here.



    VacuumShaders - Facebook Twitter YouTube