Search Unity

Strumpy Shader Editor [Now Open Source]

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

  1. islanddreamer

    islanddreamer

    Joined:
    Apr 29, 2006
    Posts:
    473
    I haven't read this entire thread, but I'm wondering if anyone has created a repository of shaders created with this tool. It would be great to have a set of basic materials to use as a launching point for shader creation.
     
  2. HJP

    HJP

    Joined:
    Jul 8, 2009
    Posts:
    152
  3. WarpedAxiom

    WarpedAxiom

    Joined:
    Oct 27, 2006
    Posts:
    245
    Hey, Stramit, I might have fixed the TriPlanar shader myself... What's going on in the graph is beyond my understanding, but I fiddled around, read up on what the different nodes did and I think I did it. What I did was I skipped the FRAC nodes and connected the MULTIPLYs directly to the TEX2D nodes. Now, I assume the FRACs were there for a reason, but this did remove the anti-aliasing issue from what I can tell.
    For flare, I also added a NEGATIVE (-V) node to one of the side-scales, so that the texture wouldn't mirror.
    Just letting you know.
     
  4. loken

    loken

    Joined:
    Mar 25, 2009
    Posts:
    109
    A nice little repository for shader graphs would be awesome! Or even on the wiki.
     
  5. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,649
  6. loken

    loken

    Joined:
    Mar 25, 2009
    Posts:
    109


    Hi Stramit and Texel,

    This still doesn't work for some reason. Maybe there's some other trick?
     
  7. Texel

    Texel

    Joined:
    Dec 25, 2009
    Posts:
    61
    Ah, sorry about that. When I originally authored that graph, it was for atlased textures, in which the frac is necessary, however frac can bring up problems with anti-aliasing and mip-selection.

    @IslandDreamer:
    Been putting together example graphs, but I've been at a loss for specific examples. If anyone posts any requests, I'd be much obliged.
     
    Last edited: Dec 6, 2010
  8. P_Diesel

    P_Diesel

    Joined:
    Dec 6, 2010
    Posts:
    2
    Hi I am trying to add in a lightmap that I already have generated from Maya. Is there a way to get Strumpy to see a second UV set so I can add in the lightmap?
     
  9. jeroll3d

    jeroll3d

    Joined:
    Nov 6, 2010
    Posts:
    249
    Simply one of the best tools for Unity. Congratulations to those who created it.

    One question. How do I create a shader with diffuse, normal, light emission, reflection and Gloss. I do not know how to use the reflectance or the reflectance world, or do not know how to do reflection and accurate in my game, create textures, reflective metal. If anyone knows, would love to see a tutorial or example. Thank you all.

    Sorry for my bad english I'm Brazilian. : D
     
  10. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    Hey jeroll, i created a graph a few posts back that have nearly all of the components except reflection since i am not on Unity Pro...reflecting the world requires you to use render to texture... which is a pro feature
     
  11. pgomid3000

    pgomid3000

    Joined:
    Aug 16, 2010
    Posts:
    19

    Please make a sample.
    Thanks
     
  12. smiljan66

    smiljan66

    Joined:
    Jun 9, 2010
    Posts:
    610
    Grats on the shader stuff , it looks liek udk editor but can you make materials like soap? with that we could make a relaistic skin shader , you could add to the mastre material a sss skin slot or something that cn result very very handy , if there is a way to do that with this i knwo you will have to pull oput a lot of nodes and can be complaicated to achieve if you cas easy the process will be very very nice.

    cheers :)
     
  13. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,225
    Ah, the change didn't make it in, it slipped my mind to integrate it. It's on my whiteboard now so I'll remember.
     
  14. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,225
    If you use the MeshUV node you can use the second UV channel ;)
     
  15. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,225
    SSS isn't as simple as just adding a slot. For different depths you want different scattering and other properties. A good place to start on skin shaders and sub-surface scattering is in GPU Gems 3. You need custom lighting for this with light direction. Unfortunately it's not currently in SSE, but is planned.
     
  16. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,225
    Thanks for the kind words. Did Neptune_Imaging's shader help?
     
  17. windexglow

    windexglow

    Joined:
    Jun 18, 2010
    Posts:
    378
    I am very interested in that snow shader - does anyone have any papers on it? I remember crysis had one, which was very fun.


    edit: Oh yes, 1 hour ago I had never worked with shaders. Now I am extremely confident I will have a shader I will use on my procedural terrain. Many thanks for this amazing tool!
     
    Last edited: Dec 7, 2010
  18. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    Hey stramit...did you test it? I am trying to add a parameter that allows sweat textures and cube map textures based on Alpha masks... and i don't have pro :(
     
  19. NathanWarden

    NathanWarden

    Joined:
    Oct 4, 2005
    Posts:
    663
    Hi Stramit, I know it wasn't my question being answered, but thanks for answering it because I was looking for exactly this a few days ago.

    I'm not a huge shader person (but find need for new ones every month or two), but, I do remember pulling off some really cool FX (not necessarily SSS) when I was doing pre-rendered CG work as a profession.

    Thanks for the awesome shader editor again, I can actually make useful shaders without tearing my hair out now, haha :)
    Nathan
     
  20. smiljan66

    smiljan66

    Joined:
    Jun 9, 2010
    Posts:
    610
    Thanks for the fast reply :)
     
  21. Filto

    Filto

    Joined:
    Mar 15, 2009
    Posts:
    713
    Do I need Pro to be able to get any depth information out. For instance if I want to create my own fog?
     
  22. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,225
    Yes you do. Access to the depth buffer requires pro.
     
  23. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,225
    No I haven't yet.I haven't had much time on the computer at home this week. I'll try and have a look sometime this week but life is a bit hectic so I can't make any promises. For every solid week of home time I get to program I seem to have 3 more when I have commitments that stop me.
     
  24. tpomad

    tpomad

    Joined:
    Feb 23, 2010
    Posts:
    1
    looks professional, shader parts in unity are the hardest for me.
     
  25. Dry Lightning

    Dry Lightning

    Joined:
    Dec 8, 2010
    Posts:
    5
    Greetings unity users and SSE users! Just started using this shader editor after paying $100 for the other one on the unity store and i'm quickly finding that $100 might have been poorly spent :) Been playing around with it and it seems much more documented and supported, so kudo's to you guys developing it. Got a couple of questions i thought i'd see if anybody on the forum could help with, both revolve around the use of the fresnel shader.
    I used the rimlight graph that comes with SSE as a start, but having a hard time figuring out how to modify it to fit these two applications/uses. In XSI/Maya i'd use a ramp node to achieve this effect (it seems the Pow node replaces the ramp in SSE)

    1.) trying to create a shader that uses the fresnel effect to blend between two textures.
    2.) trying to create a shader that uses the fresnel to drive transparency on the geometry (so the faces that are facing more away from the surface are more opaque, and the faces directly facing the camera are transparent.)

    Any pointers in the right direction to something thats been done before or which nodes to explore?
    Thanks!
    Chad
     
  26. Texel

    Texel

    Joined:
    Dec 25, 2009
    Posts:
    61
    $ViewAngleBasedBlend.png $ViewAngleAlpha.png

    Nothing particularly complex here, in the first example, feeding it to emissive to make it clearly visible (whereas, feeding to Albedo is easy to mistake for lighting), for the second example, do make sure to turn transparency on in the master node settings.
     
  27. Dry Lightning

    Dry Lightning

    Joined:
    Dec 8, 2010
    Posts:
    5
    Thanks mate! i'll give that a whirl!
     
  28. pgomid3000

    pgomid3000

    Joined:
    Aug 16, 2010
    Posts:
    19
    The mirror shader does not work!:(
    What should I do?
     

    Attached Files:

  29. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    @stramit&Texel: um....guys...can i request fur shader graph?
     
  30. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
  31. FatiguedArtist

    FatiguedArtist

    Joined:
    Mar 3, 2010
    Posts:
    38
    @ rea

    You could look at modifying the vertices of a high res mesh based on a matrix. Parallaxing is a possibility, though I haven't looked too deeply into that yet but as I understand it, that's also available. For fur-like lighting consistency, look at the strumpy editor fresnel shader example in the default graphs.
     
  32. pgomid3000

    pgomid3000

    Joined:
    Aug 16, 2010
    Posts:
    19
    @ rea

    thanks
     
    Last edited: Dec 10, 2010
  33. Deleted User

    Deleted User

    Guest

    Hello,

    1st amazing work!!!!
    My question is now is just, does the plugin allow to create IOS based (opengl es) shaders?
    and if yes - how can i separate the effects apart from the pro based?

    greetings and much respect to your work!
     
  34. windexglow

    windexglow

    Joined:
    Jun 18, 2010
    Posts:
    378
    Basic snow shader - not as pretty as the others and ran as it's own layer. But shows the basic concept of how it would work. I'll work on it later - be kind, it's my first good shader.
    2 basic sliders control how far down snow can do, and how fast it transitions.


    View attachment $SnowShader.rar
    .rar contains sgraph only. Export as your own shader.
     
    Last edited: Dec 10, 2010
  35. GameLvr

    GameLvr

    Joined:
    Mar 22, 2009
    Posts:
    115
    Hi,

    like P_Diesel, I want to use a lightmap with a second UV channel
    but I haven't been able to figure out where to put/hook-up the MeshUV and MeshUV is not in the docs

    any pointers would be very welcome :)

    I've used shader FX before and used other 3D engines with better standard shaders so was excited to see that we (artists) will finally have a way to bridge the gap in Unity! Thanks for making SSE available to all of us!
     
  36. Dry Lightning

    Dry Lightning

    Joined:
    Dec 8, 2010
    Posts:
    5
    Speaking of lightmaps (and this ties in to GameLvr's post above) is there a good screenshot/sample of of what node(s) to use to create a lightmap shader? I know it has a very specific kind of modulation so i didn't know if there was a single node or if you had to recreate it somehow using operators.
    Also, slightly off topic, when you search forums on the unity forums, is there a way to make it take you to a specific post that has the word your searching for? As far as i can tell it just takes you to the post and you have to dig to find where the actual post is that has your search phrase?
     
  37. GameLvr

    GameLvr

    Joined:
    Mar 22, 2009
    Posts:
    115
    Yep, we need the kind of modulation that only adds the dark bits

    My goal is to have a lightmapped material that still can have some specular- with the stock Unity shaders, it seems to be lightmaps and no specular, or specular no lightmaps...
     
  38. Dry Lightning

    Dry Lightning

    Joined:
    Dec 8, 2010
    Posts:
    5
    But doesn't the modulation brighten up the diffuse as well as darken it? I have never really found a good (plain english) description on how the lightmap actually works as an overlay, but as far as i can tell it's like 50% grey/luminance is a zero add/subtract, and then anything below that gets multiplied, anything above that gets added? Or something like that.
     
  39. GameLvr

    GameLvr

    Joined:
    Mar 22, 2009
    Posts:
    115
    No idea about the technical bits and pieces, all I know is that Unity forces emissive into the mix
    Photoshop's Multiply mode for layers is the closest to how I want to combine the lightmap and diffuse map in the Albedo slot
    then just use emissive at about 80% so I still get some specular showing up- not sure it even need a map there

    we could probably get fancy and feed the lightmap into the specular glossy, but it might not be worth the use of resources
     
  40. Texel

    Texel

    Joined:
    Dec 25, 2009
    Posts:
    61
    It will build the permutations of the shaders that use light-mapping for you, from Albedo (Similarly, if you don't use albedo, you will see the instruction count drop sharply as the lightmaps are thus ignored)- In either case, Unity's lightmapping scheme is Albedo * Lightmap.rgb * Lightmap.a * 8, which lets it contain highlights brighter then bright. If you want to implement a scheme like this, you would use a simple lighting graph, and send the lightmap information you want through the pixel shader, such as through alpha or gloss (Though, writing by hand allows you to use a custom surface data struct, we haven't implemented anything to that scope yet) which can let you handle light combination in an arbitrary manner- An example would be, subtracting the alpha component in the lighting function, allowing you to have a form of ambient occlusion that is overpowered by bright lights, unlike multiplying to the diffuse, where no matter how bright the light is, black areas will never be brightened (that is, you can have recess darkening that isn't as strong to direct light)
     
  41. windexglow

    windexglow

    Joined:
    Jun 18, 2010
    Posts:
    378
    View attachment $SnowShader2.rar

    $73483124.jpg
    Improved over last version - .rar now contains a dummy diffuse+normal map texture for use.
    It now uses it's own over vertical UV (stolen from the triplanar example).
    Made it use diffuse alpha to help with transitions

    Feel free to use/modify/whatever the files inside. Textures from CGtextures. Alpha is not tiled. Texturenames may be wrong - docs are offline.
     
  42. warby

    warby

    Joined:
    Mar 23, 2009
    Posts:
    162
    i cant figure out how to make my shader additive (scene blend) is this not supported yet ?!
     
  43. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,225
    Blending support is in 3.2 which will be coming pretty soon ;)
     
  44. warby

    warby

    Joined:
    Mar 23, 2009
    Posts:
    162
    sweeet :D
     
  45. invadererik

    invadererik

    Joined:
    Oct 31, 2010
    Posts:
    148
    Here is the first shader I have created with SSE.

    The idea is to fade the edges of a mesh, with a uv that is animated.
    Good for getting rid of harsh edges with certain effects.
    Its got some extra inputs, like tint and some multipliers.

    example pic:


    graph pic:


    shader graph:
    View attachment $uvEdgeAlpha.rar

    Its my first shader and I would appreciate some feedback, could I have done this in a simpler manner ?
    In addition I would like to give the user a choice to do the effect in u or v or both, is there a way to do that ?
    Also, is there anyway to make this work on iOS ? It just looks Black when I switch to an iOS project type.

    Thanks for the incredible SEE Tool great support !
     
  46. rahuxx

    rahuxx

    Joined:
    May 8, 2009
    Posts:
    537
    Thanks for this incredible HandyTool.
     
  47. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,225
    iOS is currently not fully supported. If you have a SM2.0 shader and a 3gs+ device the shader should work but we have not done much testing in this area yet (we do plan to in the future).

    That shader looks quite optimal, so good job there! If you want to make it U or V you will need to calculate two branches then let the user lerp between them, it's the only way really. It's better to create a separate shader for this. There is no (simple) way to do static branching in unity at the moment.

    Also there is a new version of the shader editor out, that looks like 3.0 to me?
     
  48. Tinfoilfez

    Tinfoilfez

    Joined:
    Dec 9, 2009
    Posts:
    14
    Hi all,

    First of all, I'd like to say that this editor is amazing. It's extremely intuitive and was easier to grasp than stuff like Render Monkey and Mental Mill. I am hoping to see a spot on the wiki for shared sgraphs at some point, as that's how I've been learning to get the effects I want.

    That being said, I'm trying to create a shader for a forcefield dome, similar to the bubble dome in Halo. I've been somewhat successful, in that I've got the background in and behind the dome rendering and distorting, however, the screengrab is flipped upside down. Plus, it's reflecting, and I'd like it not to. What am I missing? (sgraph, shader, and images are attached)
     

    Attached Files:

  49. Aubrey-Falconer

    Aubrey-Falconer

    Joined:
    Feb 13, 2008
    Posts:
    438
    What an awesome tool!

    Here's my best forcefield so far:


    Unfortunately, I didn't save it before hitting play and it disappeared...
    I will share the exported shader if anyone would like it.
     
  50. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,225
    I'll have a look into this tonight. It might be AA on PC related. Shouldn't be too hard to fix.