Search Unity

  1. Unity 2018.3 is now released.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Want more efficiency in your development work? Sign up to receive weekly tech and creative know-how from Unity experts.
    Dismiss Notice
  4. Build games and experiences that can load instantly and without install. Explore the Project Tiny Preview today!
    Dismiss Notice
  5. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  6. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

► DirectX 11 Low Poly Shader ◄

Discussion in 'Works In Progress' started by Arkhivrag, May 24, 2016.

  1. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    1,921
    It will be added in the next updates.



    VacuumShaders - Facebook Twitter YouTube
     
  2. peteoaten

    peteoaten

    Joined:
    May 17, 2016
    Posts:
    10
    Reading through the thread, i assume this works on Unity / Gaia Terrains?
     
  3. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    1,921
    Terrain shader is included.



    VacuumShaders - Facebook Twitter YouTube
     
  4. Blueberry

    Blueberry

    Joined:
    Apr 5, 2013
    Posts:
    159
    Have you seen any performance increases/decreases in the CPU usage?

    Furthermore, why would I potentially use "Flat Mesh Generator" over this asset if it can have the issues you describe?
     
  5. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    1,921
    Meshes generated with Flat Mesh Generator can be rendered on any device, as texture color there is baked inside mesh vertex color, while DX11 Low Poly shader requires device with GeometryShader.

    CPU is not used during rendering, so not a big difference.
    Benchmark.jpg



    VacuumShaders - Facebook Twitter YouTube
     
    DevMember and Blueberry like this.
  6. DevMember

    DevMember

    Joined:
    Aug 6, 2016
    Posts:
    45
    Very nice results :---)
     
  7. stanislavdol

    stanislavdol

    Joined:
    Aug 3, 2013
    Posts:
    249
    Incredible, love the paper-craft effect!
     
  8. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    1,921
    Paper-craft effect willbe added in the coming update.



    VacuumShaders - Facebook Twitter YouTube
     
  9. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    1,921
    v0.92 will be compatible with Wireframe shader (currently price is 20% off) for creating amazing paper-craft effect.
    PaperCraft.png


    VacuumShaders - Facebook Twitter YouTube
     
  10. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    1,921
    update to v0.92 and check paper-craft effect.
    Wireframe shader is required only if need wireframe visualization on mesh edges.

    Above scene is included, just without image effects.



    VacuumShaders - Facebook Twitter YouTube
     
    pixelsteam likes this.
  11. Dunfee

    Dunfee

    Joined:
    Jan 14, 2013
    Posts:
    14
    For those of us who have not worked with them much, how do you apply the terrain shader to a unity terrain?
     
  12. ina

    ina

    Joined:
    Nov 15, 2010
    Posts:
    704
    is support for iOS available yet - also, if so, why is it called DirectX shader?
     
  13. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    1,921
    1. Create new material with VacuumShaders/DirectX 11 Low Poly/Nature/Terrain shader.
    2. Inside Terrain Settings change Material type from Buitl-In Standard to Custom
    3. Assign new created material.
    4. If Unity does not update terrain, save scene and restart editor.



    VacuumShaders - Facebook Twitter YouTube
     
  14. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    1,921
    Try this test shader on your device. If any of render target is rendered in green, you can use DirectX 11 Low Poly shader.



    VacuumShaders - Facebook Twitter YouTube
     
  15. ludos

    ludos

    Joined:
    Nov 14, 2011
    Posts:
    53
    Nice shaders, but i have read somewhere that the folder must reside in the root asset directory? Is this really true?!?
     
    00Fant likes this.
  16. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    1,921
    Yes, all VacuumShaders assets must be inside main Assets folder.



    VacuumShaders - Facebook Twitter YouTube
     
  17. Sydoki

    Sydoki

    Joined:
    Jan 23, 2017
    Posts:
    2
    Doesn't work on iOS / Android platforms. Changing a platform turns all shaders to red in the Tester.

    Am I doing something wrong? :)
     
  18. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    1,921
    If test shaders are rendered in Red color, it means that device has no GeometryShaders support.



    VacuumShaders - Facebook Twitter YouTube
     
  19. Sydoki

    Sydoki

    Joined:
    Jan 23, 2017
    Posts:
    2
    That makes me extremely sad :c
    I was planning to use these shaders for mobile; any possible workarounds for it to work on iOS?
     
  20. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    1,921
    Only if device hardware manufacturers add GeometryShaders support.



    VacuumShaders - Facebook Twitter YouTube
     
  21. ludos

    ludos

    Joined:
    Nov 14, 2011
    Posts:
    53
    Can you give a method to move the folder to a subfolder? Anybody doing serious projects need to be able to do this.
     
  22. Zymes

    Zymes

    Joined:
    Feb 8, 2017
    Posts:
    96
    I love that paper effect. Is it possible you can make a shader that looks like that for mobile?

    Doesn't have to be this tech, but a normal shader maybe.
     
  23. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    1,921
    Paper-craft effect is achieved by using flat shading + animation modifier script + wireframe shader (optional).

    I have Flat Mesh Generator that does the same job as DirectX11 Low Poply shader but it requires mesh conversion, effect is the same. You can use animation modifier script with that tool and will have paper-craft effect on mobile.

    Wireframe shader is optional but works on any device, even on mobile.



    VacuumShaders - Facebook Twitter YouTube
     
  24. Ruben_Chris

    Ruben_Chris

    Joined:
    Mar 10, 2013
    Posts:
    93
    What kind of settings are available for the terrain shader? Can you choose how low poly it looks? I probably need this because I have a huge terrain and using mesh conversion generates huge data files.

    Btw the test shaders are no longer available for download, can you fix this?
     
  25. DavidSWu

    DavidSWu

    Joined:
    Jun 20, 2016
    Posts:
    41
    Do you support Ambient occlusion and instancing?
     
  26. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    1,921
    Shader does not reduce mesh vertex count. But for terrain you can increase Pixel Error option inside terrain settings that will give more lowpoly look.
    There is no additional settings for terrain shader, just like unity built-in terrain shaders.



    VacuumShaders - Facebook Twitter YouTube
     
  27. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    1,921
    Will be added in the next update.



    VacuumShaders - Facebook Twitter YouTube
     
  28. Ruben_Chris

    Ruben_Chris

    Joined:
    Mar 10, 2013
    Posts:
    93
    You see I have a very large terrain (30km x 30km or something) and I would actually like it to be less low poly than it is right now, but I can't do that because the low poly mesh generator I use generates too large files (7GB+). Would your shader work for this?
     
  29. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    1,921
    It will give lowpoly look.

    But if you really need to reduce vertex count and optimize your project check Terrain To Mesh plugin.



    VacuumShaders - Facebook Twitter YouTube
     
    theANMATOR2b likes this.
  30. Ruben_Chris

    Ruben_Chris

    Joined:
    Mar 10, 2013
    Posts:
    93
    I am not looking to reduce vertex count, but actually kind of the opposite.
    I am currently using the Polyworld terrain converter and the problem is that I want it to look more like the original terrain and I can't do that without creating massive mesh files. Can this shader do that?
     
  31. screenname_taken

    screenname_taken

    Joined:
    Apr 8, 2013
    Posts:
    608
    You mean take a low poly mesh and make it smoother? Put it in a 3D modeling software and click the smooth button.
    This shader is to make things look faceted.
     
  32. Ruben_Chris

    Ruben_Chris

    Joined:
    Mar 10, 2013
    Posts:
    93
    "Smoother" was a bit unclear on my part. I'm trying to make my terrain look more high poly, but still faceted.
     
  33. tomhughes

    tomhughes

    Joined:
    Aug 3, 2014
    Posts:
    3
    This shader is amazing! great work!

    I'm struggling to add it to water. How do i go about it? thanks a lot!
    :)
     
  34. tomhughes

    tomhughes

    Joined:
    Aug 3, 2014
    Posts:
    3
    never mind. I've done it
    i just used a cloth reactor and placed the shader on it :S
     
  35. Ruben_Chris

    Ruben_Chris

    Joined:
    Mar 10, 2013
    Posts:
    93
    Alright I ended up buying the asset since I'm tired of asking questions. Hopefully it's as good as people say it is :)
     
  36. Ruben_Chris

    Ruben_Chris

    Joined:
    Mar 10, 2013
    Posts:
    93
    Ah I see that the size of triangles are adjusted based on how far away the camera is. I thought there was a fixed amount of triangles, that's why I asked the questions. Great asset, worked perfectly.
     
  37. Ruben_Chris

    Ruben_Chris

    Joined:
    Mar 10, 2013
    Posts:
    93
    Hello. After updating the asset to the latest release I'm getting multiple errors when trying to do anything. The terrain shader broke immediately and when I then tried the geometry shaders I got even more errors. Why is this and how do I fix it? The shader worked perfectly before and DX11 is still enabled. I also tried creating the material from scratch again, but no success. If it's worth noting, I use Unity 5.5.1f.

    Picture: http://imgur.com/a/RFBVN
     
  38. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    1,921
    Latest update is only for Unity 5.6 (check release notes).
    It is strange that Unity 5.5 Editor allowed you to download package for Unity 5.6

    Solution:
    1) Remove 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.

    There are 3 version of the asset on the store for Unity 5.4, 5.5 and 5.6
    If Unity Editor will fail again and download wrong version use support E-mail vacuumshaders@gmail.com for receiving 5.5 version.



    VacuumShaders - Facebook Twitter YouTube
     
  39. Ruben_Chris

    Ruben_Chris

    Joined:
    Mar 10, 2013
    Posts:
    93
    Ah, ok. I had a backup of the version I used before, so I'll just keep using that one.
     
  40. SaschaD

    SaschaD

    Joined:
    May 29, 2017
    Posts:
    1
    Is there any way to set the LOD? I would like to have mountains that are far away always show the same amount of triangles or is it just a result of the normal Unity LOD at work?
     
  41. duplexius

    duplexius

    Joined:
    Apr 24, 2015
    Posts:
    42
    Hey Davit,

    Got this today and have a few questions, which I hope you can provide answers for.

    1) Could you explain the "Low Poly Light" material option please?
    2) I would like to know your opinion on whether LODs are even useful with this setup. Would you recommend continue using LODs or would this create an unnecessary overhead?

    Thanks in advance.
     
  42. Simod

    Simod

    Joined:
    Jan 29, 2014
    Posts:
    119
    Hi Arkhivrag,

    I got a question
    How can I practically proof for myself this moment?

    I tried faceted model in 3dsMax, it's showing me several normals per vertex. But I cant see several vertices in the same position. I am missing something? Or does it (tripled vertices count) happens internally on GPU?
     
  43. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    1,921
    Sorry for late answer. Sometimes Unity does not send me notifications about thread activates.

    Low Poly Light renders flat lighting if camera is in Forward rendering mode.

    On first image Low Poly Light is Off and lighting looks smooth.
    On the second image it is On.


    LODs are always useful.
    Note, shader does not reduce mesh vertex count, it only renders in Low Poly style.



    VacuumShaders - Facebook Twitter YouTube
     
  44. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    1,921
    If you import flat shaded mesh into Unity or generate such mesh inside Unity - mesh vertex count always will be 3 times more than triangle count. Each triangle has its own set of unique vertices (3 vertices). It is the only way of creating flat shaded / low poly style meshes.



    VacuumShaders - Facebook Twitter YouTube
     
  45. Simod

    Simod

    Joined:
    Jan 29, 2014
    Posts:
    119
    Oh okay, thank you a lot
     
  46. ikemen_blueD

    ikemen_blueD

    Joined:
    Jan 19, 2013
    Posts:
    289
    @Arkhivrag hi, I really like the shader. I want to use it a lot. Can you make GPU Instancing support for the shaders? (noob shader question) Is there any LOD Shader support? Thanks :)
     
  47. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    1,921
    GPU Instancing has been added for Unity 5.6 update. Does not it work in Unity 2017.1?
    There is no LOD - shader renders mesh without effecting/modifying its vertices.



    VacuumShaders - Facebook Twitter YouTube
     
  48. ikemen_blueD

    ikemen_blueD

    Joined:
    Jan 19, 2013
    Posts:
    289
    Thanks :) I'm just asking before decide to buy it not. Just purchased since GPU Instancing is supported.
     
  49. neuroTrophy

    neuroTrophy

    Joined:
    Jan 22, 2015
    Posts:
    11
    Hello, how could I enable the wireframe shader and not have it affect all meshes with the low poly shader on them? Specifically, I want my terrain to not have the wireframe.

    Also, I love your work! I started playing with this shader a few days ago and ended up going on a shopping spree, buying up nearly all of your assets. Amazing stuff.
     
  50. RamSteelwood

    RamSteelwood

    Joined:
    Mar 6, 2013
    Posts:
    17
    Hi Arkhivrag
    I've been using your Mesh Materializer tool with my terrain, and the results are great. Would this shader give the same visual effect as the mesh that produces? Does it have options for different smooth/hardness for the colours/shading? Can you control how faceted the resulting terrain will be?
    Similarly, let's say I applied the shader to a sphere...can i control how 'low poly' the sphere will look with the shader?

    thanks for your time and the amazing assets.