Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

► Wireframe shader - The Amazing Wireframe shader ◄

Discussion in 'Assets and Asset Store' started by Arkhivrag, Jun 11, 2014.

  1. Flow17983

    Flow17983

    Joined:
    Mar 4, 2015
    Posts:
    3
    Hello,

    we have a problem using your Plugin with baked PLA Animations. Because of the Mesh Conversion, the PLA Animation doenst work anymore. Any Idea how to fix it? Maybe it is possible to give our Animations/Models barycentric coordinates in Cinema 4D? Thanks.
     
  2. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    Not familiar with PLA Animations format. If it is somehow related to the blendshapes, then it is not supported.
    In September I'll add Geometry shaders that do not require mesh conversion and barycentric coordinates and will work just on fly with almost any type of mesh including blendshapes and even terrain.



    VacuumShaders - Facebook Twitter YouTube
     
  3. Mike-B

    Mike-B

    Joined:
    Nov 18, 2012
    Posts:
    13
    hi
    Does it work with terrain?
    thanks
     
  4. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    Shader works only with meshes containing barycentric coordinates, terrain has no such data.



    VacuumShaders - Facebook Twitter YouTube
     
  5. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    v 2.1
    • Unity 5.4 compatible.
    • Added shader Culling option (Front, Back, Off) - used for rendering cheap 2 sided or single sided mesh.
    • Material editor supports Undo/Redo

    • Fixed: Fresnel effect did not work with bumped shaders.
    • Fixed: Not all lit shaders had option for wire to receive light.
    • Fixed: PBS shaders Transparent Texture Alpha Offset parameter had no effect.
    • Fixed: PBS 2 sided cutout shaders blend mode was incorrectly.
    • Fixed: PBS cutout shader did not receive Point lights (ForwardAdd pass) in combination with unlit wire.

    • Shader keyword count reduced by 4.
    If 'Vertex Color' lost just recheck option inside material editor.



    VacuumShaders - Facebook Twitter YouTube
     
  6. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
  7. Flow17983

    Flow17983

    Joined:
    Mar 4, 2015
    Posts:
    3
    Hi,

    any news about the "Geometry shaders" you mentioned in the last posts for september? So we can use the Plugin without barycentric coordinates?

    Thanks.
     
  8. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    Geometry shaders will be added to the coming update v2.2



    VacuumShaders - Facebook Twitter YouTube
     
  9. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    Another new feature for v2.2 - Colored wireframe.
    Wireframe color can be controlled from texture and/or vertex color.
    Wire-color.png



    VacuumShaders - Facebook Twitter YouTube
     
    Last edited: Sep 21, 2016
  10. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    sjm-tech likes this.
  11. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    DX11 Geometry shader - does not need mesh converting (generating barycentric coordinates), works with all type of meshes and support all mesh features including BlendShapes.
    Part of coming v2.2

    Requires GeometryShaders support.



    VacuumShaders - Facebook Twitter YouTube
     
    VKirillov likes this.
  12. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    v2.2 has been released

    New
    • Wire distance fade effect.
    • Wire size can be fixed or screen space size.
    • Wire color can be controlled by texture and/or vertex color.
    • Geometry Shader - does not need mesh converting (generating barycentric coordinates). Works with all mesh types. Supports all mesh features.

    Change
    • Wire Transparency texture option removed. Use wire Color Texture instead.
    • Wire size now is controlled as float variable (not as slider). After upgrading existing project wire size on models will need to be adjusted.

    Fix
    • 'Too many texture interpolators' errors for D3D9 renderer.



    VacuumShaders - Facebook Twitter YouTube
     
  13. angelsm85

    angelsm85

    Joined:
    Oct 27, 2015
    Posts:
    63
    Last edited: Oct 1, 2016
  14. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
  15. benjamd

    benjamd

    Joined:
    Oct 2, 2012
    Posts:
    11
    Any idea how I can use this shader in conjunction with the Camera Bloom effect?

    Trying to get the wireframe lines to glow. I had hoped that setting a HDR color for the wire color and then setting the bloom threshold to 1.0 would do it, but it appears its not the case.

    Would it be hard to add an emissive color to the wire shader?
     
  16. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    Wirecolor is in HDR, just increase its Current Brightness inside color picker.



    VacuumShaders - Facebook Twitter YouTube
     
  17. benjamd

    benjamd

    Joined:
    Oct 2, 2012
    Posts:
    11
    Hmm, is there any way to set this programmatically? new Color(2.0f, 1.0f, 1.0f, 1.0f) seems to be clamping somewhere along the line.
     
  18. benjamd

    benjamd

    Joined:
    Oct 2, 2012
    Posts:
    11
    So upon further investigation I've found for HDR colors you're just supposed to make the base color then multiply it. However, this doesn't seem to be making the wire rendering appear at a brightness > 1.0, so the bloom effect doesn't pick up the lines.

    Any chance you could put together a demo of making the wireframe lines glow?
     
  19. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    Updating HDR color from script seems problematic (didn't know before).
    The only solution I found is using ColorUsageAttribute
    Code (CSharp):
    1.  
    2. [ColorUsageAttribute(true, true, 0f, 8f, 0.125f, 3f)]
    3. public Color colorHDR;
    4.  
    5.    
    6. void Update ()
    7. {  
    8.     material.SetColor("_V_WIRE_Color", colorHDR);      
    9. }
    10.  


    VacuumShaders - Facebook Twitter YouTube
     
  20. benjamd

    benjamd

    Joined:
    Oct 2, 2012
    Posts:
    11
    Aha. Thanks for the tip. I will give this a try this evening.
     
  21. benjamd

    benjamd

    Joined:
    Oct 2, 2012
    Posts:
    11
    I tried using the above code to set a HDR color for "_V_Wire_Color" on a sphere and used the Bloom on the Camera technique detailed in this post: http://answers.unity3d.com/questions/914945/what-replaces-the-glow-effect-in-unity-5.html

    Haven't had much luck getting the output to oversaturate and produce the glow though, I have to set the threshold down below 1.0 to get any glow effect from the wireframe at all, which makes it hard to control the effect. Any ideas?
     
  22. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    Wire color is in HDR and its Current Brightness controls emission strength.
    wireframe shader.png


    EDIT
    Here is example how control Current Brightness value of HDR color from script:
    Code (CSharp):
    1. [Range(0.0f, 99.0f)]
    2. public float brightness;
    3.  
    4.  
    5. Material material;
    6. Color targetColor;
    7. string colorPropName = "_V_WIRE_Color";
    8.  
    9. float h,s,v;
    10.  
    11.  
    12. void Start ()
    13. {
    14.     material = GetComponent<Renderer>().sharedMaterial;
    15.  
    16.     targetColor = material.GetColor(colorPropName);
    17.  
    18.     Color.RGBToHSV(targetColor, out h, out s, out v);
    19. }
    20.  
    21. void Update ()
    22. {
    23.     material.SetColor(colorPropName, Color.HSVToRGB(h, s, brightness));
    24. }
    Glow.png



    VacuumShaders - Facebook Twitter YouTube
     
    Last edited: Nov 22, 2016
  23. benjamd

    benjamd

    Joined:
    Oct 2, 2012
    Posts:
    11
    I was just logging in to post almost the exact same thing. Turns out I had it working all along but had no idea you had to crank the brightness so high.

    Excellent, thanks for the help!
     
  24. tapticc

    tapticc

    Joined:
    Jan 16, 2014
    Posts:
    379
    Hi sorry if this has been asked before, to apply the shader to just one mesh would you just set the shader on the game object's mesh at runtime? Just want to check you can isolate a single mesh and toggle the shader. Thanks :)
     
  25. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    This is per-mesh shader, so you can isolate a single mesh.
    For run-time use if you are targeting device without GeometryShaders support, inside mesh must be baked some data (run-time API is included) that is required by the shader.



    VacuumShaders - Facebook Twitter YouTube
     
  26. tapticc

    tapticc

    Joined:
    Jan 16, 2014
    Posts:
    379
    Thanks
     
  27. edwardrmiller

    edwardrmiller

    Joined:
    May 2, 2015
    Posts:
    8
    Thank you for creating an awesome product.

    Can somebody explain how to add a gradient between two masks, using the wireframe mask controller? I've seen pictures but can't see how to implement it myself.

    Thank you in advance
     
  28. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    Which pictures?



    VacuumShaders - Facebook Twitter YouTube
     
  29. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    v2.3 released

    • Unity 5.5 ready
    • Added Wireframe Texture Exporter tool. Bakes wireframe into texture.
    • Added option for rendering wireframe from texture. The fastest solution for mobile devices.
    • New Improved Emission feature. No need to use HDR wire color.

    Exporter.png



    VacuumShaders - Facebook Twitter YouTube
     
    Voronoi likes this.
  30. BobbleHead

    BobbleHead

    Joined:
    Jul 3, 2012
    Posts:
    33
    Hello, this doesn't seem to work with transparent images at the moment, did it ever or is this a bug?

    (I'm trialing the free version btw, very cool, but need transparent!)
     
  31. Voronoi

    Voronoi

    Joined:
    Jul 2, 2012
    Posts:
    584
    Hey, just wanted to say I bought this shader and it is amazing! Really cool the wireframe texture baking and the function to create a barycentric mesh. This will make it easy to work on any platform, which is what has bugged me about some of the other shaders out there since I am primarily Mac.

    I am running OSX and OpenGL 4.1, so I can report the Geometry shader works with any mesh. I am using 5.6 beta and it does not yet work with the Metal Editor enabled. I assume it does not currently work with Metal?
     
  32. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    Free version has no transparent shaders. There are in full version.

    Beta version are always problematic to support. Let's wait for the final release.



    VacuumShaders - Facebook Twitter YouTube
     
  33. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    Just a little update v2.31 for fixing cutout shadows for Geometry Shaders
    wire_fixed.png



    VacuumShaders - Facebook Twitter YouTube
     
  34. Liminal-Ridges

    Liminal-Ridges

    Joined:
    Oct 21, 2015
    Posts:
    255
    Hello, i get this error:

    Shader warning in 'VR/SpatialMapping/Wireframe': Shader is not supported on this GPU (none of subshaders/fallbacks are suitable)

    I have a GeForce GT 330m. Will the asset work on mobiles?
     
  35. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    There is no such shader in the package.



    VacuumShaders - Facebook Twitter YouTube
     
  36. Liminal-Ridges

    Liminal-Ridges

    Joined:
    Oct 21, 2015
    Posts:
    255
    Ι tested the demo you provide the error is from there
     
  37. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    There is no VR/SpatialMapping/Wireframe shader neither in free package nor in full.
    Untitled.png


    [EDIT]
    It's Unity feature, check here.



    VacuumShaders - Facebook Twitter YouTube
     
  38. Liminal-Ridges

    Liminal-Ridges

    Joined:
    Oct 21, 2015
    Posts:
    255
    What feature does the demo contain? Just the editable wireframes above the white models?
     
  39. Voronoi

    Voronoi

    Joined:
    Jul 2, 2012
    Posts:
    584
    That is a new built-in Unity shader for VR and is not part of this package.
     
  40. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    jmjd, imaginationrabbit and sjm-tech like this.
  41. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    Last edited: Jan 13, 2017
  42. tachyon-particle

    tachyon-particle

    Joined:
    Jan 5, 2016
    Posts:
    79
    Hi,

    Unity 5.5.0p4 Pro
    The Amazing Wireframe 2.31

    When I use the "Physically Based" with the Rendering Mode of any of the Transparent (Simple, ZWrite, 2 Sided), for some reason it's not Receiving Light, but instead the wireframe is always fully lit, and my rendering path is Deferred.

    The work-around that I had to do to make this Transparency work for Physically Based was first go and choose the shader "Mobile/One Directional Light" and check the "Receive Light", and then change the shader to "Phyiscally Based". As a result, the "Receive Light" checkbox remained marked and it seems to render properly. But, there is a message underneath the Receive Light option that says, "In Deferred mode Physically Based shaders wire is always rendered with Recieve Light option enabled." For some reason, for Physically Based, it's not rendering with Receive Light automatically when Transparency is chosen.

    When selecting "Opaque" for the Physically Based, it seems to automatically behave correctly, in terms of receiving light.

    Can you confirm that this is happening? Or maybe I'm not using this properly or maybe I am overlooking a setting?

    Thank you!
     
  43. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    Fix is added in the coming update.

    Receive Light option for Transparent shaders can be turned on and off in all rendering modes.
    The restriction applies only Opaque and Cutout shaders.



    VacuumShaders - Facebook Twitter YouTube
     
    tachyon-particle likes this.
  44. tachyon-particle

    tachyon-particle

    Joined:
    Jan 5, 2016
    Posts:
    79
    Awesome. Awesome.

    Thank you for confirming this!

    By the way, The Amazing Wireframe is truly brilliant, and of course, truly amazing ...

    I am looking forward for the fix in the upcoming update. And, I am really excited about the forthcoming mega update.
     
  45. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    Global illumination support, part of the mega update. Coming next week.


    Scene will be included in the package (including animations).



    VacuumShaders - Facebook Twitter YouTube
     
    Last edited: Jan 26, 2017
    jmjd likes this.
  46. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    v2017.1 has been released

    Social.png

    • Added quad mesh rendering
    • Added tessellation shaders
    • Added Global IlIumination support
    • Added full image effects support
    • Added Unity Standard shaders (some wireframe effects are not supported)
    • Added AO textures support for PBR shaders
    • Added bump strength controller
    • Added Additive and Multiply shaders for GeometryShader group.
    • Plane and Sphere dynamic mask supports smooth transition.
    • PBR 'Wire Only' shaders have Metallic and Smoothness controllers
    • Projectors support Distance Fade
    • Improved wireframe rendering (size of 1 will render pixel-perfect wireframe)
    • Fixed shaders not receiving fog in Forward rendering mode.
    • Various multiple adjustments and improvements.

    Note:
    • Some shader names has changed. After importing package materials may need to re-assign shaders.
    • Due to increased shader count and effects importing package may take more than 15 minutes (depends on hardware).



    VacuumShaders - Facebook Twitter YouTube
     
  47. tachyon-particle

    tachyon-particle

    Joined:
    Jan 5, 2016
    Posts:
    79
    Hi,

    Unity 5.5.1p3 Pro
    The Amazing Wireframe Shader v2017.1

    Running a build, there are warning messages showing up in the "output_log.txt":

    WARNING: Shader Unsupported: 'Hidden/VacuumShaders/The Amazing Wireframe/Mobile/Vertex Lit/Transparent/Full' - Pass '' has no vertex shader
    WARNING: Shader Unsupported: 'Hidden/VacuumShaders/The Amazing Wireframe/Mobile/Vertex Lit/Transparent/Full' - Setting to default shader.
    WARNING: Shader Unsupported: 'Hidden/VacuumShaders/The Amazing Wireframe/Mobile/Vertex Lit/Transparent/Wire Only' - Pass '' has no vertex shader
    WARNING: Shader Unsupported: 'Hidden/VacuumShaders/The Amazing Wireframe/Mobile/Vertex Lit/Transparent/Wire Only' - Setting to default shader.


    To confirm, are these warning messages ok?

    Thank you
     
    Last edited: Feb 16, 2017
  48. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    Seems Unity shader compiler issue, related to your build target + drivers + Unity bug.

    Select 'VacuumShaders\The Amazing Wireframe Shader\Shaders\Resources\Transparent Simple Full.shader' and inside Inspector window click on Compile and show code button. If there are any shader related problems Unity will print in Console window. If there are no problems with shader I can not help.



    VacuumShaders - Facebook Twitter YouTube
     
  49. tachyon-particle

    tachyon-particle

    Joined:
    Jan 5, 2016
    Posts:
    79
    I did the "Compile and show code" as you have mentioned and there were no errors shown in Console.

    Thank you for the response. I do understand what you are saying. I just wanted to confirm if there are any shader related errors or not.

    By the way, the new quad mesh looks very good.

    Thanks again
     
  50. haijun

    haijun

    Joined:
    Feb 4, 2015
    Posts:
    8
    This is absolutely brilliant work! I bought the assett today, but haven't got a chance to try it. My question is do you support just visualizing the vetexes of the mesh in the fashion of "point cloud". I have a scenario where visualizing the triangles is just too much for people who don't know much of graphics.