Home Unity Store

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

145791021

Replies

  • Acegikmo
    Alpha 0.12 is now out! DX11 Tessellation & Displacement and Vertex offset/animation is now implemented :)

    shaderforge_tessellation.gifshaderforge_vertexanim.gif

    progress_a012_tessellation.jpg
  • fatihG_
    Offline / Send Message
    fatihG_ polycounter lvl 14
    Oh snap this looks sick.
  • SkyWay
    Offline / Send Message
    SkyWay polycounter lvl 13
    Just to let you know, you're amazing. I'd throw money at you already, but Unity doesn't have a pre-order system implemented in their store :d
  • VictorSantos
    Offline / Send Message
    VictorSantos polycounter lvl 12
    I agree, this looks outstanding! I want my pre-order :)

    Keep it up!
  • McWild
    I think my head just exploded.
  • solarnoise
    Offline / Send Message
    solarnoise polycounter lvl 3
    Can't wait for 0.13!
  • bugo
    Offline / Send Message
    bugo polycounter lvl 17
    oh damn dude, what an update, looking awesome!

    (ps. when are we gonna have the fresnel? :P )
  • Acegikmo
    You've been able to do fresnel since 0.04, but sure, I can prioritize a node for it in 0.13 :)
  • bugo
    Offline / Send Message
    bugo polycounter lvl 17
    Shame on me, thanks for the img acegikmo.
  • solarnoise
    Offline / Send Message
    solarnoise polycounter lvl 3
    Any ETA on 0.13 download? :)

    Can't wait to play with that "if" node.
  • Acegikmo
    solarnoise wrote: »
    Any ETA on 0.13 download? :)

    Can't wait to play with that "if" node.

    About 30 minutes :)
  • Acegikmo
    Alpha 0.13 is now out! Sorry for the delay.
    New things:

    progress_a013_nodes.jpg
  • Jeka
    Just awesome ,dude !
  • Ged
    Offline / Send Message
    Ged interpolator
    wow another great set of updates, I cant keep up!
  • solarnoise
    Offline / Send Message
    solarnoise polycounter lvl 3
    Buying this day 1, for sure
  • solarnoise
    Offline / Send Message
    solarnoise polycounter lvl 3
    Acegikmo, can you speak to how well these shaders might run on mobile? Are there any mobile-specific tweaks that should be made, or that could even be built into the tool?

    I know some general guidelines can help, like avoiding branching logic, refraction, extra effects like that... but is there any stock code your tool generates that might not make the shader run well on mobile hardware?
  • Acegikmo
    Thanks for all the kind words! It really helps me stay motivated to keep pushing :)
    solarnoise wrote: »
    Acegikmo, can you speak to how well these shaders might run on mobile? Are there any mobile-specific tweaks that should be made, or that could even be built into the tool?

    I know some general guidelines can help, like avoiding branching logic, refraction, extra effects like that... but is there any stock code your tool generates that might not make the shader run well on mobile hardware?

    SF primarily manipulates your shader in the fragment shader rather than the vertex shader, which, can get expensive on mobile.
    Currently, SF doesn't support vertex lighting, but it is a planned feature :)
    Further down the line I'd love to add a bunch of features to aid the optimization process, but it will most likely have to wait until post release.

    But other than that - Use Lambert or Unlit, use interpolated normals instead of normalized normals, disable multiple lights, disable shadows on the object, and so on!
  • hendersonandre
    Hello everyone, I was surfacing the web when I came across this help UDK material editor stuff that help me out a lot for using Shader Forge.
    http://udn.epicgames.com/Three/MaterialsCompendium.html

    I also found some mesh offset examples which is cool as well and might be helpful for you Acegikmo.
    http://udn.epicgames.com/Three/WorldPositionOffset.html
  • hendersonandre
    Hello everyone, I was surfacing the web when I came across this help UDK material editor stuff that help me out a lot for using Shader Forge.
    http://udn.epicgames.com/Three/MaterialsCompendium.html

    I also found some mesh offset examples which is cool as well and might be helpful for you Acegikmo.
    http://udn.epicgames.com/Three/WorldPositionOffset.html
  • Acegikmo
    Two of the new features coming in 0.14:
    shaderforge_textureasset_uv.gif
  • TheRealFroman
    Offline / Send Message
    TheRealFroman polycounter lvl 11
    Been using this today for the first time, great stuff! However I just spent the last 2 hours making a test shader, saved it, exited, and came back to find all the node connector pieces have disappeared. But all the previous nodes left intact and where they were before quitting Unity. Did I do something wrong? Or is this a bug that needs fixing o.O

    It would suck to re-connect all my nodes back together after quitting Unity every time haha...

    image proof, all these were connected before, then after I re-opened the shader later: RV7rAy9.jpg



    Edit: I am also using the free version of Unity, if that makes any difference D:
  • Acegikmo
    Do you get any errors in the console? The link info should still be in the shader file anyhow
  • TheRealFroman
    Offline / Send Message
    TheRealFroman polycounter lvl 11
    no errors from what I can see, although you are correct the shader still retains it's info. It's just that this might become a problem if I wanted to make quick changes, and had to re-connect everything to do it. Is there any way around this? :S
  • Acegikmo
    Of course it's an issue :)
    You should definitely be getting errors in the console if something like that happens.
    I'm not sure what happens, so I don't know if there is a way around it at the moment. Does it happen when you open any of the example shaders too?
  • Acegikmo
    I've started working on documenting all the nodes on what will become the Shader Forge website! It's very basic at the moment, but all the nodes are there, and the search box should work properly :)

    http://acegikmo.com/shaderforge/nodes/
  • Zugzug
    Offline / Send Message
    Zugzug polycounter lvl 5
    This is awesome, haven't been checking this up in a while and came back to more great things to play with. Keep up the good work!!
  • solarnoise
    Offline / Send Message
    solarnoise polycounter lvl 3
    Is there a way to control the speed of a Panner with properties?

    I tried doing something like this, but it scales the UVs as well, I want to just control the speed.
  • Bonkahe
    Offline / Send Message
    Bonkahe polycounter lvl 7
    Man I wish I could get my hands on this, up till now I've been coding all my shaders, and it sucks, can't wait.
  • Acegikmo
    Thanks :)

    SF is nearing beta! Which means features will soon stop rolling in, and focus will be put on workflow, polish and bugfixing.
    Are there any specific bugs or features would would consider the most important for now?

    I will keep working on SF post-release, so some things, like deferred rendering, will be in a future update :)

    solarnoise wrote: »
    Is there a way to control the speed of a Panner with properties?

    I tried doing something like this, but it scales the UVs as well, I want to just control the speed.

    The U and V settings on the panner controls the speed, but if you want an exposed property for each dimension, you'll need to do a "manual" panning node setup :)

    PanningUVs3.jpg
  • JhunZhen
    I can't wait to test it to, this looks great its time to make unity3d shader creation easier and much better!
  • darkmag07
    Offline / Send Message
    darkmag07 polycounter lvl 12
    I put together a gradient mapped shader, but it's giving me some issues. Anyone know why it would say I am using 4 textures when I only have 3 texture nodes? Does one of the nodes I'm using create a texture in the background? I figured if I accidentally dropped in another Texture 2D node I'd see it in the inspector but I don't see one and I can't find any in the node view when I pan around.

    gradient_shader.png

    Sometimes when I save and exit a scene it comes up with an alert message saying "Cleaning up leaked objects in scene since no game object, component or manager is referencing them. Texture2D has been leaked 10 times." (Or how ever many times it has been used).
  • Thomas P.
    Offline / Send Message
    Thomas P. polycounter lvl 14
    Acegikmo wrote: »
    Thanks :)

    SF is nearing beta! Which means features will soon stop rolling in, and focus will be put on workflow, polish and bugfixing.
    Are there any specific bugs or features would would consider the most important for now?

    I will keep working on SF post-release, so some things, like deferred rendering, will be in a future update :)


    Excellent news Ace. Personally I'd love to see tutorials/manual/examples more than anything at this point :)
  • almighty_gir
    Offline / Send Message
    almighty_gir ngon master
    darkmag07 wrote: »
    I put together a gradient mapped shader, but it's giving me some issues. Anyone know why it would say I am using 4 textures when I only have 3 texture nodes? Does one of the nodes I'm using create a texture in the background? I figured if I accidentally dropped in another Texture 2D node I'd see it in the inspector but I don't see one and I can't find any in the node view when I pan around.

    gradient_shader.png

    Sometimes when I save and exit a scene it comes up with an alert message saying "Cleaning up leaked objects in scene since no game object, component or manager is referencing them. Texture2D has been leaked 10 times." (Or how ever many times it has been used).

    not sure what's causing the specific issue of more textures being used than you're actually inputting. you could optimise though... use a constant of 0 instead of a texture for input B of your lerp, and move the alpha into the alpha of input A. since the paw prints (it's what they look like) are a solid colour anyway, it makes more sense to do it that way.

    then you're only using 2 textures.
  • darkmag07
    Offline / Send Message
    darkmag07 polycounter lvl 12
    mapped_piggies.png

    Thanks for the tip Almight_gir, but I'm don't think it will work in this situation. I've got 17 overlay textures that I've built to mess around with this setup, some are solid black or white (pink pig on bottom left) while others have a mix between the two (blue/purple pig on bottom right adds back a dark color under the white spots).

    Admittedly I could scale down all the spot overlay textures and put them in the alpha channel . But that adds more steps to the shader. I suspect it still saves on processing power, but I don't know the conversion between shader steps and textures. Considering that the texture size is pretty small (256) it probably doesn't save me a whole lot of processing power in the long haul anyway.

    It'd be a good exercise though, if I gave up multicolored overlays.
  • Acegikmo
    The instruction counter has been broken for quite some time now, so you shouldn't rely on it :)
    I'll see if I can get it fixed for Alpha 0.14!

    The Texture2D leakage is a known issue, just haven't bothered with it yet as it isn't critical. I suspect that will be sorted during the beta phase.

    Also, I apologize for the delays, I've picked up a part-time freelance job now, so things are progressing a bit slow, sorry about that.
  • darkmag07
    Offline / Send Message
    darkmag07 polycounter lvl 12
    Hey, no problem. Glad to know these aren't completely unknown bugs.
  • McWild
    Acegikmo, I've been beasting making awesome materials thanks to this. Any chance of implementing an outline shader for toon style edges? Is there a way to do this with some vert offset trickery?

    edit: Also, I'd like to combo the awesomeness of Shaderforge with some other FX I'm using. Is there any way to add properties INSIDE Shaderforge (properties, tags, or extra lines)?

    Example: We're using Glow 11 right now. It requires us to add some properties, tags, and a line to the shader, listed here under 4.:
    http://i-gamedev.com/glow11/manual/

    What I have to do now is compile my shader, open the source and start adding stuff. Whenever I go back to change the shader in Shaderforge these changes are thrown out on re-compile and I have to add this stuff again manually. This may be impossible and I understand if it is!
  • Acegikmo
    Outline is a planned feature :) I will add two new connectors to the main node - one called outline width, and another called outline color.

    As for that effect - I guess you would need a way of adding custom tags to your SubShader. It's quite an advanced one, but I suppose it might be done down the line. Could you post the custom SubShader tags as a request on UserEcho, to make sure I'll remember it?
  • McWild
    McWild wrote: »
    Acegikmo, I've been beasting making awesome materials thanks to this. Any chance of implementing an outline shader for toon style edges? Is there a way to do this with some vert offset trickery?

    edit: Also, I'd like to combo the awesomeness of Shaderforge with some other FX I'm using. Is there any way to add properties INSIDE Shaderforge (properties, tags, or extra lines)?

    Example: We're using Glow 11 right now. It requires us to add some properties, tags, and a line to the shader, listed here under 4.:
    http://i-gamedev.com/glow11/manual/

    What I have to do now is compile my shader, open the source and start adding stuff. Whenever I go back to change the shader in Shaderforge these changes are thrown out on re-compile and I have to add this stuff again manually. This may be impossible and I understand if it is!

    Got it, will do! Can't wait for the toon shading, glad it's on the list.

    Also, need some clarification with the Time node. I made a UV panner with the Time node as pictured here:

    EOkqpkU.jpg

    This runs fine in the SF editor, with X and Y speed as the two Appended values. However, when I CLOSE the SF editor and try running it in the game, the panner doesn't work and is stuck in one place. If I open the SF editor in the background, the panner -does- work in game, making me wonder what I have to do to activate the Time node.

    (For the time being, I replaced T with a slider and animate the panner with a script.)
  • Acegikmo
    The Time issue is a tricky one, but it will be fixed.
    The reason for this is simply because the built-in variable _Time doesn't run in the editor, only in play mode.
    Essentially, if I used _Time, which would work in-game, it would only animate after you've pressed play, but remain static in SF.
    I added a property called _TimeEditor, which SF is constantly updating while it's open, so you can see your shader animate, but it doesn't update in-game without a script to do it.

    The tricky part is that there's no perfect solution to this, that I've found yet. It's either:

    A: Compile two shaders, one with _Time, used in-game, and one with _TimeEditor, used in SF. The issue here is that compiling will take twice as long, and it would also risk drifting SF away from being 100% WYSIWYG.

    B: Add the two different time types, and stop pushing values to _TimeEditor when the game is running. This is the most elegant solution, I think, but the obvious issue with this is that your shader will need to do an add operation when you use time, which isn't needed in builds.

    I'm going to go for B in 0.14, and we'll see how it goes.
    I imagine there might be a "Finalize all shaders" button or similar in the end, which readies them all for a build.
  • bugo
    Offline / Send Message
    bugo polycounter lvl 17
    Hey Acegikmo, I was playing around with the matcap, but since it's creating a second pass on the shader it breaks the batching in Unity, is there a fix or a way to create a matcap without doing a second pass?
  • Acegikmo
    Matcap shaders in particular doesn't create more passes that most other shaders. Pretty much all shaders dealing with lighting are multi-pass shaders, unless it's lightmapped or using the forward, "4 lights in one pass" thing, which I haven't looked into yet.

    However, static batching should be fine, just make sure you use the same material on all, and mark them as static.
  • Acegikmo
    Alpha 0.14 is soon ready - I'll add the next batch of testers as soon as it's out :)
    There are quite a bunch of usability and new features in 0.14, a changelog will be up soon.
    The beta is getting closer and closer!
  • Neox
    Offline / Send Message
    Neox veteran polycounter
    I just applied, would be cool if I/we could get into the alpha test.
  • robert.briscoe
    Offline / Send Message
    robert.briscoe polycounter lvl 8
    Just checked out the changelog, very excited for the next release! :)
  • Acegikmo
    Hey, no spoilers Robert!
  • Acegikmo
    Shader Forge Alpha 0.14 is now out!
    Here are some .gifs and a changelog image, as usual :)

    progress_a014_pbl.jpg

    shaderforge_conserving.gifshaderforge_textureasset_uv.gifshaderforge_uvrespect.gifshaderforge_reorder.gif
  • Bonkahe
    Offline / Send Message
    Bonkahe polycounter lvl 7
    Auughhhh I wants it....
  • glynnsmith
    Offline / Send Message
    glynnsmith polycounter lvl 17
    Acegikmo wrote: »
    Shader Forge Alpha 0.14 is now out!
    Here are some .gifs and a changelog image, as usual :)

    progress_a014_pbl.jpg

    shaderforge_conserving.gifshaderforge_textureasset_uv.gifshaderforge_uvrespect.gifshaderforge_reorder.gif

    Jesus Christ. You're a machine. Awesome stuff, dude.
  • Zoltan Erdokovy
    Great update!

    Is there a way to tell in a double sided shader which side a current pixel is on?
145791021
Sign In or Register to comment.