Search Unity

Strumpy Shader Editor [Now Open Source]

Discussion in 'Works In Progress - Archive' started by Tim-C, Aug 2, 2010.

  1. viral-vector

    viral-vector

    Joined:
    Apr 12, 2010
    Posts:
    248
    Got this last night have already created a small shader based on your rimlight example. AAA+++ stuff here
    I wanted to know how this works for iOs devs. meaning performance wise since this generates surface shaders. can i safely use them for iOs especially if i don't have too many objects(filter rate, drawcalls), as long as i keep the shader.graphs simple. at this point we can assume most people have migrated from the 3Gs anyway.
    For example can i use your rim-light example as is for iOs on say 20 objects on screen. i have produced an app for ios in the past with 60~80 drawcalls using unity built in mobile shaders and it ran fine iOS 4,4s up
     
  2. JoshuaK

    JoshuaK

    Joined:
    Oct 11, 2012
    Posts:
    6
    I made this clip fade away shader last night and got it to work fine but i was looking for some help with one part on it. It currently works on my test object fine because the fade starts at 0,0,0 going up on y in the world. I was trying to get it to work were this can be put on any object and get it to work on the Y axis any where in the scene. The problem is if this object was 10 feet off the ground plane, it would take a while for the swipe to get to the mesh. So is there a way to get the local axis on the mesh and use that.
    $image-03.JPG $image-02.JPG $fade-blend-shader.JPG $image-01.JPG
     
  3. JoshuaK

    JoshuaK

    Joined:
    Oct 11, 2012
    Posts:
    6
    Ok I think I found the solution to this, i just need to us v*m with mesh uv and object to world node.
     
  4. gaxx

    gaxx

    Joined:
    Oct 14, 2012
    Posts:
    13
    Hi there! Thank you stramit for creating this wonderfull tool!

    Like most of guys here I've a question :)

    I'm trying to create a vertex shader based on the vertex colors painted on the mesh, however the vertex color node is not valid in the vertex graph type. Is there any other way to extract the specific color channel and manipulate its position?

    I've read this article http://www.strumpy.net/?cat=21 but the graphs there drive all vertices on a mesh with the same sin function. I would like to have a full control over specific vertex in a mesh.

    Thanks in advance :)
     
    Last edited: Oct 21, 2012
  5. Jack2g

    Jack2g

    Joined:
    Aug 6, 2012
    Posts:
    19
    Cool effect using Clip.

    What is clip used for? And would I use that for creating an alpha cutout shader?
     
  6. cynel

    cynel

    Joined:
    Apr 18, 2012
    Posts:
    734
    is it possible to make panted style shaders
     
  7. JoshuaK

    JoshuaK

    Joined:
    Oct 11, 2012
    Posts:
    6
    Ok here is my updated shader, and yes Jack2g you can use clip for alpha cutout. Just when you are going to use it, you need to change some settings for it. I'll post a picture for the settings.
    $shader-update-01.JPG $shader-update-settings.JPG $shader-update-02.JPG $shader-update-03.JPG
     
  8. mamoniem

    mamoniem

    Joined:
    Jul 23, 2012
    Posts:
    174
    hope to see it integrated with Unity soon!
     
  9. hvilela

    hvilela

    Joined:
    Dec 6, 2010
    Posts:
    24
    Stupid question, but... how do I unlink two nodes?
     
  10. gaxx

    gaxx

    Joined:
    Oct 14, 2012
    Posts:
    13
    Right click :)
     
  11. Graphicalgeek

    Graphicalgeek

    Joined:
    May 14, 2009
    Posts:
    218
    Is there a function to invert the alpha values?
     
  12. gaxx

    gaxx

    Joined:
    Oct 14, 2012
    Posts:
    13
    try 1-v node
     
  13. jerryholand

    jerryholand

    Joined:
    Oct 20, 2012
    Posts:
    8
    hi,

    nice shader,can blend with soft edge?

    sorry for my bad english.
     
  14. Jesus

    Jesus

    Joined:
    Jul 12, 2010
    Posts:
    490
    Is anybody else having trouble with alpha blended objects receiving shadows? I can get them to cast properly, but even with full forward shadows, advanced shadow pass, etc, they seem to be unshadowed. Also, they ignore projectors as well, and yes I've doublechecked 'ignore projectors' was not on.


    Help?
     
  15. Marco-Sperling

    Marco-Sperling

    Joined:
    Mar 5, 2012
    Posts:
    606
    Under what circumstances could an exposed shader input of type float jump straight back to its default value of 1 as soon as the Unity3d Editor changes its state to game mode?
    What I am experiencing:
    I have a number of range and float properties exposed to the material. All of them can be changed to my liking and they stay the way I 've set them up once I click "play". All but one. The last one in the row of exposed properties to be precise. That last float property always flips back to 1 whenever I press "play".
     
  16. Homicide

    Homicide

    Joined:
    Oct 11, 2012
    Posts:
    259
    K, im not sure i understand whats goin on here. I see all sortsa people still using this , but for me, it simply doesnt work properly anymore. Since Unity 3.5f and on. there is a *Graph Error warning upon opening SSE, with the SSE default graph, and when opening any other graph i have worked on.

    Simple shaders still seem to compile, and yet no inputs work properly it seems. Nobody else has these graph errors? I find it hard to believe im the only one experiencing this , when as i stated, even SSE default import, and default graph spits out an error.

    EDITED : Wow ignore me , been away from Unity too long, and have gotten stupid over time :D

    <<--- L
     
    Last edited: Oct 25, 2012
  17. Marco-Sperling

    Marco-Sperling

    Joined:
    Mar 5, 2012
    Posts:
    606
  18. corax

    corax

    Joined:
    Jun 4, 2012
    Posts:
    34
    any tips on recreating the classic sci-fi computer monitor?



    This is the general idea: something with glow and transparent but not so complex.
     
  19. hvilela

    hvilela

    Joined:
    Dec 6, 2010
    Posts:
    24
    I've created a shader with just one range for gloss and one color for Specular. It compiles, shows the desired result in the Strumpy preview window as in the Unity preview window, but in the scene / game view it shows no specularity. What could I be doing wrong?
     
  20. acropole

    acropole

    Joined:
    Aug 13, 2009
    Posts:
    170
    Hi,

    I worked a lot on how to build a shader for my sun model, with lava flow, a bit like water, but I didn't found any way to do it properly.
    At this time I got the result bellow, and it's not at all what I'm looking for. One problem is that even by using grey scales textures and grey color I got all the rainbow colors as a result !

     

    Attached Files:

    Last edited: Nov 5, 2012
  21. anadin

    anadin

    Joined:
    Oct 28, 2005
    Posts:
    97
    Can't quite see the nodes - got a bigger screenshot?
     
  22. anadin

    anadin

    Joined:
    Oct 28, 2005
    Posts:
    97
    I know this could be a silly question but do you have a light in your scene?
     
  23. acropole

    acropole

    Joined:
    Aug 13, 2009
    Posts:
    170
    In google chrome you can right click on the image and select "open in a new tab". The image size is around 2900 pixels large but unity forum scale it down to fit posts size. I didn't found how to make it clickable to open the full res one.
     
  24. hvilela

    hvilela

    Joined:
    Dec 6, 2010
    Posts:
    24
    What should be done to keep specularity while using directional lightmaps and a strumpy shader editor's shader?
     
  25. anadin

    anadin

    Joined:
    Oct 28, 2005
    Posts:
    97
    Make sure you untick 'Disable Forward Add' in the Color and Lighting Settings
     
  26. anadin

    anadin

    Joined:
    Oct 28, 2005
    Posts:
    97
    <doh!> yeah sorry I can't quite tell from just looking at it and I am a little busy to build it - my suggestion is go back along the change and connect different stages to the Diffuse channel and verify it is doing what you like until it goes wrong. you may need to send slightly different versions to diffuse and Emission but that is just a guess
     
  27. PLyczkowski

    PLyczkowski

    Joined:
    Apr 2, 2011
    Posts:
    6
    Hi, the selected part breaks my shader. Why? I have unity free, chose "shader model 3", but I saw people using this setup on unity free.



    $shader1.jpg
     
    Last edited: Nov 14, 2012
  28. acropole

    acropole

    Joined:
    Aug 13, 2009
    Posts:
    170
    The problem is that Time, Costime an Sintime are float4 with differents values. It's necessary to use the Splat node and chose one.
     
  29. PLyczkowski

    PLyczkowski

    Joined:
    Apr 2, 2011
    Posts:
    6
    If that was for me - could you say it again in simpler language?
     
  30. acropole

    acropole

    Joined:
    Aug 13, 2009
    Posts:
    170
    Sorry it's for my own problem.
     
  31. Grog

    Grog

    Joined:
    Jan 4, 2012
    Posts:
    7
    Try it this way. Works for me.
    Problem was you we're sampling using three different sets of UVs (doesn't matter if it was the same UV1 set)

    $shader.gif
     
  32. PLyczkowski

    PLyczkowski

    Joined:
    Apr 2, 2011
    Posts:
    6
    Works! Thanks so much.
     
  33. Chaoss

    Chaoss

    Joined:
    Jul 8, 2011
    Posts:
    327
    Does this still work in 4.x?
     
  34. anadin

    anadin

    Joined:
    Oct 28, 2005
    Posts:
    97
  35. acropole

    acropole

    Joined:
    Aug 13, 2009
    Posts:
    170
    No, shaders are borken in Dx11 modes.
     
  36. GMM

    GMM

    Joined:
    Sep 24, 2012
    Posts:
    298
    Whenever i try to use the shader editor, my preview view always just states that The Shader Needs Updating, how do i update the shader or am i missing something to install before it will work?

    Edit, happens no matter if i create a new shader or preload the ones with the package.
     
  37. anadin

    anadin

    Joined:
    Oct 28, 2005
    Posts:
    97
    Oh yeah DX11 is a no. Unity have not done shaderlab model for DX11 yet I don't think - DX11 stuff needs doing by hand
     
  38. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,018
    Good thing I am waiting to upgrade to Unity4... I can't imagine not being able to work in Strumpy in Unity4 especially with tessellation.
     
  39. HeadClot88

    HeadClot88

    Joined:
    Jul 3, 2012
    Posts:
    719
    Is there an ETA on when this is going to be updated for Unity 4?
     
  40. acropole

    acropole

    Joined:
    Aug 13, 2009
    Posts:
    170
    I doubt there will be an update, HeadClot88.
    I talked to one of the 2 guys who created this, on IRC. They have been hired by Unity. So there is a good news and a bad news.
    The good is that there will be an official shader editor. The bad is that the current unofficial may be not updated anymore.
     
  41. TechnicalArtist

    TechnicalArtist

    Joined:
    Jul 9, 2012
    Posts:
    732
    Waiting for dx 11 shader with SSE!!!!
     
  42. tayl0r

    tayl0r

    Joined:
    Jan 6, 2012
    Posts:
    85
    Can someone give me some tips on how to get transparency to work with the SSE?

    I'm trying to make a progress bar with rounded corners + animated texture so my idea was to have a "mask" texture that I would combine with the bar texture (which would have scrolling UVs).

    But, I can't seem to get anything to be transparent. I think it might be working in the previewer (the grey areas are transparent, I added a huge stripe down the middle just as a test) but when I export the shader and use it in game it's not transparent.

    http://screencast.com/t/QtsruuZ6A4R
     
  43. acropole

    acropole

    Joined:
    Aug 13, 2009
    Posts:
    170
    Try to multiply diffuse RGB by your alpha.
    Alpha is a bit tricky, I got some difficulties with it too, sometimes.
     
  44. anadin

    anadin

    Joined:
    Oct 28, 2005
    Posts:
    97
    You need to change your blend settings..

    Basic Transparent is Source Alpha, 1-Source Alpha I think - sorry can't remember off the top of my head - but play with them and you should find it.
     
  45. MaT227

    MaT227

    Joined:
    Jul 3, 2012
    Posts:
    628
    Hi everyone,

    I am trying to make a snow shader but I have very low knowledge about making shaders. My snow shader needs to be very stylized. I am not trying to create realistic scattering.
    Here are some example of what I am trying to do.




    I thinkg that I need to build my shader with this:
    Specular with noise (maybe noise map)
    rim light
    fake scattering on top border
    bump
    fresnel

    I've searched for some tutorial or explanation but I didn't found anything very helpful. Can you give me some advice, tutorial etc...

    Thanks a lot !
     
  46. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,163
    Hi all.

    Over the past few months it has become very clear to me that I don't have the time to maintain and continue to work on SSE. My life at unity is very exciting and very busy; I really wish that I could tell you more about all the cool things I have had be opportunity to work on but a lot of them are not ready to be talked about. What I can talk about is the future of SSE and the last ninja camp we had a a few weeks ago.

    Lets start with SSE. I don't have time to work on it, my priorities are completely making unity itself a better product with great usable features. This means that I spend all my working day (and some nights!) coding features like gamma correct lighting, hdr, hardware cursors and a slew of bug fixes. This stuff is really important to me because it effects more people then those that know SSE exists. Before I got so into all the current unity tasks I have I started a rewrite of SSE, because while making it I learnt a hell of a lot about the unity shader system and the unity GUI. As sad as it is to say, this unfinished code will never see the light of day. What will see the light of day is the full source code of SSE in a git repository tomorrow. You will be free to branch it, fix bugs and see how it works. You can even just include the source in your project and not worry a about these dll things!

    So what of the future? I know how important a nice usable material system is for everyone, so during the last ninja camp a group of us started working on a shader graph prototype using the new unity graph system (as seen in mecanim). You can read more about the project here http://blogs.unity3d.com/2012/12/07/three-ninja-camp-vii-projects-at-a-glimpse/ So far it's just a prototype and we don't have any resources scheduled to continue the work. But a built in material system in unity that is easy to use? I think that makes sense.

    I'm packaging up the SSE source today, and will post the link tomorrow.

    Tim
     
  47. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,163
    I didn't realise but I accidentally closed the thread when I was posting from my phone. Sorry about that.

    Here is the GIThub link to SSE project. I'll be happy to answer any questions about the source.

    https://github.com/stramit/SSE.git
     
  48. nipoco

    nipoco

    Joined:
    Sep 1, 2011
    Posts:
    2,008
    I really hope this Shader Graph project won't just a proof of concept thing.
    If Unity want's to keep pace with UDK, a node-based shader system is a must.
    Right now, you don't have much artistically freedom, if you can't write your own shader code. Even Blender's game engine has a easy to use material system. Something Unity does not shine at the moment :(
     
  49. ShawnMcCoo1

    ShawnMcCoo1

    Joined:
    Dec 26, 2011
    Posts:
    39
    Thank you very much for this and all of your hard work.
     
  50. mellinger

    mellinger

    Joined:
    Sep 3, 2012
    Posts:
    13
    We just moved to Unity 4 and the shader created with SSE and Unity 3.x sadly dont seem to work :(

    I get a lot errors of this kind:
    "Shader warning in 'NormalMap': Program 'vert_surf', implicit truncation of vector type (compiling for d3d11) at line x"

    Anyone else got this problem?
     
unityunity