Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Shader Forge - A visual, node-based shader editor

Discussion in 'Works In Progress - Archive' started by Acegikmo, Jul 20, 2013.

Thread Status:
Not open for further replies.
  1. Acegikmo

    Acegikmo

    Joined:
    Jun 23, 2011
    Posts:
    1,294
    You mean ShaderForgeInternal.mat ?
    In that case, yes, I'll look at that in the future :)
     
  2. eskimojoe

    eskimojoe

    Joined:
    Jun 4, 2012
    Posts:
    1,440
    Does this do shader reverse engineering?


    You supply an existing shader file, it reads it and deconstructs what it does and allows you to fiddle around with the shader on-screen?
     
  3. Acegikmo

    Acegikmo

    Joined:
    Jun 23, 2011
    Posts:
    1,294
    Not at the moment no. It's a *highly* advanced topic, and far from what Shader Forge does today, which means it will take a ton of time to make. But if tonnes of people really want it more than anything else, then yeah, I might add it!
     
  4. Chaoss

    Chaoss

    Joined:
    Jul 8, 2011
    Posts:
    327
    I don't think what he suggested is actually possible, although Shader Forge does save/load .shader files so you don't end up with loads of editor files. It keeps your project nice and clean and if you want you can remove the Shaderforge specific code inside the shader although I wouldn't reccomend doing this as you might want to go back in and make some changes later.


    Here are my current suggestions and feedback for ShaderForge from me
    * Under scene data add a fog color node... please! It'd make certain things a lot easier.
    * Allow shaders to be able to disable certain passes, for example the ability to 'turn off' the normal map slot per material if a shader has one.
    * Right clicking on connecting nodes should allow us to delete them.
    * add a 'new' button, or some sort of menu button so we can go back to the main screen. Right now we have to close ShaderForge and reopen it to get to it.
    * Refraction shaders look all wierd when looking at them close and from an angle, allow us to choose between per pixel and per vertex.
     
  5. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,066
    It's absolutely possible, even with compiled shaders, but it is the most tedious thing to implement/test in the world.
     
  6. Acegikmo

    Acegikmo

    Joined:
    Jun 23, 2011
    Posts:
    1,294
    1. To use with what, custom fog solutions? Request it on UserEcho, so I won't forget it :)
    2. This is a tricky thing, for various reasons. I'll look into shader branching post-release
    3. Smoother node connection deletion is planned!
    4. Yes, this would be nice. A return to menu button or similar :)
    5. This is already fixed in 0.16!
     
  7. tswalk

    tswalk

    Joined:
    Jul 27, 2013
    Posts:
    1,109
    I was curious to know a few things:

    - how are passes handled (or is this something that gets automatically figured out and parsed)?

    - are we able to make compute shaders or is this strictly for surface shaders?

    - will we be able to create a postprocessing effects shader?

    I'm not involved with the beta, but I was just curious about these things...

    thanks!
     
  8. Acegikmo

    Acegikmo

    Joined:
    Jun 23, 2011
    Posts:
    1,294
    1. They're currently auto-generated depending on your settings. There might be a manual pass setup mode down the line.

    2. I don't know how compute shaders work, but I would guess the answer is no. Also, SF generates CG shaders, not surface shaders :)

    3. Somewhat, yes, but not in an intuitive way! There's no full-screen projection mode at the moment, but you can put a plane in front of the camera, and use the scene color node to grab and alter the screen content and manipulate it.
     
  9. MarkBenitez

    MarkBenitez

    Joined:
    Oct 5, 2013
    Posts:
    44
    How is the optimization? Are there tips on making good optimized shaders with shader forge? and this may be a ridiculous question for me as a solo developer but currently how would it perform on the xbone and ps4?
     
  10. Chaoss

    Chaoss

    Joined:
    Jul 8, 2011
    Posts:
    327
  11. jebo87

    jebo87

    Joined:
    May 11, 2012
    Posts:
    21
    this is going to be a must have for everyone!
     
  12. Acegikmo

    Acegikmo

    Joined:
    Jun 23, 2011
    Posts:
    1,294
    Answered this on the previous page :)

     
  13. Acegikmo

    Acegikmo

    Joined:
    Jun 23, 2011
    Posts:
    1,294
    I said last time that 0.15 would be the last version before public release, but I changed my mind, due to having done some major changes in the system.
    0.16 should be the last version, for real this time!

    It's also out now! Here's the changelog for Shader Forge Beta 0.16:

    • New Main input: Custom Lighting (Run per-light source. Emission is now run only once when using unlit)
    • New Main input: Diffuse Ambient Light (For example: IBL/Cubemaps, Ambient light)
    • New Main input: Specular Ambient Light (For example: IBL/Cubemaps)
    • Specular is now required to be connected by Gloss and Specular Ambient
    • Diffuse is now required to be connected by Transmission, Light Wrapping, Diffuse Power and Diffuse Ambient
    • The bug causing massive load times and long connection / preview waiting times has now been fixed!
    • Fixed a bug where the component mask node caused massive framedrops
    • The node view settings, such as the connection display mode, are now persistent between sessions
    • The panner node should no longer cause errors
    • Node previews should now be generated around 44% faster ( They are now rendered in 96x96 instead of 128x128 )
    • The Shader Forge logo has now been updated by Jenny Nordenborg (@sranine)
    • The main node now has a background image and has been reorganized into categories
    • You can now switch between per-pixel screen coordinates or per-vertex screen coordinates
    • You can now move around the Shader Forge folder without asset links breaking
    • You can now optionally enable masking of specularity in shadows (Only for directional lights)
    • Cleaned up some of the generated diffuse code (Diffuse power is now only used when connected)
    • Fixed "invalid input" sound being triggered on OSX when using hotkeys
     
    Last edited: Dec 26, 2013
  14. Chaoss

    Chaoss

    Joined:
    Jul 8, 2011
    Posts:
    327
    Awesome update!

    Shader Forge had some issues where it froze and wouldn't open shaders/had a blank window, I have found a solution!

    Deleting ShaderForge and installing it fresh has fixed the issue!
     
    Last edited: Dec 27, 2013
  15. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,458
    I seriously hope this comes out for the new year... that would be one hell of a gift for Unity users... For my needs, the skyshop integration, and the need for TSD and Pre Intergrated skin is a must, especially if the models look realistic
     
  16. tswalk

    tswalk

    Joined:
    Jul 27, 2013
    Posts:
    1,109
    thanks for taking time out to get this involved... pretty clear evidence that this will be a well supported product. looking forward to it!
     
  17. Acegikmo

    Acegikmo

    Joined:
    Jun 23, 2011
    Posts:
    1,294
    Great :)

    SF is super close to the public release now - I'm currently polishing behaviour in the editor and fixing the last few critical bugs! I'm really nervous and excited :D
     
  18. Acegikmo

    Acegikmo

    Joined:
    Jun 23, 2011
    Posts:
    1,294
    A new feature coming in 0.17 :)

    Alt+RMB drag to create a cut-line. You can also do Alt+RMB click on connectors to unlink them.

     
  19. Chaoss

    Chaoss

    Joined:
    Jul 8, 2011
    Posts:
    327
    Nice, this is exactly why this will succeed and go on to be the most purchased asset in the asset store and make you rich, because you listen and interact with the community :)


    One quick question as I seem to be stuck on something.

    How would I go about making the UV map on a cube constant regardless of the size or position of the cube, I know it involves the World Pos node. I'm trying to create an editor 'trigger' using the Cube prefab in Unity, and I'd like to be able to resize/rescale it but have the texture I've applied to it always remain consistant
     
  20. Acegikmo

    Acegikmo

    Joined:
    Jun 23, 2011
    Posts:
    1,294
    Thanks a bunch :)
    I try to keep up as much as possible with all the incoming requests, hehe.

    Also, here's the shader you were asking about. It will use the local coords, so you can rotate it and scale it without UV distortion as well :)



    Now it's time to sleep. Night!
     
  21. Chaoss

    Chaoss

    Joined:
    Jul 8, 2011
    Posts:
    327
    edit:

    Thanks very much it's sort of working but the texture on each side of the cube is rotated funny (at a 90 degree angle), is there a way to globally keep the texture so it's always rotated pointing 'up' (so the word TRIGGER isn't rotated)
     
    Last edited: Dec 28, 2013
  22. Deleted User

    Deleted User

    Guest

    Apologies AceGikmo, I've not really looked too much into ShaderForge works..

    Have you tried any post effects with SF? DOF / AA etc. It would be interesting to see how powerful SF is.

    Can it literally do everything you can do in code?
     
  23. Spelle

    Spelle

    Joined:
    Jul 3, 2013
    Posts:
    41
    Really interesting to watch, how this thing develops. And it's cool that author listens to suggestions :).
     
  24. Acegikmo

    Acegikmo

    Joined:
    Jun 23, 2011
    Posts:
    1,294
    Where the component masks extract GB / BR / RG, you need to switch place on them to rotate. You probably don't need to touch BR, but you can change GB to BG or RG to GR to rotate. It might rotate in the wrong direction, in which case you'll need to negate one or both UVs. Experiment a bit :)

    SF works with post effects, but making post FX with SF is a whole different topic. Many post effects rely on loops and iteration, which node setups aren't ideal for at all. You *can* do it without loops, but it will be a complete mess :)

    I might add more post-FX nodes and support down the line, post-release

    Of course! Why would I not listen to suggestions? I want this to be an awesome product, not only for you, but for me as well :D
    (I'm a game developer too you know)
     
  25. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,066
    So, how many days will I spend repeatedly refreshing this page to find the release date for the paid beta? I just looked over the nodes again and it looks like I can port over every single one of my UDK shaders so this is going to work wonders for my workflow.
     
  26. Acegikmo

    Acegikmo

    Joined:
    Jun 23, 2011
    Posts:
    1,294
    There's no specific release date! It's loosely defined as "very soon" :)
    I don't have much left to do until it's ready for public release, so, very soon!
     
  27. Chaoss

    Chaoss

    Joined:
    Jul 8, 2011
    Posts:
    327
    Ah cheers, I got it working almost perfectly, however it is flipped on the oposite side of the mesh, I've tried several ideas but can't seem to get it right on both sides, any ideas?
     
  28. Acegikmo

    Acegikmo

    Joined:
    Jun 23, 2011
    Posts:
    1,294
    Hm, it's getting trickier and trickier now!

    Currently, where you have the abs node, it will make the negative side positive. What you want in this case is to flip based on the sign of the normal, before the abs node, and use that when determining UV flipping. There is a sign node you can use to get 1 or -1 depending on if its positive or negative :)
     
  29. Chaoss

    Chaoss

    Joined:
    Jul 8, 2011
    Posts:
    327
    Heh yeh sorry for the 101 questions, the Sign node didn't appear to do anything :(
     
  30. Acegikmo

    Acegikmo

    Joined:
    Jun 23, 2011
    Posts:
    1,294
    Did you use it to determine UV flipping or did you just put a sign node before the abs node?
     
  31. Chaoss

    Chaoss

    Joined:
    Jul 8, 2011
    Posts:
    327
    Ah one sec... how would I go about doing that? my math isn't very good
     
  32. Acegikmo

    Acegikmo

    Joined:
    Jun 23, 2011
    Posts:
    1,294
    Well, if you want to flip the UVs U axis based on the sign, you can do Append( sign(normalComponent), 1) * UV
     
  33. Acegikmo

    Acegikmo

    Joined:
    Jun 23, 2011
    Posts:
    1,294
     
  34. Chaoss

    Chaoss

    Joined:
    Jul 8, 2011
    Posts:
    327
    Ah thanks, it appears I cannot complete the shader though due to a bug not letting me connect my lines to the UV connectors. I guess judging by your pic that it's been fixed in the newest version :)
     
  35. Acegikmo

    Acegikmo

    Joined:
    Jun 23, 2011
    Posts:
    1,294
    Which version are you running?
     
  36. Chaoss

    Chaoss

    Joined:
    Jul 8, 2011
    Posts:
    327
    0.16.... I found a workaround though, disconnectin the 2 multiplyers, hooking them up to UV Coordinate nodes then attaching them to the UV's then unhooking them from the UV coordinate nodes and putting them where I want, The shader works exactly how I wanted now, cheers for the help I can learn a lot from this.
     
  37. Acegikmo

    Acegikmo

    Joined:
    Jun 23, 2011
    Posts:
    1,294
    Another piece of polish coming in 0.17 - Add and Multiply will now support up to 5 inputs :)

     
  38. myroomtm

    myroomtm

    Joined:
    Nov 15, 2012
    Posts:
    7
    How are you? I am the Graphic designer of South Korea. Looking forward to your great work! When you plan to do for sale?
     
  39. Acegikmo

    Acegikmo

    Joined:
    Jun 23, 2011
    Posts:
    1,294
    Very soon! I would guess about a week left until it goes live on the asset store :)
     
  40. SOULS STUDIOS

    SOULS STUDIOS

    Joined:
    Jan 20, 2013
    Posts:
    3
    HI ! This sounds amazing ! We can overlay Up to 5 Textures that easy now ? Awesome !

    I have some Toughts On Features Here with me i would like to trow you :
    1) I know this will sound odd ... as can be done other way in Multiply , add , nodes etc ..
    But is it Possible to add a editable number near each input , that determines the "power amount" for each input ?
    - It would help easy up workflows when one have to connect power nodes to each input to control amounts of power each input have ... Might be just me but : A 'Simple power number near each input would make things easier' ... Would be cool also have a check box were we could make the blend power amount input public ...

    2) Latter could we have a 'Layers system' ? Were we can have Layers lets say like 5 Inputs / But Overlay Them with like Photoshop blend modes ? With 'Multiply, Add, Overlay, Hard light , Difference,' Etc in 'just one node' ... So at each Layer we would select ( Layer power - blend mode )​

    Im Using Beta 0.16 : Could someone help , Showing The nodes for two or tree Features Im Sure shaderforge 0.16 Already do ...
    1) Does Shaderforge have already the 'Realtime Light Emission' Feature Was showcased in video some pages ago ? How can we do that ?

    2) Is it possible to make a 'Terrain Shader' That we can use with unity terrain ? How can we do that ?

    3) Does shaderforge Do 'Relief SHadding' ? With SHadows http://goo.gl/aIutKv ( not paralax ) Can we have that as Feature ? Is it already possible ?

    4) And What about Convex ( 'Environment' Wear like Shader ) As'Snow on top of Flat Surfaces'and Also 'Dirt' on 'Convex' Non Flat like 'Cavity Occlusion' ? Can you Show some Example Nodes Please ? ​

    How And are this above 4 features possible , now or in a Near Future ?
    Can you please Show some examples on nodes how to ?

    Especially the Environmental Snow and Cavity And Terrain ...
    Woudl be reaaly cool to have examples of those !

    Thanks so million Much for This amazing Asset and all Enthusiastic support !

    Have a Wounder full happy new Year 2014 !
    Mai this new year be a prosperous blast to You Acegikmo As well to all you !


    Best Regards.
     
    Last edited: Dec 29, 2013
  41. Chaoss

    Chaoss

    Joined:
    Jul 8, 2011
    Posts:
    327
    Wow that's really awesome, I always find myself using loads of multiply nodes
     
  42. Acegikmo

    Acegikmo

    Joined:
    Jun 23, 2011
    Posts:
    1,294
    Well, not exactly, it's a chained multiply, which is probably not what you want when overlaying textures (Although it might be)

    It's possible, yes, but I'm worried these two features might cause too many interface quirks and clutter

    I've planned to have a node for the photoshop blend modes, so, in a way, yes :) I'm not sure if it will support multiple inputs though.

    I presume you mean the real-time spherical area light video :)
    It's not built-in yet, but I want to release that as a bigger, real-time area light update later on.

    Most likely yes, but I haven't looked into how the Unity terrain interacts with shaders, but, most likely!

    I haven't looked into the math behind that, but, it should be possible

    Snow on top of flat surfaces is usually done using the normal direction and mask a texture by its clamped Y axis.

    Thanks! And yes, that's kinda the point of it :D
     
  43. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,649
    Yeah!!! . Sorry if this been posted before, but what about the final (now it's very close) price?
     
  44. Acegikmo

    Acegikmo

    Joined:
    Jun 23, 2011
    Posts:
    1,294
    Somewhere between $75 and $85 during the first two/three weeks (During the beta), and then probably $100 when it goes 1.0 :)
     
  45. Kirbyrawr

    Kirbyrawr

    Joined:
    Jul 23, 2012
    Posts:
    945
    YAY!
     
  46. smiljan66

    smiljan66

    Joined:
    Jun 9, 2010
    Posts:
    610
    Come release this thing once for all as it is and then you put updates so the people who buy now will have acces to it please!
     
  47. smiljan66

    smiljan66

    Joined:
    Jun 9, 2010
    Posts:
    610
    i hope this wont be as strumphy shader editor wich dont have almost no help files or tutorials will eb nice some tutorials and explanation covering most fo the stuff like normal strenght , alpha , glass or making diferent materials , becuase with strumphy there wa salmost no support.
     
  48. Acegikmo

    Acegikmo

    Joined:
    Jun 23, 2011
    Posts:
    1,294
    I've planned to release both documentation and tutorials along the way :)
    The documentation for the nodes is pretty much finished by this point: http://acegikmo.com/shaderforge/nodes/
    And I've started writing about all the available settings as well, which is almost finished too.
    Next up is a set of tutorials ;)
     
  49. Chaoss

    Chaoss

    Joined:
    Jul 8, 2011
    Posts:
    327
    Nice, a quick request on tutorials...

    I'd like to see tutorials showing how to 'manually' make some of the already existing built in shaders, including how you would set up custom lighting to appear the same as the bumped diffuse or specular shaders. if not a tutorial then a set of example sample/template shaders.

    Another request is that there are some idiot to pro tutorial series explaining what each of the complex math nodes do in plain english for those of us who don't have a degree in complex mathmatics. I think it would go a really long way to making Shader Forge more accessible to artists. :)

    Also I'd like to request some 'starter' shaders, shaders that can be used as a base for making more complex or custom shaders :)
     
  50. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,649
    Good, very good news. Thanks. :D
     
Thread Status:
Not open for further replies.