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

Shader Forge - A visual, node-based shader editor

Discussion in 'Assets and Asset Store' started by Acegikmo, Jan 11, 2014.

  1. Bluntie

    Bluntie

    Joined:
    Jun 11, 2013
    Posts:
    10
    Oho! That opens some entirely new options for me, thank you very much. I will experiment. :D
     
  2. Vladnes

    Vladnes

    Joined:
    Jul 5, 2014
    Posts:
    51
    @Eideren Thanks, it works very well
     
  3. Amnoon

    Amnoon

    Joined:
    Jul 20, 2013
    Posts:
    31
    I have created a custom light shader with a (blue) pulse animated with a panner. The problem is that i can't set a dark pulse color... If i want a black pulse it will desapear because of the multiply operation. I have try a lot of combinations with other nodes to try to reach the result that i want without sucess. If I remove the Color node the pulse will be white due to the color textures. There is some way to tint the result with any color?

     
  4. Acegikmo

    Acegikmo

    Joined:
    Jun 23, 2011
    Posts:
    1,294
    Recorded a little fresnel effect showcase:



    Well, multiplying by black will make things black. I'm not sure how the pulse would look otherwise. If you want it to be faintly visible, just make it near-black.
     
  5. vraziel

    vraziel

    Joined:
    May 10, 2014
    Posts:
    6
    Hello.
    Could somebody help me?
    Has Shader forge a node "RenderToTexture" or something similar?
     
  6. Amnoon

    Amnoon

    Joined:
    Jul 20, 2013
    Posts:
    31
    Yes but the problem is that near black is near invisible due to the multiply node. I wonder if there is some other method to tint the pulse without loosing the opacity if a choose a dark color.
     
  7. Acegikmo

    Acegikmo

    Joined:
    Jun 23, 2011
    Posts:
    1,294
    Not at the moment, but I am considering doing it in the future :)

    Usually when you do things like that, you either add the glowy part like this:

    base + glow * glowMask

    Or, you use the lerp node:

    [ A ] <- base
    [ B ] <- glow
    [ T ] <- glowMask
     
  8. vraziel

    vraziel

    Joined:
    May 10, 2014
    Posts:
    6
    I need to create a reflective floor and I don`t understand how i can do it without "renderToTexture" node.
    How сan I get the reflection effect using Shader Forge (without cubemap)?
    Could you give a sample?
     
  9. Eideren

    Eideren

    Joined:
    Aug 20, 2013
    Posts:
    309
    You might need to use a remap operation or a lerp like Ace said.

    You can already use Render Textures in a standard texture node, i dont really see why you would need a specific node to use them correctly.
     
  10. sundance

    sundance

    Joined:
    Mar 19, 2014
    Posts:
    52
    Hi, u can use Candella SSRR reflective system with Shader Forge, but u will need to add some code after compiling shaders..
     
  11. vraziel

    vraziel

    Joined:
    May 10, 2014
    Posts:
    6
    Hi,
    I know it. But Candella SSRR reflective system does not provide a reflection without code and if object is not on the floor I will not see reflection, but I need it.
    I need something similar like Anton1987 shader.
     
  12. sundance

    sundance

    Joined:
    Mar 19, 2014
    Posts:
    52
    Can u tell me more about Anton1987 shader?
     
  13. vraziel

    vraziel

    Joined:
    May 10, 2014
    Posts:
    6
  14. jc_lvngstn

    jc_lvngstn

    Joined:
    Jul 19, 2006
    Posts:
    1,508
    I realize I am quoting myself, but can anyone comment to the viewDirection error when hooking it up to the vertex modifier node?
     
  15. yamyoda

    yamyoda

    Joined:
    Aug 27, 2013
    Posts:
    2
    Hello :)
    i have problem with SF, Im importing FBX file from Daz3d.
    In Unity with base material(diffuse) everything is ok, but when i chagne skin to SF, something is going wrong :) and i dont know what. Any sugestion?
     

    Attached Files:

    • 01.jpg
      01.jpg
      File size:
      497 KB
      Views:
      954
    • 02.jpg
      02.jpg
      File size:
      549.5 KB
      Views:
      941
  16. Cactus_on_Fire

    Cactus_on_Fire

    Joined:
    Aug 12, 2014
    Posts:
    675
    Shader needs some work but it's definitely going the right direction. Especially the smoke rolling speed needs tweaking so it doesn't roll back due to Unity's animation curves.

    Now added soft edge blend so it creates a smooth transition where it touches other meshes instead of hard edged clipping.

     
    doraaman, Fab4 and Peter77 like this.
  17. Amnoon

    Amnoon

    Joined:
    Jul 20, 2013
    Posts:
    31
    Thanks a lot i will test it!
     
  18. Acegikmo

    Acegikmo

    Joined:
    Jun 23, 2011
    Posts:
    1,294
    That looks very nice Cactus_on_Fire!

    Also, in case you weren't there - my Unite 2014 talk is now live on the internet!

     
  19. Cactus on Fire

    Cactus on Fire

    Joined:
    Mar 4, 2014
    Posts:
    8
    Thanks man. Just watched Unite 2014, that SSR shader looks kickass, can't wait !
     
  20. Acegikmo

    Acegikmo

    Joined:
    Jun 23, 2011
    Posts:
    1,294
    It's not an SSR shader, fyi, but thanks! :)
     
  21. Cactus on Fire

    Cactus on Fire

    Joined:
    Mar 4, 2014
    Posts:
    8
    Ah, sorry. That's what happens when you watch without audio :V
     
  22. Thiago-Crawford

    Thiago-Crawford

    Joined:
    Jan 7, 2013
    Posts:
    92
    Hi, sorry if it has been asked before, but I was wondering how SF will fit into Unity 5s new workflow/lighting/shaders.

    Do you have beta access? Are you working on it? Still on standby until official Unity 5 release?

    I already own SF, great product!

    Thanks
     
  23. Acegikmo

    Acegikmo

    Joined:
    Jun 23, 2011
    Posts:
    1,294
    Unity's new PBR shaders don't affect Shader Forge much. The one thing that will happen, is that I'll make sure Unity's version of it is tightly implemented in a way, so that SF can use the same shader code, for consistency.

    Other than that, SF is till about being able to create almost any shader you want, whereas Unity's new "system" is still just a pre-defined set of shaders, just packaged in a smarter way and looks better :)

    SF will also make use of Unity 5s new systems, like the real-time GI etc, as well.
     
  24. Cactus_on_Fire

    Cactus_on_Fire

    Joined:
    Aug 12, 2014
    Posts:
    675
    It's definitely coming along. Getting the speed curves and alpha fadeout similar to a real explosion. The drawing order jumps are disturbing though. Can't do anything about it until Unity comes up with a solution on rendering transparent objects.



    Any feedbacks, critics ?
     
  25. topsekret

    topsekret

    Joined:
    Apr 18, 2013
    Posts:
    69
    How can I temporarily disable ShaderForge's custom shader inspector? I need to access the "Show All" button that Unity provides to compile my shaders for all graphics APIs, but the ShaderForge inspector does not expose this. It seems all the source code is in dlls...

    EDIT: So it seems if I delete the dll, I can access the default inspector, though it would be nice if there was a more elegant way.
     
    Last edited: Aug 27, 2014
  26. OnePxl

    OnePxl

    Joined:
    Aug 6, 2012
    Posts:
    307
    Nope, that looks fantastic to me!
     
  27. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    Apart from concussive and debris effects it looks super!
     
  28. Bluntie

    Bluntie

    Joined:
    Jun 11, 2013
    Posts:
    10
    It's in the right direction, sure and thanks! But I'd like the snow/grass to not depend on the UV's of the model and instead point straight up always, so I can turn the model in any direction, but still have the snow on top. If that makes any sense?

    The full shader I'm doing is worldspace dependent, so texel density stays consistent across models. I'm gonna try mixing that into the things you point out, there's some new methods here I've not used before, so maybe I'll get lucky. :)
     
  29. Cactus on Fire

    Cactus on Fire

    Joined:
    Mar 4, 2014
    Posts:
    8
    Not sure if this is what you're asking but I made a simple shader that renders the top and bottom of a mesh with different textures, independant to the objects orientation . Made a few sliders where you can adjust the material blend level and blend treshold. Like the grass in this example will blend in between the rock cavities and spread instead of simply fade off like a gradient map.

    Download it here :
    http://www.mediafire.com/download/kbb7cvaklaabvl6/Top Down Simple.unitypackage


     
    Last edited: Aug 28, 2014
    NapalmRain, Bluntie and red2blue like this.
  30. Cactus on Fire

    Cactus on Fire

    Joined:
    Mar 4, 2014
    Posts:
    8
  31. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    Well explosions create a massive compression of air pressure (as least if hugely explosive and not a bunch of gas lighting up) which could have a really interesting visual effect, not necessarily the typical refractive effect, although very quick subtle effects like that could look great, but also dust or air particles being affected could add to it. Debris would relate to explosions typically fraying their environment, it's typically an effect left to particle systems but i was wondering how something in Shaderforge might look, with the extra control in appearance to hand

    This is just me going on though really, I think your effect looks excellent
     
  32. Bluntie

    Bluntie

    Joined:
    Jun 11, 2013
    Posts:
    10
    Maaan, that is exactly what I meant. Thank you so much. I should be able to take it from here. :D
     
  33. Bluntie

    Bluntie

    Joined:
    Jun 11, 2013
    Posts:
    10
    A very simple question, I hope: How would I go about altering the intensity of a normal map? I'm trying to blend two together using the Normal Blend node, but would like to be able to alter the intensities of them to get a prettier result.
     
  34. layola

    layola

    Joined:
    Aug 6, 2013
    Posts:
    94
    what's is udk 's lightvector in shaderforge?
    I follow this step seem wrong.
    20140830145055.jpg sf_test2_8302014.png
     
  35. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,083
  36. layola

    layola

    Joined:
    Aug 6, 2013
    Posts:
    94
    testxxx.jpg
    and the result is not right?
     
  37. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,083
    You replaced the light direction node, not the vector 3 node.
     
  38. layola

    layola

    Joined:
    Aug 6, 2013
    Posts:
    94
    yes ,I have replace (light dir) to (view dir) from your guide.
    but still not work?
     
  39. OnePxl

    OnePxl

    Joined:
    Aug 6, 2012
    Posts:
    307
    You should have replaced the Vector3 node with a view direction node, not the light direction node. That's what he said.
     
  40. Eideren

    Eideren

    Joined:
    Aug 20, 2013
    Posts:
    309
    Does anyone know how i could smooth a vector 1 from a texture channel ? Or any other input actually ? I dont think it is possible to do so but i dont know that much about shaders either.

    Lerp between your normal and a Vector3[0, 0, 1], the blue color tells to the engine that the surface is flat.
     
  41. jc_lvngstn

    jc_lvngstn

    Joined:
    Jul 19, 2006
    Posts:
    1,508
    Anyone know what the Btm parameter is in the Channel Blend node, in Layered mode?
     
  42. Eideren

    Eideren

    Joined:
    Aug 20, 2013
    Posts:
    309
    It blends the 0 to 1 of your mask with the Btm input from fully visible(0) to invisible(1).
     
  43. jc_lvngstn

    jc_lvngstn

    Joined:
    Jul 19, 2006
    Posts:
    1,508
    Thank you, Eideren. I'm a little confused on how to use this, for a terrain shader. From what I understand, the Layered mode is supposed to be useful specifically for splat shaders.

    I'm trying to make an 8 texture terrain shader. Unfortunately, it is not blending right. I don't even know if I am setting this up correctly. None of the green from the second splat is showing up in the final result.
    Could anyone take a peek and offer some advice?
    Thank!
     

    Attached Files:

  44. Cactus_on_Fire

    Cactus_on_Fire

    Joined:
    Aug 12, 2014
    Posts:
    675
    It definitely needs some sparks and smokes to get the full effect. I'm working on something little to get the spark effect without using particles.



     
    Baldinoboy and Acegikmo like this.
  45. Bluntie

    Bluntie

    Joined:
    Jun 11, 2013
    Posts:
    10
    Thanks muchly!
     
  46. rorakin3

    rorakin3

    Joined:
    Jan 2, 2013
    Posts:
    464
    Hey, anyone use shader forge with UGUI? I ran into an issue where alpha clipping shader created from SF doesn't work with render order, but alpha does work.

    I was wondering before I submit a bug report, is this something that should be fixed on Unity's side or SF's side?

    Another question, is there a performance impact to using alpha over alpha clip in UGUI?
     
  47. Kirbyrawr

    Kirbyrawr

    Joined:
    Jul 23, 2012
    Posts:
    945
    You are using sf shader with text? because then you will need to use stencil buffer.
     
  48. rorakin3

    rorakin3

    Joined:
    Jan 2, 2013
    Posts:
    464
    Nah just images
     
  49. vitaly2

    vitaly2

    Joined:
    Apr 3, 2013
    Posts:
    4
    Hi guy! I was just wondering if there's been any progress in the "grayscale height map to Normal map node"?

    I'm basically trying to use video files as textures and since Unity won't convert a video to a normal map I need something that will convert it in the shader.
     
  50. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,083
    That's going to be awful, performance wise, you know? Unity's movie texture support is a nightmare.