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. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    With Alloy - no. U5 standard shader is on the road.



    VacuumShaders - Facebook Twitter YouTube
     
    twobob and KRGraphics like this.
  2. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,458
    This is good... I will have to look into this since this a feature that I sorely need. :)
     
  3. Axcell_Hunt

    Axcell_Hunt

    Joined:
    Jun 23, 2014
    Posts:
    7
    Hey there, could this shader be combined with your curved world shader? Also, not sure if this has been mentioned but can you show quad wireframes or just tris?
     
  4. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    Currently Wireframe shader does not support Curved World.
    Quad wireframes will be added in version 2.



    VacuumShaders - Facebook Twitter YouTube
     
  5. ippdev

    ippdev

    Joined:
    Feb 7, 2010
    Posts:
    3,850
    @Arkhivrag I updated a project to 5.0.1 from 4.6.x The original wireframe shader is there and works but I am replacing that with a new model and the mesh is magenta and I get this error "Shader error in 'VacuumShaders/The Amazing Wireframe/Deferred/Reflective/Bumped Specular': 'unity_Scale' : undeclared identifier; 'w' : vector field selection out of range at Assets/VacuumShaders/The Amazing Wireframe Shader/Shaders/Default/../cginc/Wire_Functions.cginc(22) (on opengl)". I also do not have the "Amazing Wireframe Generator" function available under Assets-> Vacuum Shaders -> Amazing Wireframe Generator. The arrow is there but nothing beyond that menu. I am using it on a huge concert screen for an upcoming music festival. Shoud I be reverting back to 4.6.x or is there a fix due soon? I would like quads as well but things being what they are ... well.
     
  6. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    Better revert back to Unity 4.6




    VacuumShaders - Facebook Twitter YouTube
     
  7. ippdev

    ippdev

    Joined:
    Feb 7, 2010
    Posts:
    3,850
    I did. Upgraded to version 1.33 and now I have a danged pink mesh and 15 errors.. I want the previous version WFS back. I am on a tight deadline for a huge concert that these will be onscreen. What did you do to mess these up? I changed nothing in the original 4.6.3 version. The original shader was fine. I imported the new head and added a shader and it threw errors and went pink. The previous head was fine until I tried to switch shader type as a test and kaboom. Now they are both pink. I am on 4.6.5f1. I seriously do not have the time to mess with this with 65 new toolset features to implement in less that 10 days. The wireframe head is the centerpiece and the tools revolve around seeing this to be able to code the sliders palettes an buttons. <begins running head repeatedly into wall>.
     
  8. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    Do not use Unity 4 shaders upgraded by Unity 5 inside Unity 4 :confused:. If you did so, then it will be really mess. Remove wireframe shader package from project and download fresh one.

    Edit:
    Tested in Unity 4.6.5f1, no problems detected.




    VacuumShaders - Facebook Twitter YouTube
     
    Last edited: May 12, 2015
  9. ippdev

    ippdev

    Joined:
    Feb 7, 2010
    Posts:
    3,850
    I didn't. I ain't no spring chicken amateur. I had duplicated the project for U5 and was using the already working U4.3 version. The problem was with 1.33 where it would not read the .dll in 4.6.5f1 probably due to the compiler errors in the shader code that lit up the console. I dug another project out & copied the Vacuum folders and removed the 1.33 version and it fixed the issue immediately. I was severely panicked at first as your beautiful shader was the centerpiece of this visual jockey toolset and to code the toolset I needed to see the results and they weren't going to delay a 20K seat concert because of the toolset not being ready. It will appear on a 60 foot screen at the Barbarella concert festival in the Dominican Republic.
     
  10. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    Did you change VacuumShaders folder path? It should be in the main Assets folder, not in any other subfolders.
    DLL is not connected with shader, it's just collection of scripts that is already are compiled.
    What errors did it throw?



    VacuumShaders - Facebook Twitter YouTube
     
    Last edited: May 12, 2015
  11. ippdev

    ippdev

    Joined:
    Feb 7, 2010
    Posts:
    3,850
    It was in the default main Assets path. Both versions were in the same place. Seem to remember that "w" something Vector in a bunch of shaders was out of range or could not be read or similar in 1.33. The previous mesh had the shader working fine in 1.33 until I changed it to another of your WF shaders and then it went pink.
     
  12. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    Ok, seems Unity 5 conversion problem, you got - 'unity_Scale' : undeclared identifier; 'w' - error, 'unity_Scale.w' does not exists in Unity 5 and it was the root of other shader errors, (not compiling - pink color).
    Full Unity 5 support will be added in 2.0version.
    For now I advice not using wireframe shader with U5.



    VacuumShaders - Facebook Twitter YouTube
     
    Last edited: May 12, 2015
  13. ippdev

    ippdev

    Joined:
    Feb 7, 2010
    Posts:
    3,850

    Umm. I am not using U5. This is U4.6.5 and you are correct about that being a U5 console error. I did get errors in U4.6.5 using v1.33.
     
  14. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    A bit lost. I am using Unity 4.6.5f1 and have no errors. I can not reproduce your issue.
    Shader itself has no new features and changes since v1.3
    All updates (1.31, 1.32, 1.33) are script updates, not shaders.
    Can you send me in PM your mesh and shader (as package)? What is your build platform and device?



    VacuumShaders - Facebook Twitter YouTube
     
  15. kenshin

    kenshin

    Joined:
    Apr 21, 2010
    Posts:
    940
    @Arkhivrag any idea about V2 release date?
     
  16. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
  17. kenshin

    kenshin

    Joined:
    Apr 21, 2010
    Posts:
    940
    Ok, understood ... I bought your asset and next week we will start to port our project on U5, for that reason I am very interested to this upgrade.

    Thanks for the quick answer.
     
  18. RFLG

    RFLG

    Joined:
    Feb 7, 2011
    Posts:
    153
    Hi, I'm also wondering about the Unity 5 compatibility. We are in between versions atm and we will use your plugin on our Unity 4 stuff.

    However I do have a urgent Unity 5 project that would look awesome if we could get the plugin to work there. For that specific project I would need only the following feature:

    -Transparent Gradient shader (for the Wireframe-to-shaded effect).

    Would this work on U5? Or should I really wait for version 2.0?
     
  19. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    Hi,
    Officially I do not support Unity 5 for Wireframe shader, but it does not mean that shader does not work in U5.
    Why just not try it yourself. You will better see if shader works with your models and fits your requirements.



    VacuumShaders - Facebook Twitter YouTube
     
  20. GXMark

    GXMark

    Joined:
    Oct 13, 2012
    Posts:
    514
    The Transparent Unlit Texture 2 Sided has clipping issues when placing a wireframe primitive inside another of the same shader type.

    Can this be look at please
     
    Last edited: Jun 23, 2015
  21. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    It is the nature of transparent shaders - PROBLEMS
    1. Try using 1 sided transparent shaders instead of 2 sided for one of primitive.
    2. or try using cutout shader for one of primitive.
    3. or you can bake two shaders (you must do it in any case before buildling) one for inner mesh and another for outer one and then try changing "Queue" tag of the shader.

    I tried reconstruct your issue you send me on e-mail and all three above options worked.




    VacuumShaders - Facebook Twitter YouTube
     
  22. GXMark

    GXMark

    Joined:
    Oct 13, 2012
    Posts:
    514
    What i noticed is that if i use the no texture double sided version i dont get this issue.
     
  23. Max-Bot

    Max-Bot

    Joined:
    Sep 25, 2013
    Posts:
    83
    Hi, I've bought the Amazing Wireframe shader.
    How can I visualize not separate Tris but Polygons to avoid diagonal edges on each of them?
    Could I add some shader or C# code?
    Any solution is good for me, thanx.
     
    Last edited: Jun 23, 2015
  24. GXMark

    GXMark

    Joined:
    Oct 13, 2012
    Posts:
    514
    The issue with that concept is what denotes a polygon. Lets say you have a sphere or some other object?

    You would want to denote what vertices would be considered a boundary shape for the shader to wireframe? This would be very cool feature!
     
  25. prestonmatterport

    prestonmatterport

    Joined:
    May 7, 2015
    Posts:
    28
    I followed the instructions in the documentation included at VacuumShaders\The Amazing Wireframe Shader\Doc\ReadMe.pdf , but the material editor for '(Preview) Color and Tangent' has no gear icon on the top-left side, and the other gear icon has no "Generate Wireframe Mesh" option.

    http://s28.postimg.org/xz3y11lb1/Amaze_wireframe_preview_pink.png

    EDIT: I was able to generate the wireframe by switching to another shader. Seems the preview shader is broken in U5.
     
    Last edited: Jun 24, 2015
  26. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    Currently there is no way to do that. Unity mesh is constructed by triangles and Wireframe shader visualizes that triangles.


    Preview shader is used inside free sample package and it has no functions like all other Wiframe shader. It is the only one of that kind.



    VacuumShaders - Facebook Twitter YouTube
     
  27. Max-Bot

    Max-Bot

    Joined:
    Sep 25, 2013
    Posts:
    83
    What about custom modification of drawing algorithm? Can I exclude vertices from lines drawing in some file?
     
  28. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    I do not offer such modifications, but you are free to do with provided shaders what ever you want.



    VacuumShaders - Facebook Twitter YouTube
     
  29. hierro__

    hierro__

    Joined:
    Sep 22, 2014
    Posts:
    59
    Hi, thank you for the big job, what im missing, and really it changed all im doing is a transparent shader gradient, im using the gradient on wireframe, but i need to set alpha of gradient to zero , so i can make "appear" objects and then manage all other variables of shader.
    Is that something on your plans or can be achieved some other way ? Thank you a lot
     
  30. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    Sorry but adding new features currently is stopped. I am working on other assets upgrade and need time to finish them.


    If I correctly understand, you want control entire mesh transparency?
    Then, open 'Wire_Vertex.cginc' file inside Shader/cginc folder and add on line 310
    retColor.a *= _Color.a;
    just before line with - return retColor; Save file and recompile shaders (right click on Shaders folder and click reimport). This adjustment will work only on Unlit and One Directional light shaders.



    VacuumShaders - Facebook Twitter YouTube
     
    Last edited: Jun 25, 2015
    Max-Bot likes this.
  31. jacknorrisuk

    jacknorrisuk

    Joined:
    Jun 17, 2014
    Posts:
    38
    Hi there,
    (I'm trying to make this work with U5 and I've read the whole thread, but maybe you can help...)

    I've got a similar problem to one above of not being able to generate wireframe mesh - all of the supplied shaders have the little gear icon greyed out - and even Component/VacuumShaders/The Amazing Wireframe Generator is greyed out.

    I've tried reimporting a few times, but still the same. Is this just an odd Unity 5 issue?
     
  32. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    Hi,
    Select mesh in the Inspector window and gear icon will be enabled. Same as 'The Amazing Wireframe Generator' menu item is disabled if mesh is not selected.



    VacuumShaders - Facebook Twitter YouTube
     
  33. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,894
    Hi, tested demo package today with Unity 5.1p2:

    - Works ok on Android (Samsung S6)
    - FAIL on iPad Mini 2 (Retina).

    I'm interested in this shader and want to purchase it but need it to work on mobile as well as on desktop (also desirable on WebGL). Can you confirm if it should work or not on which platforms?
     
  34. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    I have updated demo package for Unity 4 and Unity 5. Now it should work.



    VacuumShaders - Facebook Twitter YouTube
     
  35. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,894
    Thank you! It works now on both Android and iPad.
     
  36. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,894
    How do I enable antialias on an instanced material? When I instance a material both antialias and IBL variables are lost (not reflected in the instanced material). I want to set them back to on.
     
  37. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,894
    Another question: how do I bake the shader? I don't find the option and it's not appearing under the gear icon of the material nor the shader object.
     
  38. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    I do not know what/how are you doing, but I've just checked and instanced material has nothing lost.
    May be Unity losts custom material editor reference, just reselect object.

    For manually enabling/disabling custom keywords, use Material.EnableKeyword or Material.DisableKeyword. All available keywords are inside shader file.


    Material baking is available only if object presents in scene and is selected inside Inspector window. It is under gear icon menu.



    VacuumShaders - Facebook Twitter YouTube
     
  39. jacknorrisuk

    jacknorrisuk

    Joined:
    Jun 17, 2014
    Posts:
    38
    Thanks for your help, that worked a treat! Silly oversight on my part...

    I have another query, which might be more of a pipedream...

    I am running a plugin which displays a Kinect recording as a mesh. The holding object is just a simple shape which then becomes a succession of recorded meshes at 30fps in play mode. This obviously makes it very difficult to generate a wireframe mesh for each individual frame - although it does work perfectly if I pause play mode and generate a mesh for a single frame. I don't suppose it is possible to detect and generate a wireframe mesh for each step of a changing mesh in play mode?
    I expect it is more to do with how to un-pick the individual meshes from the recording itself and process them beforehand...Or, perhaps, this methodology isn't suitable for such application at all, and I would have more success with something that could just replicate the Unity Editor's mesh guide lines into play mode without having to generate wireframes manually...?
     
  40. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,894
  41. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    Every material uses some shader.
    select shader.png
    Inside shader files are keywords for that particular shader, like:
    #pragma multi_compile V_WIRE_ANTIALIASING_OFF V_WIRE_ANTIALIASING_ON

    Two keywords: V_WIRE_ANTIALIASING_OFF and V_WIRE_ANTIALIASING_ON

    To enable above keyword antialiasing inside script attach to renderer write:
    Material.EnableKeyword("V_WIRE_ANTIALIASING_ON");
    Material.DisableKeyword("V_WIRE_ANTIALIASING_OFF");

    Note: In baked shaders there are no keywords (they are baked).



    VacuumShaders - Facebook Twitter YouTube
     
  42. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    In next version I'll try to add fast wireframe generator skipping optimization passes.



    VacuumShaders - Facebook Twitter YouTube
     
  43. jacknorrisuk

    jacknorrisuk

    Joined:
    Jun 17, 2014
    Posts:
    38
    If you manage to pull that off, you can just take my money.
    Godspeed!
     
  44. Max-Bot

    Max-Bot

    Joined:
    Sep 25, 2013
    Posts:
    83
    Hi, there!
    Is it possible to add transparency on textured side of gradient shader?
    I tried to investigate Wire_Surface.cginc and others but failed to find appropriate place. Please help to find place where I can do something like: texturedSideColor.a = 0.0f;
     

    Attached Files:

  45. SpaceRay

    SpaceRay

    Joined:
    Feb 26, 2014
    Posts:
    455
    This is the answer to SpaceRay request quoted below

    I have to say that I have tested all available Edge detection shader on the asset store (I think there are about 6 or 7 of them), and none of them is able to make this effect shown on the third image shown below, I spent the money buying them, and regrettably none of them work as expected and shown here below, so this is why I will be waiting for you to make it

    Please, does anyone know a good edge detection shader that is able to make the result of the third image shown here below with the marked edges?

    I know that you are busy with Curved World 2, and then with Fragmentum 3, and after you will be continue adding more features to Wireframe Shader, so I just want to remember that if possible do not forget to add this feature option to not paint the interior triangles.

     
    Last edited: Jul 27, 2015
  46. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    You can not do it in current version. I'll add it to a 'wish list' for next update.


    I showed you smooth group fragmentation effect for Fragmentum 3, that technique will help me with creating non triangle wire effect here.



    VacuumShaders - Facebook Twitter YouTube
     
    Max-Bot likes this.
  47. Max-Bot

    Max-Bot

    Joined:
    Sep 25, 2013
    Posts:
    83
    Let us know please when update will come. Thanks!
     
  48. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    Not in near future. After releasing Fragmentum 3.




    VacuumShaders - Facebook Twitter YouTube
     
  49. Onsterion

    Onsterion

    Joined:
    Feb 21, 2014
    Posts:
    215
    Hi Arkhivrag,

    This plugin works with Unity 5 and WebGL?
     
  50. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    Shader is done inside Unity 4, but works without problem in Unity 5.
    Before purchase you can try free samples Unity 4 / Unity 5



    VacuumShaders - Facebook Twitter YouTube