Home Unity Store

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

1568101121

Replies

  • Acegikmo
    Great update!

    Is there a way to tell in a double sided shader which side a current pixel is on?

    Thanks!
    Currently, there's no way of doing that, but you should be able to! Could you request it on UserEcho? :)

    Also, quoting this in case someone missed it on the previous page:
    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
  • Ged
    Offline / Send Message
    Ged interpolator
    showed shaderforge to some work mates today(we make unity games for mobiles) and they seemed to like it, the progress is amazing so far and its pretty easy to use, well done! Are there any plans to make it easy for someone to develop mobile friendly shaders?
  • Ga2Z
    Offline / Send Message
    Ga2Z polycounter lvl 7
    Now I know what I want for christmas!!!
  • Obscura
    Offline / Send Message
    Obscura grand marshal polycounter
    Hi. Im lurking here for a long while now, but this time I write somethings here, because "we" got "actual interest" in this. It looks like we will pay in for the full version of Unity, and I have a few questions. Maybe some of the answers has been mentioned here earlier, and I just dont see them, or maybe Im lazy to search (sorry), but what will be the cost of the finished version? And when it will be released? Could we get/how could we get a beta version? As I see, It will be better than the UDK one, just saying :) Keep it up, very impressive work !
  • StaticTheFox
    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

    http://www.youtube.com/watch?feature=player_detailpage&v=89GSVzgEHew#t=39

    That is all.
  • Shrike
    Offline / Send Message
    Shrike interpolator
    Wow nice, love the changes

    Im just struggling with lightmaps, Im not sure what to do exactly to use custom lightmaps in my shader like I would with the legacy ones
    Unity dosnt seem to process lightmaps well, so I would bake them offline and put them into unity, but where to put them in ?
  • Acegikmo
    Ged wrote: »
    showed shaderforge to some work mates today(we make unity games for mobiles) and they seemed to like it, the progress is amazing so far and its pretty easy to use, well done! Are there any plans to make it easy for someone to develop mobile friendly shaders?

    The currently planned mobile-ish feature that's coming in the first release is vertex lighting. Other than that, you can do unlit shaders as well, but currently most things are done in the fragment shader, which can get expensive on mobiles. I would love to make an advanced mode, which splits shaders into vert/frag, in order to be able to make the shaders as optimized as you want, but that will have to wait for a post-release update.
    So yes, you can make mobile shaders, but if you make them complex, they're probably going to be too expensive.

    Obscura wrote: »
    Hi. Im lurking here for a long while now, but this time I write somethings here, because "we" got "actual interest" in this. It looks like we will pay in for the full version of Unity, and I have a few questions. Maybe some of the answers has been mentioned here earlier, and I just dont see them, or maybe Im lazy to search (sorry), but what will be the cost of the finished version? And when it will be released? Could we get/how could we get a beta version? As I see, It will be better than the UDK one, just saying :) Keep it up, very impressive work !

    1. Most likely $100, might change though, but that's the current plan!
    2. It will be released, I would guess, in about 1-2 months? (Might change, not sure. My schedule is a bit tight at the moment, not sure how much time I can dedicate to Shader Forge)
    3. The first post has alpha/beta signup info

    Shrike wrote: »
    Wow nice, love the changes

    Im just struggling with lightmaps, Im not sure what to do exactly to use custom lightmaps in my shader like I would with the legacy ones
    Unity dosnt seem to process lightmaps well, so I would bake them offline and put them into unity, but where to put them in ?

    Plug your lightmap texture into emission, and use UV1 as coordinates. It won't support directional lightmaps though!
  • RealArt
    hi
    i us foundry mari for texturing Often than i have Question:
    1_can i import multytile texture and us? if yes how i can?
    85277860373379466018.jpg



    _can i import flow map from MARI and Implementing in shader forge? if yes how i can?
    example:
    http://www.digitaltutors.com/tutorial/1322-Implementing-a-Flow-Map-Fluid-Pipeline-between-MARI-and-UDK
    [ame="http://www.youtube.com/watch?v=d57VosfgRJg"]What's new in MARI 1.6 - YouTube[/ame]

  • dirtyhairy
    Offline / Send Message
    dirtyhairy polycounter lvl 12
    Hi!
    Really awesome looking tool you are creating here! Does this work with Marmoset Skyshop and Physically Based Rendering materials?
  • Acegikmo
    @RealArt: Sure, you can make flowmaps in Shader Forge! There's no example shader of it yet, but there will be :) As for that multi-texture UV thing - it should work assuming Mari will export things in a sensible format, and you put it together the way Mari expected in SF :)

    @dirtyhairy: Yes, you can use the cubemaps that Skyshop generates, and there's a built-in physically based lighting mode as of Alpha 0.14!
  • Ged
    Offline / Send Message
    Ged interpolator
    Acegikmo wrote: »
    The currently planned mobile-ish feature that's coming in the first release is vertex lighting. Other than that, you can do unlit shaders as well, but currently most things are done in the fragment shader, which can get expensive on mobiles. I would love to make an advanced mode, which splits shaders into vert/frag, in order to be able to make the shaders as optimized as you want, but that will have to wait for a post-release update.
    So yes, you can make mobile shaders, but if you make them complex, they're probably going to be too expensive.

    Thats cool, yeah I guess its just hard to know when youre going too far , is there a set limit on instructions or something that could be made obvious or is it just a trial and error thing?
  • Acegikmo
    I don't know any numbers in particular, and it also depends on which device you're targeting, how many shaders you've got in the scene, how many draw calls you have, and so forth. I would do benchmarks per-project, and use them as a reference for the cost of instructions :)
  • Shrike
    Offline / Send Message
    Shrike interpolator
    The energy conserving gloss looks so much better then the old specular model.
    You also use a blinn-phong model now in PBL for the specular right ? Really noticeable difference, nice! (no idea what im talking about, reading all those PBL pdfs, its like a giant puzzle haha)

    I just seem to not be able to use texture input in the glossyness node. I also checked my old shader, and It just ejected itself there. How can I control different areas of glossyness now ?
  • Acegikmo
    Shrike wrote: »
    The energy conserving gloss looks so much better then the old specular model.
    You also use a blinn-phong model now in PBL for the specular right ? Really noticeable difference, nice! (no idea what im talking about, reading all those PBL pdfs, its like a giant puzzle haha)

    I just seem to not be able to use texture input in the glossyness node. I also checked my old shader, and It just ejected itself there. How can I control different areas of glossyness now ?

    Glad it looks better, and yes, it's a Blinn-Phong PBL :)
    And that issue is strange - Could you explain what happens?
    Also, it might be that Gloss no longer accept RGB input, and needs a single value, in which case you can simply drag your R channel from the Gloss map, instead of RGB.
  • Shrike
    Offline / Send Message
    Shrike interpolator
    I just started a new shader, and tried using the gloss the classical way with a texture node, and it just wont connect, that with the red channel seems to work

    One thing, since I use the new version, I have a long delay after pressing play until it starts, around 7 seconds , which was instant before , something seems to have problems there

    Also is there any example shader with a fresnel reflection + texture mask or similar ? Im just not getting it done right
    For Suggestions: Inverted fresnel would be nice and copy-pasting nodes would be really helpful
  • Acegikmo
    Shrike wrote: »
    One thing, since I use the new version, I have a long delay after pressing play until it starts, around 7 seconds , which was instant before , something seems to have problems there

    The compile time has to be something unrelated. Are you sure a shader just hadn't finished compiling when you press play?
    Shrike wrote: »
    Also is there any example shader with a fresnel reflection + texture mask or similar ? Im just not getting it done right
    For Suggestions: Inverted fresnel would be nice and copy-pasting nodes would be really helpful

    Texture mask in what way? For faking cubemap reflections?

    Copy/paste/duplicate is planned :)
  • McWild
    New version looks SO sick! Is there an ETA for toon outlines?
  • Acegikmo
    I haven't planned to make the outline input before release, but it might be possible. It should be trivial to add, but right now I should prioritise fixing bugs and finishing the last most important features for the coming beta :)
  • MrNinjutsu
    Offline / Send Message
    MrNinjutsu greentooth
    Fantastic work so far on this Acegikmo! Not sure if you have mentioned yet but eta on release on this?
  • Acegikmo
    Thanks! I would guess about 2 months :)
  • MrNinjutsu
    Offline / Send Message
    MrNinjutsu greentooth
    Fantastic! I'd happily put money down now for it :D I look forward for the release.

    Edit:

    I was curious how you achieved the fake sss that you achieved here? WrapSSS.jpg
  • Acegikmo
    It's a red-ish color in the light wrapping input :)
  • MrNinjutsu
    Offline / Send Message
    MrNinjutsu greentooth
    Well don't i feel goofy now haha!
  • RobH
    Offline / Send Message
    RobH polycounter lvl 18
    I wanted to say thank you for such wonderful shader editor! I'm enjoying what I have seen thus far.

    I do i have one question. I apologize if this has already been asked, I searched and didn't find much on it. I'm wondering if there will be any support for dynamic reflections. Kind of like what we see in Unity pro water.
  • Bug
    Hey Acegikmo, don't know if someone asked yet, but considering the potential that this tool has, in creating shaders, would it also possible to bake shaders in maps to get similar output on platforms that are slower and cannot use many per-vertex per-pixels insstructions. Baking and selecting faster performing shader with a comparison tool to see what changes using realtime vs baked output of the same shader with same preview illumination.

    Also could be possible to enable some kind of Dynamic Tesselation with accompanying scripts, that would be awesome.
  • Acegikmo
    Possibly, but it will be of low priority, as other features seem more important.
    Tessellation is possible already though, and yes, I'll provide examples :)
  • Bug
    Acegikmo wrote: »
    Possibly, but it will be of low priority, as other features seem more important.
    Tessellation is possible already though, and yes, I'll provide examples :)

    Cool that tesselation is there, I would like to know if some kind of tessellation is available or will be outside of the DX11 restriction, my main platmform of testing would be Shader2/3 Model, Opengl engines.
  • Acegikmo
    Bug wrote: »
    Cool that tesselation is there, I would like to know if some kind of tessellation is available or will be outside of the DX11 restriction, my main platmform of testing would be Shader2/3 Model, Opengl engines.

    It's currently not possible with OpenGL, and will most likely take a while too, according to Aras, a graphics developer at Unity:
    http://forum.unity3d.com/threads/163252-Unity-4-tessellation-on-mac-how-it-work
  • Bug
    A question, looking to some of your screenshots, I see you implemented in your main shader, the Refraction input, how does it work, I remeber the Refraction shader implemented in the Unity Water Pro, which clips everyhing under the water level, renders from the camera POV then distort it to simulate refraction index, all of this by using the RenderToTexture feature in Unity Pro, how does refraction shader will work instead ? Would it work with standard non Pro Unity ?
  • Acegikmo
    Bug wrote: »
    A question, looking to some of your screenshots, I see you implemented in your main shader, the Refraction input, how does it work, I remeber the Refraction shader implemented in the Unity Water Pro, which clips everyhing under the water level, renders from the camera POV then distort it to simulate refraction index, all of this by using the RenderToTexture feature in Unity Pro, how does refraction shader will work instead ? Would it work with standard non Pro Unity ?

    You need to use Pro in order to use refraction in Unity, because it does require RTs, which Free doesn't support.

    The refraction shader in SF renders the scene and projects it onto the mesh, then distort it in screen space :)
  • solarnoise
    Offline / Send Message
    solarnoise polycounter lvl 3
    Shaders made with SF don't appear to be compatible with Unity's Material.SetTextureOffset function.

    I tried adding o.uv0 = TRANSFORM_TEX(v.texcoord, _MainTex);
    to the vert program but I'm getting undeclared identifier compile errors. My main diffuse is "Main Tex".

    Is there a way to make SF's shaders compatible with offset/tile values?
  • Acegikmo
    That is a planned feature for the coming beta 0.15 :)
  • solarnoise
    Offline / Send Message
    solarnoise polycounter lvl 3
    Acegikmo wrote: »
    That is a planned feature for the coming beta 0.15 :)

    Great! I'm always looking forward to the next release.
  • solarnoise
    Offline / Send Message
    solarnoise polycounter lvl 3
    Acegikmo,

    When I set the lighting to Unlit, the checkbox for Lightmap Support grays out... I would still like to factor in lightmaps to my unlit shaders.

    Do I have to manually use them in my node setup (multiply the output by them or something?) How would that work? I don't see a node for accessing the lightmap.

    Sorry if this is a dumb question =)
  • Acegikmo
    solarnoise wrote: »
    Acegikmo,

    When I set the lighting to Unlit, the checkbox for Lightmap Support grays out... I would still like to factor in lightmaps to my unlit shaders.

    Do I have to manually use them in my node setup (multiply the output by them or something?) How would that work? I don't see a node for accessing the lightmap.

    Sorry if this is a dumb question =)

    That's a good question! Could you request a lightmap node on UserEcho? :)
    It's most likely going to be done post-release, but it should be done
  • Polynaught
    Offline / Send Message
    Polynaught polycounter lvl 11
    If there's still room for one more tester I'd like to join in. I am currently working in a small team where a tool like SF might come in handy to quickly prototype shaders.
  • RealArt
    hi Again
    can i create Terrain shader with SF?
  • Acegikmo
    You can create pretty much whatever you want with it, including terrain shaders :)
  • RealArt
    Amazing
    how can create terrain shader and paint texture on terrain?
    like this
    [ame="http://www.youtube.com/watch?v=bCH1Ciy05_A"]UDK Tutorial: Landscape Editor + Texture Painting - YouTube[/ame]

    i must use TerrainPaint2.0 for paint on terrain?
    please explain more

    Sorry i ask a lot of questions
    we went start a big project by unity i need to make sure Until to use unity
    thank you very much
  • Acegikmo
    You can either use Unity's built-in terrain system and apply a shader on that, or use a terrain plugin, which you should be able to find in the asset store :)
  • anoon
    I am trying to create a shader that transitions from one map to another based on a clamped gradient texture.

    The following graph seems to function correctly in the graph view, but does not work on the preview model, or on the model in my project.

    Also, how do I get rid of the chromatic fringing on the edges of the black and white areas?

    One more thing: doesn't the power argument of 0.01 seem odd?

    blend_mask_shader_01.PNG
  • Acegikmo
    Strange. How about using the Round node instead of Clamp & Power?
  • anoon
    Thanks for the response.

    I quickly subbed in a Round for Clamp and Power, and that caused the image to appear on the preview geometry, however, I need to animate the transition, thus the need for the Clamp.

    Also, still have the green/purple fringing happening.

    Thoughts?
  • Acegikmo
    anoon wrote: »
    Thanks for the response.

    I quickly subbed in a Round for Clamp and Power, and that caused the image to appear on the preview geometry, however, I need to animate the transition, thus the need for the Clamp.

    Also, still have the green/purple fringing happening.

    Thoughts?

    The fringing is probably due to compression errors, try using the R channel of the texture instead of RGB, that way it will only use one of its channels as a grayscale value
  • robert.briscoe
    Offline / Send Message
    robert.briscoe polycounter lvl 8
    Have you tried using a round after the clamp instead of a power node? also try clamping the final output between 0-1
  • anoon
    The fringing is probably due to compression errors, try using the R channel of the texture instead of RGB, that way it will only use one of its channels as a grayscale value

    I gave this a try. Oddly enough, the output in the node thumbnails is red. Shouldn't it be greyscale? I am thinking there might be something going on with the output of the Clamp component.
    Have you tried using a round after the clamp instead of a power node? also try clamping the final output between 0-1

    I did, thanks. No such luck. Seems like anything coming out of the Clamp node is no bueno by the time it hits the geometry for rendering.
  • Acegikmo
    anoon wrote: »
    I gave this a try. Oddly enough, the output in the node thumbnails is red. Shouldn't it be greyscale? I am thinking there might be something going on with the output of the Clamp component.

    Cool, you found a bug then! Could you report it on UserEcho?
  • anoon
    Cool, you found a bug then! Could you report it on UserEcho?

    Posted!

    FWIW: I found a combination of nodes that work with the particular texture I am using for my noisy blend mask, but it is very specific to that texture. That texture is very low contrast; I'd like to be able to use a gradient map that runs from full white/black.

    blend_mask_shader_02.PNG
  • AlecMoody
    Offline / Send Message
    AlecMoody ngon master
    Beyond just having IBL functions, more complete skyshop integration would be very useful. For example, in some of our games we animate the sky object or make changes to the exposure settings. Also, skyshop has a unique way of handling cubemaps for specular and I think their HDR implementation isn't standard. Lastly, one nice thing about skyshop is the color management is tied into unity correctly so I know im not mixing linear and gamma space files.
  • GILBoY
    Offline / Send Message
    GILBoY polycounter lvl 6
    this is just amazing I would love to try this material editor, What i have to do to prove it?
1568101121
Sign In or Register to comment.