Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Shader Forge - A visual, node-based shader editor

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

  1. Acegikmo

    Acegikmo

    Joined:
    Jun 23, 2011
    Posts:
    1,243
    We'll see if I can improve the terrain support at some point, but right now I'm in the middle of an other, bigger feature!

    Also, I promised some statistics after the sale, so here you go :)

     
  2. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    Hah! Time to treat yourself to a very nice meal
     
  3. Psychon

    Psychon

    Joined:
    Mar 11, 2014
    Posts:
    17
    Congrats Ace!
     
  4. tswalk

    tswalk

    Joined:
    Jul 27, 2013
    Posts:
    1,108
    congrats Ace... well done and deserved!

    looking forward to the future.. I hope you got in 5 beta and got upgrade plans :)
     
  5. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    5,154
    Wow, that was quite an effective deal I'd say, congrats! Please let us know how many charge-backs occur in the month after the deal.
     
  6. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,646
    Congrats. Pleased to have contributed to your success. :D
     
  7. Acegikmo

    Acegikmo

    Joined:
    Jun 23, 2011
    Posts:
    1,243
    Thanks all!
    I also have some exciting news to share now.

    Deferred lighting will be supported soon!



    (With a few limitations of course, due to how the deferred pre-pass lighting system works)
     
  8. Thomas-Pasieka

    Thomas-Pasieka

    Moderator

    Joined:
    Sep 19, 2005
    Posts:
    2,118
    Well bring it on Ace ;) Looking fancy right there. What exactly are the limitations?
     
  9. Acegikmo

    Acegikmo

    Joined:
    Jun 23, 2011
    Posts:
    1,243
    - Transmission, Light Wrapping, Custom Lighting Diffuse Power will not be available.
    - Only the Blinn-Phong specular lighting model will be available.
    - The specular highlights will only approximate their color, they won’t be 100% accurate.
    - All the inherent limitations of deferred lighting, as seen here: http://docs.unity3d.com/Documentation/Components/RenderTech-DeferredLighting.html

    There may be more, but these are the ones I can think of now :)
     
  10. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    7,163
    Will emission be supported?
     
  11. Acegikmo

    Acegikmo

    Joined:
    Jun 23, 2011
    Posts:
    1,243
    Of course
     
  12. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    7,163
    Well, that's all I need to approximate around 90% of my custom lighting effects at the moment, so that works for me
     
  13. Acegikmo

    Acegikmo

    Joined:
    Jun 23, 2011
    Posts:
    1,243
    I forgot to mention in the list above - All the nodes under the lighting category, except ambient light, will be unavailable in deferred.
     
  14. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    7,163
    Oooh... that'll make things a little trickier. I can probably just fake it with some scripts to reach a compromise though.
     
  15. Chaoss

    Chaoss

    Joined:
    Jul 8, 2011
    Posts:
    327
    I made the following dynamic sky system was made entirely in ShaderForge...


     
    Last edited: Apr 13, 2014
    ViktorCor likes this.
  16. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    That's very impressive, well done mate
     
  17. HenriqueGomez

    HenriqueGomez

    Joined:
    Dec 13, 2012
    Posts:
    63
    Anyone ?
     
  18. Acegikmo

    Acegikmo

    Joined:
    Jun 23, 2011
    Posts:
    1,243
    Split the screen pos using Component mask, then invert the Y/V channel with the One Minus node, then reassemble it using the Append node, and it might work. No guarantee though, I don't think it's that easy in this case.
     
  19. HenriqueGomez

    HenriqueGomez

    Joined:
    Dec 13, 2012
    Posts:
    63
    I'll try, thanks =)
     
  20. Aurecon_Unity

    Aurecon_Unity

    Joined:
    Jul 6, 2011
    Posts:
    241
    That is really nice looking... you should do a bit of a write up on how you achieved this!
     
  21. Aurecon_Unity

    Aurecon_Unity

    Joined:
    Jul 6, 2011
    Posts:
    241
    Hi Ace

    I'm one of the very happy customers from last weeks sale... I have a question and I apologise if it's been answered already.

    How (if at all) will Unity 5's new PBR system affect Shaderforge? I'm assuming their intention is to introduce something that will supersede the functionality of Shaderforge? It would be great if you can evolve your product to be a necessary add-on for Unity 5 in much the same way as you've done now for Unity 4.

    Anyway, great job, I've already benefited immensely from the tool in just the last week.
     
  22. Chaoss

    Chaoss

    Joined:
    Jul 8, 2011
    Posts:
    327
    I'd hold off on updating to the latest version of ShaderForge (0.32) as it ate my shader and now it won't open, it causes Shader Forge to open with a blank screen and I cannot close the window, I also get this spammed in the console

    Code (csharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. ShaderForge.SFPSC_Properties.DrawInner (UnityEngine.Rect r)
    3. ShaderForge.SFPS_Category.Draw (Single yOffset)
    4. ShaderForge.SF_PassSettings.OnLocalGUI (Int32 yOffset, Int32 in_maxWidth)
    5. ShaderForge.SF_Editor.DrawPreviewPanel (Rect r)
    6. ShaderForge.SF_Editor.OnGUI ()
    7. System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/monoAndRuntimeClassLibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
    8.  
     
    Last edited: Apr 14, 2014
  23. Docm30

    Docm30

    Joined:
    Dec 15, 2013
    Posts:
    19
    Great news that you're adding deferred rendering support. I guess the lack of light-wrapping and things explains why Unreal Engine renders skin on characters in forward rendering.
     
  24. Guideborn

    Guideborn

    Joined:
    Jun 15, 2013
    Posts:
    228
    Anyone know how to handle rimlights in Shader Forge? I found the Fresnel node, but no matter how or where I connect it, I cannot achieve a rimlight! Any help would be nice!
     
    Last edited: Apr 14, 2014
  25. Acegikmo

    Acegikmo

    Joined:
    Jun 23, 2011
    Posts:
    1,243
    Glad you like it and found it useful :)

    Unity's upcoming PBR "system" is a shader, not a shader editor, so it's by no means something that can supersede the functionality of SF. It is however a more flexible shader, where you can toggle features on and off.
    It will affect SF in the way that I will most likely make the current PBL solution in SF work exactly the same as the PBL solution that Unity 5 is using, when it's out :)


    Connect it to emission
     
  26. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    7,163
    I seem to recall the append node getting the ability to take more than two inputs being announced a while ago. Is that still going to be a thing? Also, I'm still having trouble with this:

    But on top of this, I have another problem I can't get around.

    From angles like this or higher, my water looks pretty alright:



    But as the angle gets lower, it gets all kind of difficult to read:



    Is there a way I can plug a view angle thing in there to make the aliasing less severe? The only fix seems to be to use image based AA, but that's a pro feature and only really a partial solution.
     
  27. Deleted User

    Deleted User

    Guest

    I've created a basic shader with 4 detail textures mapped with an RGBA splatmap texture via the Channel Blend and Append nodes. Now I'm wondering how I can split 4 specular map textures using the same splatmap texture. I tried setting it up the same way, but it seems that the Main Specular node can't be connected to an RGBA Channel Blend node without errors because it wants a different sized vector. Any idea how I can accomplish this?
     
  28. Beardbotnik

    Beardbotnik

    Joined:
    Jul 27, 2013
    Posts:
    49
    Would that be more do to the filtering of the texture? Mess with the Filtering and MipMap bias of the actual texture and see if you have the same problems.

    Otherwise you could probably fade out the white details based on distance, if you adjusted it to fade from white to blue to invisible would probably look pretty nice for those details.
     
  29. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    7,163
    The texture is trilinear but changing it to anything else does nothing at all, honestly.
     
  30. Acegikmo

    Acegikmo

    Joined:
    Jun 23, 2011
    Posts:
    1,243
    What connection are you trying to make? Could you take a screenshot?
     
  31. Guideborn

    Guideborn

    Joined:
    Jun 15, 2013
    Posts:
    228
    Thanks! That did the trick!


    I have one more question. I wanted my 2D Texture to NOT receive any light (I don't like Diffuse). I originally had my texture node connected to Emission to give that "unlit" texture, but since I have to use Emission for Fresnel, I cannot use them both. I used the Multiply node to connected them both, but it isn't working.

    Edit: I figured it out...a little. Just plug it into Custom Lighting. But it's not what I needed. I still want the texture to receive lighting, but I don't want a Diffuse shader. Sorry if I'm not making sense!
     
    Last edited: Apr 15, 2014
  32. Deleted User

    Deleted User

    Guest

    Turns out the problem was due to an unrelated issue. I had too many tex samplers, so a bunch of errors were thrown when the shader was compiled.
     
  33. anadin

    anadin

    Joined:
    Oct 28, 2005
    Posts:
    97
    Its more likely to be anisotropy - crank it up to 9 for those textures.
     
  34. nukeD

    nukeD

    Joined:
    Feb 12, 2009
    Posts:
    406
    Amazing!
    Do you have a video of it in action?
     
  35. Acegikmo

    Acegikmo

    Joined:
    Jun 23, 2011
    Posts:
    1,243
    You can plug in both the fresnel and the texture into emission, you just need to combine them first.

    You tried to use Multiply, which will in almost all cases darken textures if it uses values between 0 and 1, which textures and the fresnel node do.

    You'll want to use the add node, that way the texture's color will remain as strong, and the fresnel will be added on top of it as if it's glowing.
     
    Last edited: Apr 15, 2014
  36. Deathnote

    Deathnote

    Joined:
    Nov 26, 2013
    Posts:
    52
  37. copenhagenjazz

    copenhagenjazz

    Joined:
    Oct 2, 2005
    Posts:
    45
    Hi Joakim

    Great tool! Very happy with Shader Forge!

    However can you tell me if its possible to detect an objects rotation on the Y-axis?

    What I am trying to do is to blend between two textures based on the rotation of the object on the Y-axis. I am working on a topdown game and would like my decal planes to blend between two UV setups based on the planes y-rotation.

    I have tried using the object postion node in conjunction with a lerp between the two textures but it doesnt really work at all.

    Any pointers as to what I could do?

    Thanks :)

    EDIT;

    Here is a screengrab;

    $sf_decal_worldcoordinates_a.jpg

    I hope this explains it a bit better :) Trying to make a clever decal setup where I can just scale and stretch my decal planes but with the tiling controlled by world coordinates so everything is nice and seamless.
     
    Last edited: Apr 15, 2014
  38. CTPEJIOK22

    CTPEJIOK22

    Joined:
    Sep 4, 2013
    Posts:
    80
    $sh01.jpg
    $sh02.jpg

    hi! can anyone help with toon shader? i want to make selective shadow color, it works, but i cant select too different colors - main color affect shadow color too. thanks!
     
  39. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,397
    I am finishing up a leaf shader and it looks great. I want to have a slider that lowers the strength of the shadows on the leaves. Like tree creator trees. I used ambient lighting but the leaves look lit up at night. Thanks
     
  40. JoshuaK

    JoshuaK

    Joined:
    Oct 11, 2012
    Posts:
    6
  41. Guideborn

    Guideborn

    Joined:
    Jun 15, 2013
    Posts:
    228
    That worked. Unfortunately, the material is still unable to receive light in the engine as if it were an Unlit Shader, even though I am no longer using the Unlit/Custom Lighting setting.
     
  42. Acegikmo

    Acegikmo

    Joined:
    Jun 23, 2011
    Posts:
    1,243
    In that case, I'm not sure what you're trying to achieve.
    If you want parts of the shader to receive shadowing, connect it to diffuse.
    If you want parts of the shader to emit light, connect it to emission.
     
  43. Guideborn

    Guideborn

    Joined:
    Jun 15, 2013
    Posts:
    228
    I figured it out! Sorry for all the trouble. In case I need to change things later, how do I remove a tether from a node?
     
  44. Acegikmo

    Acegikmo

    Joined:
    Jun 23, 2011
    Posts:
    1,243
    Alt+RMB drag in empty space to cut lines
    Backspace while hovering a connector, or alt+RMB click, to disconnect it
     
  45. Guideborn

    Guideborn

    Joined:
    Jun 15, 2013
    Posts:
    228
    Fantastic. I really love the fast support you deliver.
     
  46. Deleted User

    Deleted User

    Guest

    What is the simplest way to integrate triplanar blending in a 4-texture shader such as this?

    http://i.imgur.com/b0t4LPR.png

    Do I have to create 3 Texture 2Ds for each of the 4 textures?
     
    Last edited by a moderator: Apr 16, 2014
  47. anoon

    anoon

    Joined:
    Aug 8, 2012
    Posts:
    9
    Major Problem: Did a project in Shader Forge Beta 0.2x, then upgraded to the latest in order to use the Experimental Shader 2.0 emulation feature. In doing so, I had to upgrade Unity to 4.3.

    Now my project's animations are broken beyond repair due to the animation system bug introduced with Unity 4.3. (They refuse to fix the bug)

    So I need to go back to my Unity 4.2 install, but now my updated Shader Forge won't run.

    Is there a way I can get a downgrade of Shader Forge so I can finish this project?

    Thanks
     
  48. CTPEJIOK22

    CTPEJIOK22

    Joined:
    Sep 4, 2013
    Posts:
    80
  49. Deathnote

    Deathnote

    Joined:
    Nov 26, 2013
    Posts:
    52
  50. Acegikmo

    Acegikmo

    Joined:
    Jun 23, 2011
    Posts:
    1,243
    Not sure what you're trying to to, you'll have to elaborate further if you want someone to help out.
    Integrate how?
    4-texture shader - how does it work, and how do you want it to use triplanar blending?

    You should be using version control for your project :)
    I'll send you a PM.

    Please don't repost the same message over and over. There are a lot of things I have to finish and work out with Shader Forge now.
    I think I've answered this about 8 times now. I'll release the RT area lights at some point, but it's not yet.
     
unityunity