Everyone Should Learn This Basic Shader Graph (Auto Tiling) - Unity Shader Graph Tutorial

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

КОМЕНТАРІ •

  • @braveseasnake
    @braveseasnake 3 місяці тому +3

    Not joke, this was incredible. I went from being scared of shaders, to intuitively modifying them in the graph. I think it's mainly because of how you showed that you don't need to know a lot to start, and improvised your way to a working solution. This is great!

  • @GammlerGameDev
    @GammlerGameDev Рік тому +5

    Thank you for this.
    I used it as a starting point and got it to work with 3D objects by multiplying the scale for each axis with the respective part of the normal vector in object space.
    So now all textures on my 3d objects get tiled correctly on all 3d objects as well and I do not need different materials for different axis.

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

      I'm glad I was able to help you get it started!

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

      how?

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

      I tried, but I don't understand how to do it :(

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

      @@PhilipHerlitzHey, can you make a video with this information? otherwise I can’t do it at all like this user, please help :(

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

      @@Keisuke_Baji if you're still interested you can repeat the method in the video for XY and YZ tiling. You then have three textures in your shader graph. Multiply each one with its corresponding normal vector using the Normal Vector node and splitting it into RGB (XYZ). So multiply R with YZ tiled texture, G with XZ tiled texture and B with XY tiled texture. You can then add those three textures and output to your base colour etc.

  • @lazydude5681
    @lazydude5681 4 місяці тому

    I'm so proud of myself because I just thought of all of this by my own, so far in the video I just had to replace the "Combine" node I was using for Vector2 since it looks like a cleaner but behavior was the same, also I got your idea for Base Color which I didn't add to my shader before, it's kinda of amazing how my ideas was basically yours like 99%, and the reason I feel like bragging about this is because I always avoided dealing with shaders for several years now, hell, technically I never learned to create shaders in shadergraph, but I finally learned how to do so in Blender and all of a sudden I saw Unity's node system simpler and intuitive. The only thing I don't like about this solution is that won't scale for meshes in the Y axis, but it's ok if one works with that limitation in mind, I guess it's only gonna be used for walls, floor, water, etc.

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

    IMPORTANT NOTE: I just realized this method isn't compatible with static batching, the reason being that the meshes get merged into a single mesh, therefore the scale resets to one (1), making all of your textures stretch again if they're in a reescaled object. Beware of this issue fellas

  • @RogerThingsChannel
    @RogerThingsChannel 8 місяців тому

    thank you very much, I needed this.

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

    I have a question regarding optimization: To take advantage of the autotiling the texture must be standalone, it means it shouldn't be on any texture atlas file with other textures (otherwise the effect is lost since it would be showing the other textures), therefore losing that optimization strategy... Is it really worth it to make, for example, three large walls each with a different texture file auto-tiling instead of putting all three textures into a single atlas and making three different meshes with different UV coordinates?

  • @MatiW
    @MatiW 7 місяців тому

    I enjoyed the video, I have a suggestion. You can use a boolean keyword to fork between the Split channels. This way you don't need to have and additional shader for the wall. Cheers!

    • @PhilipHerlitz
      @PhilipHerlitz  7 місяців тому

      Thats a great tip. Since I made this video, I have utilized that exact tip to create a 'super shader' that I can use for my entire project, so I don't need a bunch of different ones.

  • @amitbt69
    @amitbt69 6 місяців тому

    Great tutorial.
    Thanks

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

    This is in no way a tutorial if you're discovering it on the go ! 🤣 But you're right about the fact that it should be included in Unity by default.

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

      Thats kind of how my channel goes. LOL. I learn something new. And think "Hey! Others may want to know this!" So, I try showing how to do it after only doing it once before myself. I only have time to do "one take".

  • @bobosmith101
    @bobosmith101 7 місяців тому

    When do you add the specific texture to a node, or add the shader to the texture?

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

    I have that 'See-through shader' package, but couldn't find HexFloor_BW texture. Can you share it please?

  • @JayRKID
    @JayRKID 8 місяців тому

    Lovely stuff :)

  • @logwnn
    @logwnn 4 місяці тому

    huzaa!!!