• 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
Alpha 0.06 is nearing! For this update, I've added 13 new nodes:
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!
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?
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?
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
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 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.
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
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.
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
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
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.
Well, putting the normals into the normal map shader input would be the correct way of doing it
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:
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.
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!
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.
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!
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.
@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
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?
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.
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:
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:
Consistent interaction - (Click and Drag for the right hand Shader node list!)
Link Highlighting on mouse over connection sockets & on dragging ala UDK. It makes connections easier to find & organise
Zooming (mouse scroll wheel)- This is an absolute must for creating fairly complex shaders, especially when struggling for screen space!
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)
Ability to Resize/detatch/hide UI elements - Like the preview section or the node list section
Ability to "rename" shader from Shaderforge
Ability to "Save As" from shader forge - So I can open an existing shader and save it under another name.
Ability to "Open" other shaders from Shader Forge
Ctrl-click to select multiple nodes to move around clusters more easily (Hierarchal node move is too much)
Alt-click-drag to draw selection box to more easily select multiple nodes
@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:
Consistent interaction - (Click and Drag for the right hand Shader node list!)
Link Highlighting on mouse over connection sockets & on dragging ala UDK. It makes connections easier to find & organise
Zooming (mouse scroll wheel)- This is an absolute must for creating fairly complex shaders, especially when struggling for screen space!
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)
Ability to Resize/detatch/hide UI elements - Like the preview section or the node list section
Ability to "rename" shader from Shaderforge
Ability to "Save As" from shader forge - So I can open an existing shader and save it under another name.
Ability to "Open" other shaders from Shader Forge
Ctrl-click to select multiple nodes to move around clusters more easily (Hierarchal node move is too much)
Alt-click-drag to draw selection box to more easily select multiple nodes
Ability to select multiple nodes, either by dragging a box, or ctrl+LMB clicking.
Node grouping with group labelling.
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.
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.
Replies
• 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
for example when i right click could i see:
math - dot,arcos,arcsin,arctan,sqrt.
constants - vector1, vector2, vector3, vector4, pi, tau, e.
etc.
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!
I've also thought about allowing users to sort/exclude/favorite nodes themselves
Aw yeah
And what do you think of a smaller Vector 2/3/4 constant size?
Thanks! Finding it is trivial, you should be able to do that.
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
0.06 should be ready within the hour!
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
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.
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
Just in case anyone wants to create a Fresnel in Shaderforge here is how
Simple Fresnel
Fresnel using normals from a normal map
Cheers
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
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.
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.
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:
0.07 should be ready in a few hours
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.
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!
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!
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.
0.06b is the latest, 0.07 is coming very soon
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!
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.
Excellent Can't wait!
@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
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
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?
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.
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
Quick Question: I'm trying to re-create a simple custom lighting model as I have done previously in UDK:
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:
Aw yeah. Great work.
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.
An excellent list. I'd add:
- Ability to select multiple nodes, either by dragging a box, or ctrl+LMB clicking.
- Node grouping with group labelling.
- 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.
- 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.