Search Unity

Help Wanted Multiply node previewing as a square? And shader not saving?

Discussion in 'Shader Graph' started by Yoreki, Sep 2, 2019.

  1. Yoreki

    Yoreki

    Joined:
    Apr 10, 2019
    Posts:
    650
    Hi everyone,
    i just had my first look at the Shader Graph and ran into problems. To get a feel for it, i was trying to create very simple shaders for learning purposes. According to images / videos i saw online, when connecting for example the multiply node to an effect, like fresnel, then the preview in the multiply node should also be this "material-sphere". For me it's just a black box. Or rather a very zoomed in square preview, since i can see some changes when adjusting the fresnel effect to extreme levels.

    multiplySquare.png

    As you can see in the main preview the changes still get applied to the master. I'd just like the multiply node to show a similar preview to the fresnel effect or main preview, which is what i saw in videos. As it is now it kind of feels absolutely useless and i'm not sure what i'm doing wrong.

    Also; is there a save button i'm missing? Because even after pressing ctrl+s, when i close Unity and start it again the shader graph is back to being empty.

    More-or-less-solved Edit: While ctrl+s did not work, saving with the hard to spot button at the top left of the window works.
    As for the multiply preview, in some videos, like below, it's shown as the material preview, while in others it's just a square.
    If anybody knows why it's sometimes a square and sometimes the material preview, i'd still love to know that. I believe i'm doing pretty much the same here. Was it changed in a recent version? I believe the material preview was way nicer if that's the case:
     
    Last edited: Sep 2, 2019
  2. alexandral_unity

    alexandral_unity

    Unity Technologies

    Joined:
    Jun 18, 2018
    Posts:
    110
    There was a bug in some versions where the preview was broken. The intended behavior is that some nodes are 2d squares by default and some are 3d objects, and the 2d preview nodes should inherit the 3d object if a 3d preview is upstream. Some versions don't have that behavior, but it should be fixed in the latest available versions in 2019.x editor versions.
     
  3. Yoreki

    Yoreki

    Joined:
    Apr 10, 2019
    Posts:
    650
    I'm using the 2019.1.8f1 version, which is where the problem occured. I originally worked on an older project (but with the 2019.1.8f1 editor) which is where the above problem occured. I then created a new project with the LWRP preset and it worked better, even tho it was still a 2D-representation on the multiply node. If i remember correctly tho, i believe it was at least not fully black using the same shader graph.
     
  4. arcitek

    arcitek

    Joined:
    Nov 5, 2019
    Posts:
    1
    Trying to learn some Unity Shader creation after working with Unreal for awhile. I am using 2019.2.11 and this issue of no preview that Yoreki mentioned is still occurring which is getting frustrating. It appears we were working on the same tutorial.
     
  5. ThreeRing

    ThreeRing

    Joined:
    Aug 24, 2016
    Posts:
    14
    Any news on this issue? I'm facing the same problem as well...
     
  6. bjarkeck

    bjarkeck

    Joined:
    Oct 26, 2014
    Posts:
    257
    I have a Custom Function node, ported it to a subgraph where all node previews are 2d, however when I use the subgraph as a node, it shows the preview as a sphere. Is there any way I change that to show a 2d preview?

    I'm on the latest ShaderGraph package and latest Unity 2019.3.0f3
     
    Last edited: Jan 10, 2020
  7. alexandral_unity

    alexandral_unity

    Unity Technologies

    Joined:
    Jun 18, 2018
    Posts:
    110
    Subgraphs will always use the 3d preview by default and there's no current exposed way to change that. It's been asked for before and we hope to address it in the future but we've got some other things in the pipeline taking a higher priority at the moment. c:
     
  8. alexanderameye

    alexanderameye

    Joined:
    Nov 27, 2013
    Posts:
    963
    You can change it in Editor>Data>Nodes>Utility>SubGraphNode (In the shadergraph package folder) on line 153 as a workaround for now if you really need it.