Unity How to create Shader Graph - Simple black & white image alpha cut (make your life easier)

Поділитися
Вставка
  • Опубліковано 27 лис 2024

КОМЕНТАРІ • 18

  • @LesDremlet
    @LesDremlet Місяць тому +1

    Many thanks bro!

    • @tannos2023
      @tannos2023  Місяць тому

      Hi LesDremlet. You are welcome
      Thanks so so much your feedback😊

  • @dertobbe1176
    @dertobbe1176 Рік тому +1

    Dude I struggled over 2 hours for a solution. I hardly tried to remap the Textur and put it in the alpha. You tell me just do contrast? Man you are awesome 😂

    • @tannos2023
      @tannos2023  Рік тому

      Thank you so much.
      I also suffered a lot with this. Image editor - lots of textures and variations. The storage space just going lower and lower. Then came shadergraph. Sometimes it's easier than creating a new texture for each model.
      I'm glad, if I could help. Have a nice day 🤗

  • @sansosea
    @sansosea 8 місяців тому +1

    excellent video as always :-) ! 🙏✌

    • @tannos2023
      @tannos2023  8 місяців тому +1

      Thank you so much Bro! 🤜💥🤛 You rock 🙏

  • @CodexOficial
    @CodexOficial Рік тому +1

    thank you bro you saved my life

    • @tannos2023
      @tannos2023  Рік тому +1

      You are welcome :)
      I am happy if this help for You.

  • @victormanuel3698
    @victormanuel3698 Рік тому +1

    Just what I needed! Thanks! Does this method only work on HRDP or also in URP?

    • @tannos2023
      @tannos2023  Рік тому

      Thanks so much your kind words!
      Sorry, I not tested under URP so have no experience in URP. But I thinks this nodes must exist and work in URP too.

  • @hairon-epic4s
    @hairon-epic4s Рік тому +1

    Thanks. Very useful.

  • @ResidentEvilReVerseUniverse
    @ResidentEvilReVerseUniverse Рік тому +2

    Very useful content keep it up ✔️🟣

    • @tannos2023
      @tannos2023  Рік тому

      Thanks. We are happy if that was useful.

  • @voiddragonvods1630
    @voiddragonvods1630 Рік тому +1

    i do not see HD RP/lit anmywhere in the shaders for unity

    • @tannos2023
      @tannos2023  Рік тому

      Hi,
      It's depend what kind of Unity project you start or use (Standard / URP / HDRP)
      In URP you can use URP Lit in HDRP you can use HDRP Lit shader. I'm not sure standard PR can handle shaderGraph editor.
      I am using Unity 2021 (21). May older versions 5X, 17, 18, 19 not contain this feature (shader editor).
      The second dependency you must installed if it missing the shader graph package from package manager. This is a part of basic unity registry packages.
      Hope this help for you. Have a nice day :)

  • @shirujsjs578
    @shirujsjs578 4 місяці тому +1

    How can I change the colors through code? tnx

    • @tannos2023
      @tannos2023  3 місяці тому

      Hi Shiru jsjs
      The Unity help is more detailed and very useful in this case
      docs.unity3d.com/ScriptReference/
      Not sure my is the best solution but maybe this small code example will help:
      _____________________________________________________
      using UnityEngine;
      public class ccolor : MonoBehaviour
      {
      //Create a basic cube, add your material and drop this script on the cube, save this script as ccolor like a class name
      void Start()
      {
      // assign the object with this script and material to the myOBJ variable
      GameObject myOBJ = this.gameObject;
      // Get the Renderer component from the myOBJ (this hold the materials)
      var myOBJRenderer = myOBJ.GetComponent();
      // Call SetColor methode using the shader property name "_ColorBase" and setting the color to red
      // "_ColorBase" is different in all shader, in my shader variant I give this public variable name to the base color
      //So You need change this reference what you give in your shader, or what your shader is use for basic coloring
      print(myOBJRenderer.material.GetColor("_ColorBase")); //just test read and inform in console
      myOBJRenderer.material.SetColor("_ColorBase", Color.red); //set the new color to red
      print(myOBJRenderer.material.GetColor("_ColorBase")); //just inform from the new color in console
      }
      }
      ________________________________________________
      Have a nice day and happy coding