Home Unity Store

[RELEASE] Shader Forge - A node-based shader editor for Unity

1235721

Replies

  • Acegikmo
    Alpha 0.05 is now out! Changelog:

    • You can now name properties (Textures, Cubemaps and Sliders)
    • Switched line drawing method again, now much faster to render and looks better (Thanks Texel for the tip!)
    • Increased detail level of the splines
    • Splines in progress of creation now use the correct spline type
    • Added a checkbox to enable/disable auto-compile
    • Slightly optimized double-sided shaders
    • New nodes are now highlighted
    • Added node: Clamp 0-1
    • Added node: Abs
    • Added node: Ceil
    • Added node: Round
    • Added node: Floor
    • Added node: Normalize
  • Acegikmo
    Alpha 0.06 is nearing! For this update, I've added 13 new nodes:

    progress_a006_constants_trig.jpg
  • almighty_gir
    Offline / Send Message
    almighty_gir ngon master
    is it possible to group these by function type?

    for example when i right click could i see:
    math - dot,arcos,arcsin,arctan,sqrt.
    constants - vector1, vector2, vector3, vector4, pi, tau, e.

    etc.
  • Drew++
    Offline / Send Message
    Drew++ polycounter lvl 14
    Acegikmo wrote: »
    Alpha 0.06 is nearing! For this update, I've added 13 new nodes:

    progress_a006_constants_trig.jpg

    That seems like a bunch of extra nodes that might get in the way or clutter the list up. Is there any way just have a node called "constant" where you can type something like pi, e, t, or phi? Or even a drop down list. Just a thought! :D
  • Acegikmo
    Categories are planned to sort those nodes a bit :)
    I've also thought about allowing users to sort/exclude/favorite nodes themselves
  • Drew++
    Offline / Send Message
    Drew++ polycounter lvl 14
    Acegikmo wrote: »
    Categories are planned to sort those nodes a bit :)
    I've also thought about allowing users to sort/exclude/favorite nodes themselves

    Aw yeah :D
  • keffer
    where can I sign up for this alpha, cause this is awesome
  • ghostdom
    Offline / Send Message
    ghostdom polycounter lvl 3
    Realy great tool. I would like to sign up for this alpha too. How can I do it?
  • Acegikmo
    A little experiment; what do you think of having the Vector 1 nodes be simply values instead of a colored box?
    And what do you think of a smaller Vector 2/3/4 constant size?

    SmallConstants.jpg
    keffer wrote: »
    where can I sign up for this alpha, cause this is awesome

    Thanks! Finding it is trivial, you should be able to do that.
  • Serial Lens
    Acegikmo wrote: »
    A little experiment; what do you think of having the Vector 1 nodes be simply values instead of a colored box?
    And what do you think of a smaller Vector 2/3/4 constant size?

    SmallConstants.jpg

    Personally I like having the visual feedback for vector 1s, because it reminds me that .5 in linear space is not 50% grey on a monitor. That's just me though :P
  • Zugzug
    Offline / Send Message
    Zugzug polycounter lvl 5
    Here is my first random shader that I just put together. Can't wait to add Fresnel to it, oh by the way, texture panning doesn't seem to work in unity play mode
    TestShader.jpg
  • Acegikmo
    Color pickers are now implemented in 0.06 :)
    0.06 should be ready within the hour!

    progress_a006_colorpicker_vectors.jpg
  • Acegikmo
    Alpha 0.06 is now out! Here's a changelog:

    progress_a006_changelog.jpg
  • Zugzug
    Offline / Send Message
    Zugzug polycounter lvl 5
    Just added cos to the time node yesterday to get a cool panning to go up and down, however when I reload the shader in the editor, the cos breaks off the append node.
    shader-cos-time.PNG
  • Zugzug
    Offline / Send Message
    Zugzug polycounter lvl 5
    And here is an update on the blue panning shader.
    TestShader2.JPG
  • 3Dplayer
    this looks extremely powerful, can't wait to give it a go!
  • Acegikmo
    The dynamic nature of the append and component mask nodes is what complicates it when it reloads and reconnects all the nodes. I'll look into it :)

    As for what's coming in 0.07 - I'm currently looking at implementing support for multiple lights, which is almost done! I just need to add settings to enable/disable it
  • Zugzug
    Offline / Send Message
    Zugzug polycounter lvl 5
    Awesome, cant wait for 0.07 to play with!
  • solarnoise
    Offline / Send Message
    solarnoise polycounter lvl 3
    I may be in the minority here, but I vastly prefer "value" to stay as "vector1", or even better, "constant" with a box showing black-to-white depending on the value.

    This would be consistent with UDK's shader editor which, in my opinion, is the standard all shader node editors should aspire to!

    In my opinion, ShaderForge actually has the potential to be better and more usable than UDK, because of the little things like node snapping and the neat visual icons for the nodes. Keeping a "constant" node with a color box (and color picker? even better) would help round out the package that much more.
  • Acegikmo
    The reason I changed it from a box to a value is that it's a lot of space for very little information, especially when the values are outside the 0-1 range, which is often the case with Vector 1 specifically. I tried making a bunch of shaders, and noticed lots of pure white boxes, providing very little information as for what they actually represented. Sure, values in the 0-1 range do provide data, but the majority of Vector 1 nodes (At least in my case) were outside that range.

    For example, a Lerp between two constants is easier to get an overview of with two large numbers rather than having two white boxes with small numbers underneath.

    And yes, I strive to surpass UDKs material editor in usability, but I'm of course heavily inspired by it as well :)
  • Kolgrima
    Offline / Send Message
    Kolgrima polycounter lvl 7
    Zugzug wrote: »
    Here is my first random shader that I just put together. Can't wait to add Fresnel to it, oh by the way, texture panning doesn't seem to work in unity play mode

    Just in case anyone wants to create a Fresnel in Shaderforge here is how

    Simple Fresnel
    SF_Fresnel.png

    Fresnel using normals from a normal map
    SF_Fresnel_normTex.png

    Cheers
  • almighty_gir
    Offline / Send Message
    almighty_gir ngon master
    hmmm....

    interesting that simply putting the normals into the normalmap channel doesn't do the same thing.
  • Acegikmo
    hmmm....

    interesting that simply putting the normals into the normalmap channel doesn't do the same thing.

    Well, putting the normals into the normal map shader input would be the correct way of doing it :)

    NormalFresnel.jpg
  • almighty_gir
    Offline / Send Message
    almighty_gir ngon master
    that's what i thought! :P
  • almighty_gir
    Offline / Send Message
    almighty_gir ngon master
    btw, excuse my ignorance in this, but why is there no Light Dir. node?
  • Acegikmo
    Well, two reasons!
    1. It's still in Alpha, other features currently have priority
    2. Light Dir, or custom lighting in general, is arguably one of the most complex features, because it's involved in all the light passes. There is no "one" light direction, because there are usually multiple lights affecting an object.
  • RealArt
    what date this finish and realse?
    i cant wait

    That's Includes importent plending like photoshop overlay,Lighting,screen, ...?

    That's have Tools Like InstanceMatrial (UDK)?
    of curse this importent for nodBasedShaderEditor
  • Acegikmo
    RealArt wrote: »
    what date this finish and realse?
    i cant wait

    That's Includes importent plending like photoshop overlay,Lighting,screen, ...?

    That's have Tools Like InstanceMatrial (UDK)?
    of curse this importent for nodBasedShaderEditor

    A Photoshop style blending node is planned!
    And yes, there are material instances. It's mostly a terminology thing:

    Unity "Shader" = UDK "Material"
    Unity "Material" = UDK "Material Instance"

    The biggest difference is that you can't apply shaders directly to objects, you need a material in order to do so.
  • Kolgrima
    Offline / Send Message
    Kolgrima polycounter lvl 7
    Acegikmo wrote: »
    Well, putting the normals into the normal map shader input would be the correct way of doing it :)

    NormalFresnel.jpg

    Right just looked at the actual shader code I wasn't thinking that the Normal dir was the end result... was thinking it was just mul(WorldInverseTranspose, In.normal) and that I had to add the normals my self:poly136:
  • Acegikmo
    So I spent quite a bunch of time yesterday looking at lighting, and it seems to work pretty well now!
    0.07 should be ready in a few hours :)

    progress_a007_multilight_customlight.jpg
  • almighty_gir
  • glynnsmith
    Offline / Send Message
    glynnsmith polycounter lvl 17
    Have had a fiddle around in Shader Forge and am really liking it :) Thanks for opening up the alpha to users. Awesome of you.

    I've a question that I can't find the answer to in this thread, the Unity thread or in v0.6's example shaders, if you don't mind.

    The matcap shader has one of your note arrows drawn over the title of a node, and I just can't seem to find it in the plugin. It's the one that combines the UVs and the normal direction, and plugs into the Texture 2D's UV input.
    progress_day20_matcap.jpg

    Which node is that?

    Thanks again. Keep up the ace work.

    EDIT: Follow up question to keep you on your toes - Is v0.6 the most recent alpha release? I've seen mention of a v0.7. Cheers!
  • Fishypants
    Offline / Send Message
    Fishypants polycounter lvl 18
    This looks fantastic!
  • almighty_gir
    Offline / Send Message
    almighty_gir ngon master
    looks like append?
  • glynnsmith
    Offline / Send Message
    glynnsmith polycounter lvl 17
    looks like append?

    Doesn't seem to be. It looks like there's only 3 or 4 letters in the node title, and I've tried all the ones I can find - None of which seemed to want to plug into the UV input of the Texture 2D node, either.

    Thanks though, man!
  • Acegikmo
    glynnsmith wrote: »
    Which node is that?

    It's an Add node :)
    Like it says, it remaps [-1, 1] to [0,1], so it multiplies by 0.5 and then adds 0.5.
    glynnsmith wrote: »
    EDIT: Follow up question to keep you on your toes - Is v0.6 the most recent alpha release? I've seen mention of a v0.7. Cheers!

    0.06b is the latest, 0.07 is coming very soon :)
  • robert.briscoe
    Offline / Send Message
    robert.briscoe polycounter lvl 8
    Acegikmo wrote: »
    So I spent quite a bunch of time yesterday looking at lighting, and it seems to work pretty well now!
    0.07 should be ready in a few hours :)

    progress_a007_multilight_customlight.jpg

    can you explain a bit more about what's going on in this picture? Is it custom lighting?
  • Acegikmo
    can you explain a bit more about what's going on in this picture? Is it custom lighting?

    It is!
    It's a custom lambert + Blinn-Phong specular shader with a normal map and a diffuse color :)
    This is pretty much what it does internally when you have Blinn-Phong on.

    dot(L,N) is the Diffuse term
    dot(N,H) is the Specular term, which has a power to make the glare smaller :)

    The diffuse is multiplied by a color, which could be replaced with a simple diffuse texture if you like.

    The specular and the diffuse term are then added together.

    After that, the shader has not accounted for light falloff, as the only lighting information it has has previously, is the Light direction and the Half direction, but directions aren't enough.

    Light attenuation is essentially the falloff multiplier, as well as any shadows being cast on the object. So if there are shadows on the current pixel/fragment, Light Attenuation is 0. It also handles the light distance falloff.

    So we multiply all of it by Light Attenuation.

    At this point, we don't have any light color information, just where the light is coming from, how attenuated it is, and if it's currently in a shadow.
    So we multiply by the light color, and that's it! :)
  • glynnsmith
    Offline / Send Message
    glynnsmith polycounter lvl 17
    Acegikmo wrote: »
    It's an Add node :)
    Like it says, it remaps [-1, 1] to [0,1], so it multiplies by 0.5 and then adds 0.5.

    Thanks for that. Seems there's a bug with my install of Shader Forge. I'll report it here, but if you'd prefer me to submit it elsewhere, or with system info, let me know.

    I'd tried using the Add node to plug into the UV input of the 2D texture node, but it wasn't letting me. I'd drag it, but the connection line would disappear.

    Then I got the idea of using a UV Co-ord node, which plugged in. Then I plugged the UV Co-ord into my Add node, which also worked. Then I plugged my original shader tree back into the Add node and it all worked.

    TL;DR - I had to plug in a UV Co-ord node into the UV input of the 2D Texture node in order for it to let me input anything else in my shader tree.
    Acegikmo wrote: »
    0.06b is the latest, 0.07 is coming very soon :)

    Excellent :) Can't wait!
  • almighty_gir
    Offline / Send Message
    almighty_gir ngon master
    just be sure to normalize yo vectors before using them :P
  • Acegikmo
    Alpha 0.07 is now out!

    progress_a007_update.jpg

    @glynnsmith: The issue is that SF currently doesn't have many warnings or error handling at all! In this case, the UV input *requires* the input to be a Vector2, which the UV coord node is by default, which the Add node isn't, by default. You need to make sure the Add node outputs a Vector2 before connecting it to a Vector2 input :)
    It's on the todo list to make this smoother
  • Ehsan Gamer
    Offline / Send Message
    Ehsan Gamer polycounter lvl 6
    Hi. Very Nice job.

    I have problem with node moving !

    I can move any node except Texture2D node ! when I try to move Tex2D node whole scene moves.

    Drag move more than one node would be so nice.

    Also it would be nice to be able too rename the shader in left property window.

    Edit :

    I found that using shaders created by shader forge I can't see the wireframe of the selected object
  • Acegikmo
    Odd!
    Wireframe works fine for me, and I can drag all nodes efforlessly. Which platform are you on, which version of Unity are you running, and which version of Shader Forge?
  • Ehsan Gamer
    Offline / Send Message
    Ehsan Gamer polycounter lvl 6
    I'm using 0.07 I don't have problem with 0.06b (for node moving).

    I'm using Unity 4.1.2f1 for windows

    I get lots of errors :

    missing method "GetObjectPickerObject"

    Oh I found one more thing

    I have multiplied a vector 2 node into a UV and then connected to the UV of the tex2D and gave 2,2 to it.

    up to this point every thing looks OK but after I close the editor and open again I get 2,0 ! and If I do the same thing again I get 0,0. It resets my value.
  • Acegikmo
    Looks like the EditorGUIUtility.GetObjectPickerObject isn't exposed in Unity versions prior to 4.2, I'll try and get that fixed!

    Your shader only saves when it compiles, so if you're unsure if it's saved or not, press the compile button at the top :)
  • robert.briscoe
    Offline / Send Message
    robert.briscoe polycounter lvl 8
    I have the same issue as Ehsan with the Texture2D node, if I grab it and try to move it fast, it's like the mouse cursor loses focus and clicks the background instead. Im using Unity Free, latest Version.

    Quick Question: I'm trying to re-create a simple custom lighting model as I have done previously in UDK:

    9f6BTfD.jpg

    However I'm unable to reproduce it properly in shaderforge. I don't really know what to do with the 'Half Dir' part of the shader. Can you explain how I would reproduce this in SF?

    Finally, although I'm really impressed with what i've seen so far, I really think you need to concentrate a bit on the UI in the next release. Right now it's getting really very clunky and frustrating to use. I highly recommend addressing/fixing the following:

    1. Consistent interaction - (Click and Drag for the right hand Shader node list!)
    2. Link Highlighting on mouse over connection sockets & on dragging ala UDK. It makes connections easier to find & organise
    3. Zooming (mouse scroll wheel)- This is an absolute must for creating fairly complex shaders, especially when struggling for screen space!
    4. Node Naming - This is really annoying at the moment, if I accidentally click on the name instead of the node, it's hard to get it to un-highlight it,i should be able to just click the background to do so (or press enter/esc)
    5. Ability to Resize/detatch/hide UI elements - Like the preview section or the node list section
    6. Ability to "rename" shader from Shaderforge
    7. Ability to "Save As" from shader forge - So I can open an existing shader and save it under another name.
    8. Ability to "Open" other shaders from Shader Forge
    9. Ctrl-click to select multiple nodes to move around clusters more easily (Hierarchal node move is too much)
    10. Alt-click-drag to draw selection box to more easily select multiple nodes
  • Chaoss
    Hey I am very interested in this shader node editor, I am also really interested in signing up for the alpha :)
  • Ehsan Gamer
    Offline / Send Message
    Ehsan Gamer polycounter lvl 6
    11. ability to duplicate selected nodes in editor :D
  • robert.briscoe
    Offline / Send Message
    robert.briscoe polycounter lvl 8
    Yes! Copy and paste please! :)
  • glynnsmith
    Offline / Send Message
    glynnsmith polycounter lvl 17
    Acegikmo wrote: »
    Alpha 0.07 is now out!

    Aw yeah. Great work.
    Acegikmo wrote: »
    @glynnsmith: The issue is that SF currently doesn't have many warnings or error handling at all! In this case, the UV input *requires* the input to be a Vector2, which the UV coord node is by default, which the Add node isn't, by default. You need to make sure the Add node outputs a Vector2 before connecting it to a Vector2 input :)
    It's on the todo list to make this smoother
    The strange thing with this was that my node tree was exactly the same after I'd plugged the UV Coord node in, but only seemed to work once the UV Coord was swapped out with the rest of the my shader tree.
    I highly recommend addressing/fixing the following:

    1. Consistent interaction - (Click and Drag for the right hand Shader node list!)
    2. Link Highlighting on mouse over connection sockets & on dragging ala UDK. It makes connections easier to find & organise
    3. Zooming (mouse scroll wheel)- This is an absolute must for creating fairly complex shaders, especially when struggling for screen space!
    4. Node Naming - This is really annoying at the moment, if I accidentally click on the name instead of the node, it's hard to get it to un-highlight it,i should be able to just click the background to do so (or press enter/esc)
    5. Ability to Resize/detatch/hide UI elements - Like the preview section or the node list section
    6. Ability to "rename" shader from Shaderforge
    7. Ability to "Save As" from shader forge - So I can open an existing shader and save it under another name.
    8. Ability to "Open" other shaders from Shader Forge
    9. Ctrl-click to select multiple nodes to move around clusters more easily (Hierarchal node move is too much)
    10. Alt-click-drag to draw selection box to more easily select multiple nodes
    11. ability to duplicate selected nodes in editor :D
    An excellent list. I'd add:
    1. Ability to select multiple nodes, either by dragging a box, or ctrl+LMB clicking.
    2. Node grouping with group labelling.
    3. Being able to remove node connections with RMB (Possibly) on the node you want to remove connections from. Right now, the quickest way is going into the RMB menu, making an Add node, attaching that and then deleting it to free up the node connection.
    4. Echoing the node-naming! Sometimes I have to close the SF window, and reopen it, just to escape the evil clutches of the renaming caret ;)
    Keep up the awesome work you're putting into this.
1235721
Sign In or Register to comment.