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.
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
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
Anyhow, here's how it currently looks (and works):
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
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)
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.
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.
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.
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
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 )
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
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
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!
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.
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?
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
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)
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.
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!
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
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.
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.
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 ?
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.
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 ?
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.
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.
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.
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
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!
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)
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!
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
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.
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
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
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!
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 Thanks man!
I'm looking forward to it. Any ideas on the price already?
Replies
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!
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)
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!
Unity needs this officially.
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.
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.
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
(I have a team of 20 I am currently in the process of Hiring for. So this will be great on our project )
There will be a panner node! However, you can do it "manually" as well
(There's no time node yet, but there will be)
Light vector is planned too!
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.
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
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)
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!
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
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.
Done!
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.
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 ?
UV Panning as mentioned earlier, rotation would be great too.
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.
Those are all planned
Which nodes would you want for that feature specifically; apart from time, sin/cos/tan/smooth/clamp/wrap/repeat ?
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.
Click here to open the Shader Forge feature/node/todo list
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.
Alpha is not supported yet though, but it's on the todo list
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!
You now have control over face culling and depth sorting. Also, the component lines are now uniformly spaced
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!
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
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
Sure! I can't guarantee the code it generates will look nice, but we'll see
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!
-
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 Thanks man!
I'm looking forward to it. Any ideas on the price already?
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.