Search Unity

Strumpy Shader Editor [Now Open Source]

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

  1. Jiraiyahsama

    Jiraiyahsama

    Joined:
    Sep 9, 2013
    Posts:
    14
    as i said , i have a you tube channel, in past i started a video series on radar system in boot camp, I reversed engineered it and recreated a radar system from scratch, so i was asking if i can do the same with this product?
     
  2. Spidyy

    Spidyy

    Joined:
    Mar 6, 2011
    Posts:
    184
    Just in case, anyone is using the source code of Strumpy Shader to create a Post-Effect editor in the same way?

    Playing with RenderTexture, Camera, replacement shader, temporary buffer, blitting, material, etc is quite a mess codewise, a node-based editor would be awesome. :x
     
  3. marggob

    marggob

    Joined:
    Feb 24, 2013
    Posts:
    65
    Hello!
    I need blur three nearest pixels in image. How can this be done?
    After using a random vector is noise. From him I'm trying to get rid of.To blur in screen space.
    I would be grateful for any advice.
     
  4. sethuraj

    sethuraj

    Joined:
    Sep 27, 2012
    Posts:
    2
  5. Chaoss

    Chaoss

    Joined:
    Jul 8, 2011
    Posts:
    327
    I have made an ambient occlusion shader, where it uses a grey-scale map to define the dark areas using a multiply, it puts this grey-scale map on the second UV channel, where the first is just tiling diffuse textures. The issue I'm having is in dark areas my flashlight does not light up these dark areas.

    I need my flashlight to 'remove' the darkness as it would in real life. I know that the default Unity Beast lightmapping does this so I know it's possible but I can't figure out for the life of me how. I've tried playing around with emission but that hasn't helped at all. I need a clue
     
  6. CodeWarriorUnity

    CodeWarriorUnity

    Joined:
    Sep 22, 2013
    Posts:
    4
    Hello,

    Excuse my English I'm using google translator.

    This tool is still evolving, or is the project stopped.

    Greetings and thanks.
     
  7. Boomsma1995

    Boomsma1995

    Joined:
    Mar 21, 2011
    Posts:
    95
    This project has stopped a long time ago, But you can still use it by compiling the latest version on github i think. It contains fixes for unity4 dx11 mode.
     
  8. Forgon

    Forgon

    Joined:
    Mar 19, 2013
    Posts:
    8
    How do I compile the lastest version from github?
     
  9. Charl Marais

    Charl Marais

    Joined:
    Oct 21, 2013
    Posts:
    12
    Hi Guys

    This is a really cool project but it doesn't seem like anyone has taken ownership and extended the souce since beta 4. Am I wrong or is there an updated Strumpy foating around?
     
  10. landon912

    landon912

    Joined:
    Nov 8, 2011
    Posts:
    1,573
    Unfortunately when a Tim left it dropped off a cliff. I think the only thing done since he left was update it to work in Unity 4.x and DX11.
     
  11. jesaro

    jesaro

    Joined:
    Sep 7, 2012
    Posts:
    2
    is possible create a shader for mobiles and DirectX9 with strumpy??????, i´m not interested in created shaders for DirectX11 but i got a error with strumpy in Github and strumpy in asset store :(
     
  12. FlorianSchmoldt

    FlorianSchmoldt

    Joined:
    Jul 2, 2012
    Posts:
    334
    Is it just me or has strumpy shader editor completly died, since the last unity update ? :(

     
  13. zelmund

    zelmund

    Joined:
    Mar 2, 2012
    Posts:
    426
    its not died, but all get gray. got that issue too =(((
    think need to have unity 4.2.x for creating shaders....
     
  14. frankrs

    frankrs

    Joined:
    Aug 29, 2009
    Posts:
    298
    it works fine here
     
  15. frankrs

    frankrs

    Joined:
    Aug 29, 2009
    Posts:
    298
    First of all many thanks for authoring such an awesome tool and making it public. I've been trying to do the exact same thing that AbyssStudios mentioned here but I get an error when importing a world2object node in the vertex graph. What am I doing wrong?
     
  16. Krodgee

    Krodgee

    Joined:
    Nov 28, 2013
    Posts:
    1
    If you swtich the Unity UI to the light theme then it works.
    But it makes unity a little hard on the eyes :)
     
  17. Crusha K. Rool

    Crusha K. Rool

    Joined:
    Aug 6, 2013
    Posts:
    4
    I am new to this editor and Cg in general, so please bear with me if I am overlooking something:

    Is there a function to retrieve an individual component of a vector as float value, for instance to plug the A channel of the diffuse color into the actual Alpha?
    I have some experience with the Material Editor in UE3, and the approach there would have been to use the Mask function, which creates a new vector with the number of components depending on the actual channels that you mask (i.e. masking X and Y of a Vector4 would give you a Vector2). However, in Strumpy does the Mask function seem to be coded in a way that it always gives you a Vector4 and just sets the channels that are not passed through to 0.
    Likewise would there be an Append Vector function that takes a vector with n components (n being 3 or less) and a float and then outputs a vector with n+1 components. In Strumpy there is the Assemble function, but this one will again only output a Vector4 and set any channels that were not supplied to 0.

    EDIT: Ok, after digging around a bit in the code, it seems like Strumpy doesn't really use the concept of individual floats anywhere. Even things like Constant Float and One are internally represented as Vector4 where each component is set to the respective value. :/
     
    Last edited: Nov 28, 2013
  18. frankrs

    frankrs

    Joined:
    Aug 29, 2009
    Posts:
    298
    what are you trying to do in particular? maybe someone can help. To get one channel of a vector use splat
     
  19. Crusha K. Rool

    Crusha K. Rool

    Joined:
    Aug 6, 2013
    Posts:
    4
    Well, I was just trying to get the alpha component of a color to be used for the Alpha instead of requiring a separate float parameter for it. So the Splat makes sense, I guess.

    Isn't there some performance overhead when using 4 channels everywhere instead of working with individual floats when coding the stuff by hand?


    As first test did I try to make a shader that would create a semi-transparent grid pattern without making use of an actual texture. Instead it should draw the grid lines based on world space coordinates. Not sure how complicated that would be, though. I guess I would need a Modulo operator?
     
  20. FlorianSchmoldt

    FlorianSchmoldt

    Joined:
    Jul 2, 2012
    Posts:
    334
    AH ! Never did that. Yes, its ugly but just for shader editing, this should work. Thanks a lot for the tip !
     
  21. frankrs

    frankrs

    Joined:
    Aug 29, 2009
    Posts:
    298
    I'm not sure of the additional cost of separating a single channel.I seem to remember making a sky-box material sort of like that
     
  22. Cascho01

    Cascho01

    Joined:
    Mar 19, 2010
    Posts:
    1,235
    Surely my question was answered somewhere before but I simply don´t find it:
    I have baked an object with beast in Unity.
    Now I want to replace unitys lightmapped shader with one made in strumpy:

    How can I access Unitys lightmap (UVs) in Strumpy?

    EDIT: SOLVED (Add new input > Unity > Emission (Lightmapper))
    2nd EDIT: The upper edit only works in editor, not in standalone or webplayer.
     
    Last edited: Dec 4, 2013
  23. Mr-Logan

    Mr-Logan

    Joined:
    Apr 13, 2006
    Posts:
    455
    Using a tutorial on youtube I created a rimlighting shader that calculates the rimlighting in a new "lighting model", I've been spending my evening trying to convert it from code to SSE, however I can't even seem to do the simple stuff.

    The arguments of my custom lighting model are "(SurfaceOutput s, fixed3 lightDir, fixed3 viewDir, fixed atten)"

    I discovered that "Lighting" contains the elements of the SurfaceOutput variable, but I can't seem to find lightDir or atten, and viewDirection says it's not valid in the Lighting graph. Am I doing something completely wrong here? xD
     
  24. NukeAndBeans

    NukeAndBeans

    Joined:
    Jun 11, 2013
    Posts:
    10
    Replace your existing strumpy dir with the attached archive, but don't forget to back up your graphs if you are storing them in the default location! That should fix the theme issue. Lemme know how it goes!
     

    Attached Files:

    • $SSE.zip
      File size:
      131.6 KB
      Views:
      848
  25. Ravart

    Ravart

    Joined:
    Mar 9, 2011
    Posts:
    42
    Guess the question has been asked a lot, still I don't find a good explanation. Hope you guys can help me.

    I'm searching for the "Light Direction" Component inside Strumpy Shader, so that i can rebuild a "Diffuse Wrap" Shader, similar to the example of unity.
    Cheers

    @kerfluffles:
    Thanks for the update, now I can use the dark theme again :)
     
  26. NukeAndBeans

    NukeAndBeans

    Joined:
    Jun 11, 2013
    Posts:
    10
    No problem! Let me know if you run into any issues with it, as i only gave it a quick run-over after patching it.
     
  27. thehosse

    thehosse

    Joined:
    Nov 29, 2013
    Posts:
    35
    Hey all, I've just got into shaders via strumpy shader editor, it's very very good. The only issue I have so far is making an UNLIT shader, i.e. with no lighting function. Every shader I make seems to have BlinnPhongEditor function. Does anyone know how I can make a shader in SEE with no lighting?

    Here is my shader, diffuse map with vertex based reflection map.

    http://pastebin.com/Rw7jJVD3

    Thanks
    -Hosse
     
    Last edited: Dec 14, 2013
  28. tswalk

    tswalk

    Joined:
    Jul 27, 2013
    Posts:
    1,108
    long shot here...

    i grabbed the source from github to correct the UNITY_INITIALIZE_OUTPUT issue.. compiled, and had to fix a few things that had changed i for EditorGUILayout.ObjectField (not sure I made correct changes by setting allowSceneObjects to false), but things seem to be working in general (except if I try to enable the checker board pattern in preview, no biggie).

    however, it seems that I am unable to get materials to pass inputs (such as Color) to the shader generated.. so I am left with always have to modify the inputs in SSE, export shader, and examine changes.

    Is there something I need to create in SSE to allow materials to pass properties to the shader, or is there something in the source for SSE that I may need to examine, update, and re-compile?


    [edit] ignore the deal about the properties not showing up.. for whatever reason, i incidently clicked on the shader properties area and they magically appeared for editing... so, not sure why they where hidden, but they are there a editable o_O
     
    Last edited: Dec 18, 2013
  29. J_P_

    J_P_

    Joined:
    Jan 9, 2010
    Posts:
    1,027
    Is there an updated version? One on asset store has lots of bugs. Doesn't display well in dark theme, text boxes have super buggy focus (one I had to literally type the words backward to get them to show up correctly)
     
  30. NukeAndBeans

    NukeAndBeans

    Joined:
    Jun 11, 2013
    Posts:
    10
    Try the copy I posted a bit farther up the page, it should fix your theme issue, as far as the focus issues, check to make sure nothing in your project is conflicting with SSE, it works perfectly fine in a clean project on the latest version.
     
  31. red2blue

    red2blue

    Joined:
    Feb 26, 2013
    Posts:
    200
    Hi, i downloaded your version. Where do I have to put the SSE directory to make the editor work? Thanks!
     
  32. Thomas-Pasieka

    Thomas-Pasieka

    Moderator

    Joined:
    Sep 19, 2005
    Posts:
    2,122
  33. NukeAndBeans

    NukeAndBeans

    Joined:
    Jun 11, 2013
    Posts:
    10
  34. red2blue

    red2blue

    Joined:
    Feb 26, 2013
    Posts:
    200
    Thanks both of you. So I have to install one original package and then replace the dir with the new one. I do that in the project itselfe?
    Thanks!
     
  35. NukeAndBeans

    NukeAndBeans

    Joined:
    Jun 11, 2013
    Posts:
    10
    Yes, if it didn't exist already, you can simply just drop it in.
     
  36. CptBonex

    CptBonex

    Joined:
    Dec 14, 2013
    Posts:
    15
    I have a issue when It comes to blending. I want this arrow to be in the color I set _Color to be. So if I set it to white it should be white and black should be black. But whenever I set it to white it end up being gray.
    I have tried to fool around with blending values but I cant seem to get it right. please help?

     
  37. NukeAndBeans

    NukeAndBeans

    Joined:
    Jun 11, 2013
    Posts:
    10
    Try multiplying the diffuse by 2, that should fix it.
     
  38. CptBonex

    CptBonex

    Joined:
    Dec 14, 2013
    Posts:
    15
    That helps a bit but I don't get how? If the color I send to Diffuse is white why does it turn out gray and also why does multiplying it with 2 help? Doesn't the color clamp at 1.0 for all channels? But one problem still exist. At the edge of the arrow where the background is white I is still gray. I want it to keep being white if background is white.

    https://www.dropbox.com/s/fg299stgoxjtuz4/Screenshot 2013-12-31 21.07.24.png
     
  39. michaljabrzyk

    michaljabrzyk

    Joined:
    Apr 15, 2013
    Posts:
    49
    Hellou.

    Someone have some idea how to write a Glow shader i Strumpy?
     
    Last edited: Jan 4, 2014
  40. Ryan-Gatts

    Ryan-Gatts

    Joined:
    Sep 27, 2012
    Posts:
    54
    Okay, I have what I assume to be a fairly technical thing I'm trying to solve. I'm setting up a RSRM shader and I'm using the Y component of a reflection node's normals to drive the UVs of my material.

    The vertex reflection (also labeled "simple world reflection") node produces exactly the results I want (1 at the top, -1 at the bottom), but is vertex based, and can't take a normal map. I have also tried to use the standard "world reflection" node, which produces correct results when the camera is about 2 meters away from the pixel being shaded, any closer or farther and the values fall apart. If I get to close, the values get much too low, and if I move farther away, the values get much too high and start clipping. Here's a picture of it in action:
    $worldreflectionhelp.jpg

    The top is the incorrectly working "WorldReflection" and the bottom is the correctly working "SimpleWorldReflection". Does anyone know how I can fix this, or at least shed light on why it's happening?
     
  41. Ryan-Gatts

    Ryan-Gatts

    Joined:
    Sep 27, 2012
    Posts:
    54
    Nevermind. I solved it. I'm posting my solution for anyone else that happens to run into this problem.

    Still not sure what it is about the WorldReflection node that makes it have to be normalized in this way, but here's how you do it.

    $worldreflectionsolution.jpg

    This also contains an alternative (and, in my experience, better) way of getting a linear screen depth for a given pixel (better than DepthDiff which gives bad info under certain conditions/distances). Just splat the z component of the ScreenPosition node.
     
  42. Ryan-Gatts

    Ryan-Gatts

    Joined:
    Sep 27, 2012
    Posts:
    54
    I'm back with new problems. :)
    This time, I'm hitting an interpolator limit, and I'm not sure of a good way to get around it. Here's my graph:

    $RSRM_Working01.jpg

    ...but when I attach my normal map hookups...

    $RSRM_Working02.jpg

    The weird part is, the shader works (albeit with incorrect normals) if I don't in anyway hookup the mesh's actual UVs:

    $RSRM_Working03.jpg

    What? Why? D:
     
  43. Ryan-Gatts

    Ryan-Gatts

    Joined:
    Sep 27, 2012
    Posts:
    54
    It depends what you mean when you say "glow". If you want it to have Lightsaber-style glow, you'll have to go beyond strumpy unless you have Unity Pro. That style of glow is usually done through a post-fx shader.

    If you are using unity free, there are several techniques to try. You might just want to paint a "emmissive map" and plug that into the "emmission" output. You may also want to multiply this by a fresnel or a negative fresnel (whether you want it to be brighter on the edges or the center). If you really want the glowing edges, you'll need extra geometry. Try making a quad with the default additive shader layered over top of the thing that's supposed to glow. You may want to make this quad always face the camera, or you may want to have several of these (as though doing the leaves on a tree). You might also want to do this with particles (depending on the look you want).
     
  44. Deathnote

    Deathnote

    Joined:
    Nov 26, 2013
    Posts:
    52
    I have some bugs in Strumpy Shader Editor

    $??????????2.png

    How it fix ?

    I have win 8.1 pro 64bit, UNity3d 4.3.3 pro, StrumpyShaderEditor-Beta-4.0b
     
  45. NukeAndBeans

    NukeAndBeans

    Joined:
    Jun 11, 2013
    Posts:
    10
    Try the version I posted on the previous page, that should fix that issue, if it doesn't, I'll see what I can do about it when I get up. (About to go to sleep)
     
    Last edited: Jan 21, 2014
  46. frankrs

    frankrs

    Joined:
    Aug 29, 2009
    Posts:
    298
    try using the lighting graph
     
  47. Deathnote

    Deathnote

    Joined:
    Nov 26, 2013
    Posts:
    52
    Dont see, can u give me a link ?
     
  48. Ryan-Gatts

    Ryan-Gatts

    Joined:
    Sep 27, 2012
    Posts:
    54
    You can also change your Unity UI color to the "light theme" and the text will be much more visible.
     
  49. vishal0035

    vishal0035

    Joined:
    Aug 18, 2012
    Posts:
    2
    Hey I found your height fog graph very useful, and I have edited it so that it can be used with unity terrain too. I have also made some changes to the screen position part of the graph now it work like unity default fog but with fog at required height and so we can now use both unity fog for environment fog effect and this fog for underwater fog effect
    Download the shader files
    Video Tutorial link : http://www.youtube.com/watch?v=TXKtN5lXKO0
    $vlcsnap-2014-02-08-18h30m33s47.png
     

    Attached Files:

  50. shkar-noori

    shkar-noori

    Joined:
    Jun 10, 2013
    Posts:
    833
    can this be used with unity 4? i mean this was updated like.. i dont know 2 years ago?
     
unityunity