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 'Assets and Asset Store' started by Acegikmo, Jan 11, 2014.

  1. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,083
    So you're going to be a petulant child who blames everyone else for their poor purchasing skills?
     
  2. bmccall1

    bmccall1

    Joined:
    Jul 28, 2013
    Posts:
    120
    That's an ingenious way to get me to not make sure no one else exhibits "poor purchasing skills".

    Classy retort. You do also realize that this thread is the public image of the asset right? That people who research the asset will likely come here? Is this really the image of the asset you want to present to possible purchasers?

    Take someone expressed mild disappointment over something and turn them into a vehement enemy of the product?

    You do not have a future in sales, friend,
     
  3. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,083
    The page literally tells you that this feature is not yet implemented. Shader Forge is a beta product. You are buying an incomplete product that is not feature complete. You were told this by the store page you admitted to not reading. This is nobody's fault but your own and you are throwing a tantrum when you even admitted it was your own fault.

    You say there should have been a warning bell? THERE WAS ONE.
     
  4. bmccall1

    bmccall1

    Joined:
    Jul 28, 2013
    Posts:
    120
    I don't think there is anything wrong with just making sure that other people don't make the same mistake that I made. I'm not slandering the product.

    The product is in the top 10 highest grossing and top Paid Editor Extensions on the asset store. People should be informed and not make the same mistake I did.

    I would imagine you are fully behind people not behaving as impulsively, petulantly as I have due to my own self imposed misinformation. I simply want to prevent others from being "at fault" from "poor purchasing decisions".

    Thank you for all your help today. I don't know what association you have with the asset creator, but I am certain he's thrilled with where you took this thread and your insistence on furthering this level of discourse. I hope my tantrum can warn others of my mistakes.
     
  5. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,083
    You really want to do this? Okay.

    Here's a picture of my first reply.



    Note how all I do is quote the store page. In this post, I point out to you exactly what the warning bell is. The thing you're trying to warn people about? It's actually on the store page. They've been warned in advance and so were you.

    That's actually slander! There wasn't any false advertising or lying. This was a demo that he made in an early alpha of Shader Forge. There's no deception here. This wasn't even used as "advertisement" but was something that was posted in an early WIP thread where he was basically going "hey, here's a thing I made."

    You then made a ridiculous analogy about going to McDonalds and not getting meat in your burger, but, again, you got everything you were told you'd get on the store page.
     
  6. bmccall1

    bmccall1

    Joined:
    Jul 28, 2013
    Posts:
    120
    Good talk. I'm glad we did this.
     
  7. Marco-Sperling

    Marco-Sperling

    Joined:
    Mar 5, 2012
    Posts:
    620
    Guys please calm down. I can totally understand how bmccall1 may have felt when he found out spherical lights were not in as a sample although they were shown in a neat video alongside some nice reflections on the floor.
    As is clear he should have read the shop page more carefully... but the emotions are real and it may feel like fraud to him. That has to be respected in any discussion, Murgilod.
    Please don't call someone to be "at fault" when a person made a false decision based on two things:
    Presumptions that were evoked by advertisement (which the video does - it has the effect of ads, no denial) on the one side and not reading the footprint carefully enough before buying on the other side.

    Maybe Ace should put a more prominent disclaimer at the start of the video. Not only in the info or comments field, not only in the shop description but right on top the first frames. Something like a: "in development feature" watermark
     
  8. Acegikmo

    Acegikmo

    Joined:
    Jun 23, 2011
    Posts:
    1,294
    Sorry if it was misleading - I'm not lying anywhere though; the effect *was* done in Shader Forge, it's just not a built in effect. It's a shader like any other. There's no built-in water functionality in Shader Forge either, but you can make water shaders in it.
    The spherical area lights was just a showcase of what you can do, given enough time researching the vector math behind it, and using the custom lighting functions in SF :)

    If you still want a refund, you should be able to contact the Unity asset store folks
     
  9. bmccall1

    bmccall1

    Joined:
    Jul 28, 2013
    Posts:
    120
    Acegikmo, don't worry man. I don't want a refund. The asset is really nice. I am using it in my game.

    I still maintain you should have a tutorial at at least a screenshot of the node creation you used to get the effect, since it was a big part of why I bought the asset, but it would be disingenuous to want a refund since I actually use the tool a lot.

    I had a lengthy reply typed out to murligod about the fact that I wasn't explicitly calling "you" a liar, but that it could be construed as that type of falsification... But I deleted my whole post because I called murligod a bunch of names along with it, and I didn't feel like getting banned this week.

    The whole thing is silly, that some guy decided to start a yelling match with a person who bought your asset and enjoys it. (Shakes head)

    Anyway, keep on keeping on.

    As for some stuff that I think would really help the asset out, more sample nodes, even with absolutely no explanation would be great, just because I think people learn by seeing a desired effect and tweaking it.
     
    Last edited: Jul 3, 2014
    yezzer likes this.
  10. CaptEatbones

    CaptEatbones

    Joined:
    Feb 7, 2014
    Posts:
    5
    Hello there,

    I updated the plugin to the last version and I got this error message everytime I lancuh Unity and open the project I'm working on using Shader Forge:

    NullReferenceException: Object reference not set to an instance of an object
    ShaderForge.SF_Evaluator.Evaluate ()
    ShaderForge.SF_Editor.OnDisable ()
    UnityEditor.EditorWindow:Close()
    ShaderForge.SF_Editor:Update()
    UnityEditor.EditorApplication:Internal_CallUpdateFunctions()


    It seems not to be affecting the overall use of the plugin nor the project but I'm wondering if it's something serious.

    have a nice day.

    Michele
     
  11. Project-Mysh

    Project-Mysh

    Joined:
    Nov 3, 2013
    Posts:
    223
    Hi Acegikmo,

    Im trying to build a vegetation bending shader based on vertex colors + wind direction.
    Im very noob at this point, but i cant find documentation for this ( I have been searching in UDK examples too ). The problem is that i cant make the vegetation bend to the same direction (Wind direction) with this setup: sf_mysh_vegetacion_742014.png

    I dont know how to use the World Position to calculate the wind direction based in the object position-rotation. With this setup, rotating the models change the wind direction...

    Can you help me with some advice?

    Thank you very much!
     
  12. J_P_

    J_P_

    Joined:
    Jan 9, 2010
    Posts:
    1,027
    Possible to ignore directional lights while still respecting point lights (without relying on layers)?

    And what values does LightAtten provide? I'm trying to use it as a lerp T value (I hoped it would return 0 if no lights and 1 if full attenuation), but it's not having expected results.

    edit: I may have found a bug with Lerp node: http://shaderforge.userecho.com/topic/470546-/

     
    Last edited: Jul 5, 2014
  13. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,083
    You have it slightly backwards. Attenuation is the reduction of power, not the amplification of it. At 0 attenuation, you're basically right at the centre of the light; while at 1 attenuation, you're as far from the light source while in its range as you can get. I believe the formula itself is this

    Code (csharp):
    1. 1.0 / (1.0 + 25.0 * r * r)
    edit: make sure you test how it looks in the scene. Since you can't change the parameters of the light in the viewport window in SF just yet, it sometimes yields unreliable results when it comes to attenuation.
     
    Last edited: Jul 5, 2014
  14. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    You need to use the local vertex position instead of world position for your bending. This, unfortunately, is not exposed in Shader Forge, but you can use the code node to grab it as shown a page or two back in this thread.
     
  15. Acegikmo

    Acegikmo

    Joined:
    Jun 23, 2011
    Posts:
    1,294
    Shader Forge Beta 0.36 is now out!
    • Nodes such as the Normal Direction node and the View Direction node, now have a visual representation instead of being black
    • The internal assets of Shader Forge are now no longer in a Resources folder

     
  16. Project-Mysh

    Project-Mysh

    Joined:
    Nov 3, 2013
    Posts:
    223
    I have been sarching 10 pages ago and there is no code about that.
    The code could be:
    float3 localPos = v.vertex.xyz;
    return localPos;
    ???
    Im not a shader coder, i had been using UDK material system for 2 years only..

    Using the transform node to transform from world to local doesnt work for me, maybe im doing something worng..

    EDIT: The solution its to use the transfrom node at the end of all the node three for "position offset". From world to local. This fix it.
     
    Last edited: Jul 6, 2014
  17. J_P_

    J_P_

    Joined:
    Jan 9, 2010
    Posts:
    1,027
    Thanks, though Shader Forge doesn't seem to treat it that way.



    With this, it's whiter (closer to 1) when closer to the light and darker (closer to 0) farther away.
     
    Last edited: Jul 6, 2014
  18. Project-Mysh

    Project-Mysh

    Joined:
    Nov 3, 2013
    Posts:
    223
    Doesnt seem to be in the store to download.
     
    wsz likes this.
  19. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,083
    I think it's just labelled incorrectly. I downloaded it yesterday and internally it says 0.36 but the store page says 0.35?
     
  20. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,083
    Huh, this is weird and might explain some issues I've been having.

    SHRUGS FOREVER.

     
  21. Acegikmo

    Acegikmo

    Joined:
    Jun 23, 2011
    Posts:
    1,294
    I have no idea why it's like that, it's not the first time. I double-checked all versioning numbers before submission. Ah well!

    Also, I think this may be helpful for some - a custom phong shader with Diffuse, Spec, Gloss slider, Color tints and ambient light, all in a complete custom lighting setup :)

     
  22. Antonov3d

    Antonov3d

    Joined:
    Jun 23, 2014
    Posts:
    1
    Hi guys im getting a bug with 0.36 and unity 451f3
    each time i go to standard shader > edit > convert to shaderforge
    i get the shaderforge UI that is partially loaded and stuck,
    nothing is clickable you cant move it's window and i have to restart unity to get rid of it.
    Any ideas?
     
  23. Acegikmo

    Acegikmo

    Joined:
    Jun 23, 2011
    Posts:
    1,294
    Are you getting any errors in the console?
    Did you delete the old SF installation before installing the new one?
     
  24. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,083
    I'm working on a planet shader and I've discovered a weird bug.



    This is the node structure I'm using so that, depending on the view angle, you can see a little bit of parallax of the surface clouds and it works great!

    HOWEVER, it seems that the panner doesn't accept vector2 inputs by default? In order to get it to connect, I need to plug a float into the multiply node where the screen pos. node is, connect it that way, and then plug the screen pos. node in.
     
  25. DaDarkDragon

    DaDarkDragon

    Joined:
    Jun 6, 2013
    Posts:
    115
    Replace uv coords with screen pos and screen pos with time. Dist in the panner is speed mod(or offset without time node) and a float value not a vector2.

    Just curious, what are you trying to acheive with this part?
     
  26. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,083
    https://dl.dropboxusercontent.com/u/50465445/WEB/WEB.html

    I need horizontal and vertical offset. Basically, depending on the view angle of the planet, you'll be able to see more underneath the clouds. If you look at the top/bottom or side to side here, you can see the shadows under the clouds which adds a nice little parallax.
     
  27. Amnoon

    Amnoon

    Joined:
    Jul 20, 2013
    Posts:
    31
    Hi! i really love shader forge and i am testing some custom lightning material. I want to achieve this light effect but with the the filosophy of this basic shader down below. When i try the shader that you posted, it work well but there is no gradient if you turn the object or the light. So i am trying to mix both but i don't achieve it.

     
  28. CaptEatbones

    CaptEatbones

    Joined:
    Feb 7, 2014
    Posts:
    5
    Hello,

    I'm having troubles in updating Shader Forge to the last version. I tried to delete the old installation, import from the asset store but when I launch SF it tells me that it's still the 0.35. I had no issues when updating from the 0.34 to the 0.35.

    Any idea?

    Thanks in advance :)
     
  29. Amnoon

    Amnoon

    Joined:
    Jul 20, 2013
    Posts:
    31
    Ey i have achieved a nice result based in what i was looking for but i have a fresnel problem. i don't know if i am not using it in the right way or if this is normal:

     
  30. redcap

    redcap

    Joined:
    Jul 5, 2012
    Posts:
    53
    New user here and just have a few questions that I really can't find the answer too, inspite doing searches online for over an hour.

    First, I can't seem to update to v.36 I deleted Shader Forge from my project and tried and fresh reinstall from the Asset Store and it is still .35 I checked to see if the Dot Product view was changed, but it is just black, so I must be still using .35


    Second: I can't seem to get the refraction node to word like in the node documentation. Is there any resource showing a good refraction node tree?
     
  31. Tony_Beretta

    Tony_Beretta

    Joined:
    Aug 6, 2012
    Posts:
    17
    I need the same effect.
    I have made a lot of tests but them work for simple shapes like sphere and cube, but without good results on complex meshes like cars.
    All nodes with "view vectors" give distortions but I need that the texture remains flat.

    Immagine8.jpg

    In short I need a kind of cubemap, with horizontal and vertical offset but without the distortion.

    Someone can help?

    P.S.
    Should not necessarily be a cube map, a simple flat texture is enough, indeed it is better.
     
    Last edited: Jul 9, 2014
  32. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,083
    Do you have per-pixel screen coordinates disabled? This looks similar to a problem I was having a while ago.
     
  33. Tony_Beretta

    Tony_Beretta

    Joined:
    Aug 6, 2012
    Posts:
    17
    Already tested but it not makes difference.
    Perheps the texture deformation depends by transformation from Vector3 to UV, but I don't know which is the better way to do it.
     
  34. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    You don't want a cube map, you want a planar projection. This is really easy to do; just use two components of the vertex position for the UV coordinates when doing your texture mapping.
     
    blhilkene likes this.
  35. Yoshify

    Yoshify

    Joined:
    Feb 26, 2013
    Posts:
    4
    Hi there! I believe this is what you're looking for? It's better to Add fresnel rather than Multiply.
     

    Attached Files:

  36. sundance

    sundance

    Joined:
    Mar 19, 2014
    Posts:
    52
    Hi i have question, im trying to make anisotropic specular shader and i use udk example but it works extremly bad... Link to example:
    My screen:
    And i cannt make true outputs after cross poducts nodes...
    Any ideas?
     
  37. Amnoon

    Amnoon

    Joined:
    Jul 20, 2013
    Posts:
    31
    Thanks for the advice i will test it right now.
     
  38. Tony_Beretta

    Tony_Beretta

    Joined:
    Aug 6, 2012
    Posts:
    17
    Ok, but how?
    With a couple of sliders it's simple, it's exacly what I need but obviously useless.

    Sliders.png

    When I use any other node, for example View Direction, View Reflection or Screen Position, the texture comes out skewed.
     
  39. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461

    No, you don't want to use UV coordinates or sliders at all. Just take the WorldPosition node and plug it's output into the UV coordinates input on your textures - this will use the .xy coordinates of your vertices as the UV coordinates. You can use the other combinations (.xz, .yz) to get the other projections.
     
  40. DMeville

    DMeville

    Joined:
    May 5, 2013
    Posts:
    418
    First off, shaderforge is amazing. Best asset store purchase ever! It turns making shaders from a huge scary task, to something fun! :D

    I've been trying to come up with a way to make an outline on a 2D polygon (testing with a quad for now, but want to use it on arbitrary polygons). While throwing a value into the Outline slot works great for 3d geometry, on a flat piece it doesn't work so well.

    My understand is it expands the shape along it's normals and fills it with the outline colour, and a default quad has normals facing forward so it doesn't give desired results. However, I thought if I modify the normals to face outward that would work..

    I did some testing, and it almost worked, but the outline was only visible when viewing the quad from behind. (See the gif here: http://i.imgur.com/BPFiAcq.gif)

    Is there somewhere or somehow I can change this, and simply "flip" the outline so it faces the same direction?
    I've tried inverting the normals so they face inward, and all kinds of wacky angles but nothing gives the results I'm looking for.

    I did notice though, if I change Face Culling from backface to Double sided, make the normals face SLIGHTLY back (to prevent z-fighting) and then flip the polygon's transform things work, but it seems like a really messy workaround (which I'm okay with) but I was curious if there was a proper, better way to do this?

    Keep up the great work!
     
    Acegikmo likes this.
  41. redcap

    redcap

    Joined:
    Jul 5, 2012
    Posts:
    53
    Still can't update to v.36 anyone else having this issue; or know how to fix it?
     
  42. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,083
    UE3/UDK handles its Vector3s in tangent space, whereas Shader Forge handles them in world space. Stick a transform after your Vector3 nodes and convert them from tangent to world and you should get more accurate results.
     
    sundance and Acegikmo like this.
  43. Amnoon

    Amnoon

    Joined:
    Jul 20, 2013
    Posts:
    31
    There is some node to see the wireframe of an object?
     
  44. Acegikmo

    Acegikmo

    Joined:
    Jun 23, 2011
    Posts:
    1,294
    Thanks!

    There's no way of doing that built-in in SF at the moment, but you could open up the shader code, and change the outline pass to have backface culling rather than frontface culling, or vice versa :)
     
  45. DMeville

    DMeville

    Joined:
    May 5, 2013
    Posts:
    418
    WONDERFUL!!! This works perfectly!
    I'm still pretty new to shaders and that's something that never even crossed my mind. Thanks a million!
     
  46. Tony_Beretta

    Tony_Beretta

    Joined:
    Aug 6, 2012
    Posts:
    17
    Thanks for reply but I have already tested the World Pos. node too but doesn't work.
    Transforming it with a Transform node from world to view I almost get what I need, but there is a lot of distortion when I rotate the meshes because the z axis and I don't know how to fix it.

    Excuse me for my poor english, it's not my language.
     
  47. MaxvH

    MaxvH

    Joined:
    Oct 31, 2012
    Posts:
    5
    Hi,
    Is it possible that you could add an include node so that we can access our functions from our include file in the code node without doing it manually after the shader is compiled?
    Thanks,
    Max
     
  48. sundance

    sundance

    Joined:
    Mar 19, 2014
    Posts:
    52
    Thx! It works.
     
  49. Acegikmo

    Acegikmo

    Joined:
    Jun 23, 2011
    Posts:
    1,294
    JoshuaK and MaxvH like this.
  50. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,290
    One question

    Is it possible to include the refraction shader without preview and with only some texture scaling in my Particle Dynamic Magic pack, for water effects ?

    I dont have the means to test it in Pro yet, so the question is

    - can i include it for selling in my pack, with only minor modification ?

    - does it matter that i use Unity Free ? Will it still work for those that use Unity Pro ?

    Thanks