Home Unity Store

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

13456721
Hello!
I've been working on a shader editor for a couple of weeks now, which is starting to shape up quite neatly :)
The goal with Shader Forge is to provide an intuitive and visual way of creating shaders in the Unity engine, just like the Material Editor in UDK.


Shader Forge is now finally live on the Unity asset store!

Here's a list of all nodes

Since most of you are artists here - What features would you like to see in this editor?
And if you've used a shader/material editor before, what did you like/dislike about them, that Shader Forge can do better?

I'd love to hear any feature requests you might have to make this as nice as possible for you all :)

Also, Twitter, if you're into that stuff.

Click here for a feature/node/todo list!

Alpha/Beta signups are now closed!
This is due to having a ton of testers, and the fact that SF is hitting beta very soon!
I will put up SF on the asset store when it's in the beta, during which you'll be able to get a license for a cheaper price than the full $100 at release. Exciting times :D

Anyhow, here's how it currently looks (and works):

shaderforge_tessellation.gifshaderforge_vertexanim.gifshaderforge_dissolve.gifshaderforge_doublesided.gif

progress_day13_emission.jpg

progress_a007_multilight_customlight.jpg

progress_day10_smallfixes_append.jpg

progress_day16_alphaclip.jpg

progress_day19_cubemaps_vnr_vectors.jpg

progress_day19_cubemaps_transmission_doublesidedlight.jpg

progress_day15_time_browser_filter.jpg

progress_day11_normalqu_comp_instr.jpg

progress_day11_blendmode.jpg

Replies

  • DInusty
    Offline / Send Message
    DInusty polycounter lvl 17
    Hey this is awesome!

    I've been looking for another option to the other node based editors for unity. the one thing that no one has right now is nodes that you can plugin a lighting model. specifically nodes that use the recently exposed params of skyshops pretty IBL :)

    Do that and I would flip out!
  • Peris
    Offline / Send Message
    Peris polycounter lvl 17
    thats awesome!! Would love to see some easy ways to blend normal maps, that's something I always find tricky to set up with node based editors
  • Peris
    Offline / Send Message
    Peris polycounter lvl 17
    Another useful node would be a simple multiply x 2 node. I always find myself setting up a lot of these when tinting materials or doing overlays
  • Acegikmo
    IBL shouldn't be very tricky to set up :) I'll be sure to have an example shader with that once it's done!

    Normal map blending is super common, so yes, there should be a node for that! A multiply by two node could be useful as well, or just a smaller version of a vector/float/value, so the 2 doesn't take up as much space (As it's pretty much always just a solid color anyhow)
  • Visceral
    Hi Ace, i know we talked a bit about features, and i got a little bit of a list of them.

    Just recently i have had issues setting up panning textures using strumpy, how does UV manipulation work at the moment? Do you have access to panners and rotators without having an external script running?
    Would also see materials accessing the light vector like in your example.

    Good luck mate!
  • skankerzero
    put me on your testing list.

    Unity needs this officially.
  • EmAr
    Offline / Send Message
    EmAr polycounter lvl 18
    Looking great! DirectX 11 tessellation/displacement would be great, I hope it's in your list :)

    Another suggestion is color coding the connection curves. It can sometimes get crazy with all same kind of lines going everywhere. Vector/scalar values could have colors applied according to their number of components etc. Maybe texture connections could have another color etc. It would make it easier to trace back your network when you make mistakes.
  • Ace-Angel
    Offline / Send Message
    Ace-Angel polycounter lvl 12
    Bloody amazing job mate!

    Do you mind telling if we would be able to have access to the Light Vector node? From what I gathered, Unity, due to it's renderer issues with the old Strumpy Editor couldn't 'allow' the Light Code to be exposed, and had to be written manually by hand if you wanted it, will this editor have the same issues, or did you find a magic solution to it?

    Also, what ways do you plan on implement to keep the material clean? UDK for example allows reference group nodes, there are some other applications which allow for you to 'collapse' stacks of nodes into small group/folder like node, to keep things from getting messy, any plans for such features?

    Any plans to implement a Code node a la UDK that is just as simple to use? Or will people need to learn Unity-related-clean-code to implement their own shader specific code (Eulars, ATan, etc)?

    Lastly, is it going to be open-source/free or will there be an entry fee on it?

    Still, this is bloody great! Subscribed to thread.
  • thatanimator
    Offline / Send Message
    thatanimator polycounter lvl 6
  • Lee3dee
    Offline / Send Message
    Lee3dee polycounter lvl 18
    This is exactly what the Unity community needs! We were using the strumpy shader for some complex shader needs but we encountered issues in the shader code, we encountered lots of errors.

    Nice to haves:

    * Panner node with either the x or Y input shown, so you can scroll the UV in either direction, with a time node. Also the ability to add a constant or range node to control the speed.
    * Ability to export the shader to a file. with the option to choose whether its dx9, dx11, or mobile
    * tessellation option for dx11, range slider input to control the tessellation.
    * support for additive materials for particles or other particle materials

    if your looking for testers, I'd be happy to help :)
  • seforin
    Offline / Send Message
    seforin polycounter lvl 17
    Please add me for the testing as well. I will work with my team at work and provide you some great user feedback!
    (I have a team of 20 I am currently in the process of Hiring for. So this will be great on our project :) )
  • Acegikmo
    Visceral wrote: »
    Just recently i have had issues setting up panning textures using strumpy, how does UV manipulation work at the moment? Do you have access to panners and rotators without having an external script running?
    Would also see materials accessing the light vector like in your example

    There will be a panner node! However, you can do it "manually" as well :)

    (There's no time node yet, but there will be)

    PanningUVs.jpg

    Light vector is planned too!
  • Acegikmo
    Ace-Angel wrote: »
    Bloody amazing job mate!
    Do you mind telling if we would be able to have access to the Light Vector node? From what I gathered, Unity, due to it's renderer issues with the old Strumpy Editor couldn't 'allow' the Light Code to be exposed, and had to be written manually by hand if you wanted it, will this editor have the same issues, or did you find a magic solution to it?
    Strumpy writes surface shaders, which are usually lit internally. Shader Forge will write vert/fragment shaders, which has all of the lighting data exposed :)
    Ace-Angel wrote: »
    Also, what ways do you plan on implement to keep the material clean? UDK for example allows reference group nodes, there are some other applications which allow for you to 'collapse' stacks of nodes into small group/folder like node, to keep things from getting messy, any plans for such features?
    I've planned to add support for grouping nodes into a single node. It's a bit of a low prio though, but definitely something I'm considering!
    Ace-Angel wrote: »
    Any plans to implement a Code node a la UDK that is just as simple to use?
    Yes :)
    Ace-Angel wrote: »
    Lastly, is it going to be open-source/free or will there be an entry fee on it?
    It will not be free, as I'm going to invest a lot of my own money into this. I'll do everything I can to make sure it's worth paying for though!
    Ace-Angel wrote: »
    Still, this is bloody great! Subscribed to thread.
    Awesome!
    Everyone wrote:
    Tesselation
    I guess I'll have to implement that too then
  • bugo
    Offline / Send Message
    bugo polycounter lvl 17
    PLEASE, make support for mobile, it's definitely needed, even if you limit the nodes or something. I think it's super important to have something for mobile, specially that most unity users are doing stuff for those platforms.

    Great job btw. I would totally pay a good amount of money if you support mobile and get it to show clean code after the fact.
  • ThriKreen
    An instruction count somewhere would be nice, and maybe allow someone to set a warning threshold for the project, so the text gets highlighted in red to warn the artist they're making a really expensive one?
  • Acegikmo
    bugo wrote: »
    PLEASE, make support for mobile, it's definitely needed, even if you limit the nodes or something. I think it's super important to have something for mobile, specially that most unity users are doing stuff for those platforms.

    Mobile is definitely going to be supported! As you can see in the screenshot, there are several different lighting modes.
    For mobile, you'll want either vertex lit or simply unlit.

    The goal is to provide as much control as possible for things like this.
    For example, you'll be able to switch certain light types on and off, in case you're not using them in your scene:
    Directional lights, Point lights, Spot lights, Ambient light
    ThriKreen wrote: »
    An instruction count somewhere would be nice, and maybe allow someone to set a warning threshold for the project, so the text gets highlighted in red to warn the artist they're making a really expensive one?

    I'm not sure if it's possible to specifically say where the limit goes, especially with all the different devices out there. That said, showing instruction count should be possible :)

    I presume you mean some thing like:
    Vertex: 40 instructions
    Fragment: 35 instructions, 3 texture lookups

    With a dropdown box to display different target platforms (d3d9/opengl/gles/flash etc)
  • Shrike
    Offline / Send Message
    Shrike interpolator
    It would be great if you added tooltips what each individual node does. Its not obvious for the normal person that vertex is a color node per example, let alone the complex ones.

    Looks really promising
  • Acegikmo
    Shrike wrote: »
    It would be great if you added tooltips what each individual node does. Its not obvious for the normal person that vertex is a color node per example, let alone the complex ones.

    Looks really promising

    I've planned to write an extensive documentation on this, and integrate it into the editor :)
    At the very least; link to the docs from the editor itself!

    I'm glad it looks promising!
  • Shrike
    Offline / Send Message
    Shrike interpolator
    Its something vastly different if you have a short tooltip on something that gives you a brief hint what it does and having a documentation nobody is really reading anways.
    You would have to make super direct linking to make this work. Like right click on a node with a dropdown menu, and have the link open the doc on the proper page.

    Very likely 2 lines of text each is helping a lot more people than a excessive explanation, also all these things are very findable on the internet and known from other editors if you need the detail, often less is more = also less work for you
  • Torch
    Offline / Send Message
    Torch polycounter
    +1 for testing please, looks ace :D
  • Acegikmo
    Shrike wrote: »
    You would have to make super direct linking to make this work. Like right click on a node with a dropdown menu, and have the link open the doc on the proper page.
    Very likely 2 lines of text each is helping a lot more people than a excessive explanation

    Yeah, tooltips would be a good thing! It'll have to wait until it's nearing completion though, as they can easily be subject to change in this early stage.
    ThriKreen wrote: »
    An instruction count somewhere would be nice
    Done!
    EmAr wrote: »
    Another suggestion is color coding the connection curves. Vector/scalar values could have colors applied according to their number of components etc.
    The component count is now visualized through the number/thickness of lines.
    Having color coded lines might become a bit too cluttered. I think this solution looks pretty neat though. What do you think? :)

    Also, I added a normal quality toggle as well, so you have more control over how expensive your shader will be.
    Especially useful on low-end devices.

    progress_day11_normalqu_comp_instr.jpg
  • -Em'-
    Offline / Send Message
    -Em'- polycounter lvl 8
    Wow this is looking good !
    As unity user, i would love to test it, we might need a tool like this in our little company.

    My only concern would be about optimization for mobile, you said you'll support mobile but how far ? Would it be benefit to use your tool instead of coding a shader from scratch ?
  • uk_resistant
    Offline / Send Message
    uk_resistant polycounter lvl 17
    would love to see vertex colour/alpha nodes too (that might sound like a given but I thought i'd say anyway.)

    UV Panning as mentioned earlier, rotation would be great too.
  • Acegikmo
    -Em'- wrote: »
    My only concern would be about optimization for mobile, you said you'll support mobile but how far ? Would it be benefit to use your tool instead of coding a shader from scratch ?

    The goal is to make it viable for mobile shader creation as well, but it's all up to the person creating the shader :) As you can see above, there's now an instruction counter, which is a great metric to use while fiddling with the settings.
    Disable lights, disable specular, or even lighting altogether, and you'll see that the shader you get out of it is most likely fit for mobile usage!
    I'll most likely implement an optimization mode, where you can assign precision to specific nodes, making it even cheaper.
    would love to see vertex colour/alpha nodes too (that might sound like a given but I thought i'd say anyway.)
    UV Panning as mentioned earlier, rotation would be great too.

    Those are all planned :)
  • uk_resistant
    Offline / Send Message
    uk_resistant polycounter lvl 17
    also, what about vertex animation? That is something which would be super useful for mobile.
  • Acegikmo
    Vertex animation is going to be supported as well!
    Which nodes would you want for that feature specifically; apart from time, sin/cos/tan/smooth/clamp/wrap/repeat ?
  • uk_resistant
    Offline / Send Message
    uk_resistant polycounter lvl 17
    thats a hard question really because I have never been able to get them working in strumpy but id certainly make suggestions the more i play around with them in your tool.
  • ThriKreen
    Mentioned this on IRC but I'll repost it here for some permanence:

    For the docs, have a way to also go to a wiki website for the nodes, so people can like share tips'n'tricks for using them:

    i.e. fresnel for water, here are some common examples
    here's how to make a simple cel-shader, etc.

    I'm sure there are examples to be found online for maya or ue3's material editors, which one can replicate for Unity, but still would be nice to have it collected in one place.

    Instruction count: Yay! That was fast! =) For warning thresholds, I guess if there's some sort of preferences file, one can apply it there and distribute that file across the project? Or if no prefs, might be an idea to allow supporting one if it exists to override the default settings.

    Reason being: as a TA that has worked on some UE3 projects, some artists didn't quite understand the need for keeping the shader efficient and understood how to keep it optimized. So some way to impose a warning or outright block over a certain number would be nice.

    Or if one wanted to be nefarious, have a hidden email to alert someone that a user made a 100+ instruction shader for an eyeball or something. ;)

    Oh! From a maintenance point of view, a shader summary might be nice, searching the whole project tree for the assets and listing out stats. Might not be applicable for this tool though.
  • Acegikmo
    There's now a feature list available if you want to take a look and/or comment!

    Click here to open the Shader Forge feature/node/todo list
    ThriKreen wrote: »
    For warning thresholds, I guess if there's some sort of preferences file, one can apply it there and distribute that file across the project?

    Sounds like a pretty good idea! A settings file will come, so there could be a setting for a soft and hard limit for both the vertex and fragment program.

    Soft limit will warn users, hard limits will not allow you to go over them. The instruction count could show up in yellow if it's over the soft limit, and red if it's over the hard limit.
  • Acegikmo
    Blend modes + Custom blend mode is now supported!
    Alpha is not supported yet though, but it's on the todo list :)

    progress_day11_blendmode.jpg
  • AlanSMitchell
    Offline / Send Message
    AlanSMitchell polycounter lvl 14
    Just a thought but a few custom shaders like a cell shaded shader with instanced parameters for stroke width. I think you might need to make a screen space shader for that one. this might fall under the custom lighting though :/
  • Fizzly
    Offline / Send Message
    Fizzly polycounter lvl 8
    Thank you for making this :)!
  • MrOneTwo
    Offline / Send Message
    MrOneTwo polycounter lvl 12
    Looks amazing. I hope I will be able to afford it ;p Any time window when we could at least try it ?
  • Acegikmo
    MrOneTwo wrote: »
    Looks amazing. I hope I will be able to afford it ;p Any time window when we could at least try it ?
    Thanks!
    I think it might be in some form of Alpha state in about two weeks :)
    It depends on how many unexpected issues I run into along the way. So far is has been smooth though!
  • cupsster
    Offline / Send Message
    cupsster polycounter lvl 11
    Oh, I luv this shit. Can I later implement libnoise into this? Or at least to test it ? :)
  • Acegikmo
    Glad you like it! I'll probably not implement libnoise into SF natively, but you can run libnoise to generate a noise texture, and then use that as a Texture2D input for whatever you want! (Height/Displacement/Blending/anything)
  • mospheric
    Offline / Send Message
    mospheric polycounter lvl 11
    Ah this is amazing. Recently started getting into Unity shaders and excited to see this shader editor!
  • turistainc
    Offline / Send Message
    turistainc polycounter lvl 9
    Love it! I'm definitely interested in buying it when it's done.
  • Acegikmo
    Transparency/Alpha is now implemented!
    You now have control over face culling and depth sorting. Also, the component lines are now uniformly spaced :)

    progress_day12_transparency_depthsettings.jpg
  • Ged
    Offline / Send Message
    Ged interpolator
    yeah this would be great for mobile. I use a lot of fairly basic stuff for mobile games in unity these days
    some shaders I use when making mobile games in unity require these things:
    diffuse, specular, cubemap reflections, normal maps, scrolling and rotating of uvs, multiple uv channels - detail texture using a second uv channel, masking specular with vertex colour, using vertex colour alpha, giving an alpha sorting priority to a shader eg so that particle glows are on top of the explosion, set whether the shader is effected by fog, turn on and off zdepth testing, maybe the ability to play flipbook/spritesheet animations, also using vertex colour to blend between a few textures .

    at the moment my workmate makes all these shaders for me and I have to bug him a lot! it would be great to be able to make some of them myself with this editor! :)
  • mospheric
    Offline / Send Message
    mospheric polycounter lvl 11
    Any chances of making an alpha available in the future? Is this for Unity 4.X or will it work in 3.X?
  • Acegikmo
    mospheric wrote: »
    Any chances of making an alpha available in the future? Is this for Unity 4.X or will it work in 3.X?

    I will design it to work primarily in Unity 4.x, but I'm not sure if I'll use anything in it that will break in 3.x.
    If it actually does break though, I'll try to make sure it works in 3.x as well :)

    An Alpha should be ready in about two weeks, I would guess! It depends on how many unforseen issues that pop up along the way
  • Fizzly
    Offline / Send Message
    Fizzly polycounter lvl 8
    Looking very good!

    Is it possible to 'snap' the nodes? To make them align nicely with eachother. And also, is it possible to zoom in/out?
  • X-One
    Offline / Send Message
    X-One polycounter lvl 18
    This looks great. I avoid using Strumpy because if I ever want to clean up the code, it just looks like a mess to me. I'd love to give this a whirl as well as check out the shader code it kicks out.
  • Acegikmo
    Fizzly wrote: »
    Looking very good!

    Is it possible to 'snap' the nodes? To make them align nicely with eachother. And also, is it possible to zoom in/out?

    Thanks!
    Which type of alignment would you like? A grid in the background, or relative snapping when they are in-line with neighboring nodes? (Or both?)
    Zooming is definitely planned, I should add that to the todo list :)
    X-One wrote: »
    This looks great. I avoid using Strumpy because if I ever want to clean up the code, it just looks like a mess to me. I'd love to give this a whirl as well as check out the shader code it kicks out.

    Sure! I can't guarantee the code it generates will look nice, but we'll see :)
  • robert.briscoe
    Offline / Send Message
    robert.briscoe polycounter lvl 8
    Just wanted to chime in and say this looks amazing! I've been banging my head against a wall with Strumpy not being able to handle custom lighting and lacking a lot of standard features that makes it inferior compared to UDK! I would happy pay a shitload of money if if meant I could have a UDK quality shader editor in Unity!

    Some of my suggestions include:

    -Transmission mask and colour working like in UDK (with lightmaps)
    -Being able to map Sines to worldspace UVs
    -WorldSpace UVs
    -Triplanar UV mapping for terrain and other stuff
    -Ability to make custom terrain shaders! (easy nodes for layers etc)
    -Support for a modulated blend mode
    -Depth biased blending node (so useful for many things)
    -Vertex normal node for WorldPoaitionOffset
    -Possibility to displace vertex in realtime via a texture? (not possible in UDK, but could be very useful!)
    -LIGHT VECTOR!
    -Change "vector" to "constant vector" (i.e "constant 3 vector", etc)


    That's all that I can think of at the moment, please don't abandon this project! :D


    -
  • Acegikmo
    Thanks a bunch for the list Robert! I'll add the missing ones to the todo list tonight :)
  • Fizzly
    Offline / Send Message
    Fizzly polycounter lvl 8
    Acegikmo wrote: »
    Thanks!
    Which type of alignment would you like? A grid in the background, or relative snapping when they are in-line with neighboring nodes? (Or both?)
    Zooming is definitely planned, I should add that to the todo list :)

    Relative snapping when they are in-line sound very nice. But if snapping them to a grid is faster / less of a hazzle for you to program that would do the trick too :D Thanks man!
    I'm looking forward to it. Any ideas on the price already?
  • seforin
    Offline / Send Message
    seforin polycounter lvl 17
    to not push on this subject AT all, but any idea when we can alpha/prototype this ?

    Im using strumpy and hand writing shaders for a project im currently doing and its making me cry slightly with results I can do easily in unreal.
  • Jeka
    Awesome ! Where I can sign to beta test ? :)
13456721
Sign In or Register to comment.