Unity Tutorial for World Position Tileable Material in Shader Graph HDRP or URP

Поделиться
HTML-код
  • Опубликовано: 3 фев 2025

Комментарии • 94

  • @ryuuguu01
    @ryuuguu01 2 года назад +18

    At 14:43 instead of rotating the vector, you can just change some connections upstream. When you split the world pos. you sent G => X and B =>Y. if you flip these to G=>Y and B=>X that is the same as rotating and things will work. Great video I am using the graph as the base for my shader. For people watching this as the first Unity shader graph tutorial, I would suggest watching the video "What's new in Unity's Shader Graph?" by Unity first since they changed the names of some variables. Most importantly albedo is now called base color.

    • @FoleyX90
      @FoleyX90  2 года назад +2

      Thanks for the feedback!

  • @jean-pierrevanheerden5119
    @jean-pierrevanheerden5119 3 года назад +5

    What a great video! I am randomly generating a dungeon and this help so much with scaling of walls and floors to avoid z-fighting, works like a charm

  • @Darkblitz9
    @Darkblitz9 9 месяцев назад

    Just finished using this for a car based game I'm working on. The terrain uses an asphalt texture, and I'm using this method for the Sidewalks so that they're automatically tiled appropriately.
    It works amazingly! Some stuff has changed since your video. Using URP we go Shader Graph > URP > Lit Shader, and in the end of the graph it uses "Base Color" instead of Albedo. I managed to get it working with a bit of googling to confirm. Awesome stuff, saves a mountain of trouble and effort and only uses one material/shader to do it! Thanks!!!!!

  • @tevl3551
    @tevl3551 3 года назад +4

    I've been googling the whole "world space shader normals change color when rotated" problem off and on in varying words for weeks now. I tried merging the mesh, making an individual mesh for every rotation, making a script that detected the top vertices of each cube and made a mesh that connected them all, setting lighting source to color, then to white. Had a shader that detected rotation then rotated the inner normal image in the opposite direction to match the physical space it was in.
    I made so many scripts and learned so many things that inevitably didn't solve my problem. I was beginning to think that it was impossible to solve, then I run into this vid that solves it in the first 5 minutes.
    Thank you.

    • @FoleyX90
      @FoleyX90  3 года назад +1

      i gotchu bruv

    • @themarbleboss1268
      @themarbleboss1268 3 года назад

      @@FoleyX90 Wow! 160 likes (1 from me) and no dislikes! But you deserve more because you solved me a big problem

    • @FoleyX90
      @FoleyX90  3 года назад

      @@themarbleboss1268 happy to help, bud!

  • @hiqqoqotamus
    @hiqqoqotamus 18 дней назад +1

    Hey great video! This helped me a lot even though it is a bit old. You earn a subscription!

  • @andorgaraczi2288
    @andorgaraczi2288 4 года назад +4

    Wish you a nice day man!
    This is a very usefull and timesaver tutorial, thx a lot!
    At 14:30 the rotated uv problem, I think when you set the data from the split node to vector2, it creates an inertial frame for the uv based on the input
    So in this case, if you change the connections, G value to (Y) and B value to (X)input will solve the problem
    Anyway I added a branch node and a boolean property with the rotate node, now I have a checbox in the editor, it's a very usefull tool too
    Thx again

  • @jonathanturner8034
    @jonathanturner8034 5 месяцев назад

    I could kiss you right now! Thank you! This has saved me countless hours of googling and potentially laying out walls piece by piece.

  • @peytonpaulpro
    @peytonpaulpro Год назад +1

    Thanks pal! This was a game changer for our project! Great Video!!!

  • @Davizzard
    @Davizzard 4 года назад +1

    Couldn't find the proper way to do this. You're a lifesaver, thanks! :)

  • @MughilKarthikeyan
    @MughilKarthikeyan 3 года назад +2

    very useful!
    I was making a road for my car game,
    the road was stretched,
    this solved my problem.

  • @killereks
    @killereks 2 года назад +1

    Thank you so much! I've been looking for something like this for a long time

  • @electrovignette9802
    @electrovignette9802 Год назад

    Thanks! Helpful Tutorial~!! I was suffering a lot from the phenomenon of the Triplanar Node's Side Texture overlapping. Thanks to you, it was resolved. thank you.

  • @uhmz1516
    @uhmz1516 4 года назад +5

    freaking amaizing, you saved my life from innefficient map building :D

  • @ZZaGGrrUzz
    @ZZaGGrrUzz 2 года назад +1

    lifesaver. I'm astonished that this isn't default unity feature...

  • @NameNumber2
    @NameNumber2 8 месяцев назад +1

    i wish i could like a video more then once. thank you so much for this tutorial!

    • @FoleyX90
      @FoleyX90  8 месяцев назад

      I'm glad the video was helpful! Thank you :D

  • @blueawesomedinosaur
    @blueawesomedinosaur 2 года назад

    Thank you so much! Even though I used it differently, the results turned out well.
    I've been trying to get materials to look decent on exported plain blender models for awhile now, and this worked.

  • @Feather3
    @Feather3 3 года назад

    Amazing tutorial. Teaches a lot of shadergraph stuff in a very intuitive way. Thank you!

  • @JonelKingas
    @JonelKingas Год назад +1

    That was a lot of graphing lol, it worked, thanks.

  • @sagrgywejhxcvx
    @sagrgywejhxcvx Год назад

    THANK YOU, I wasted 1h with it, u saved me

  • @RRaiho
    @RRaiho 3 года назад +1

    In the name of the Humanity, i hereby thank you!

  • @dkmfr
    @dkmfr 3 года назад

    well explained, straight to the point and very informative. Thanks!

  • @NPCsz
    @NPCsz 2 года назад

    This is absolutely amazing ! thanks for the tutorial.

  • @erlendsol
    @erlendsol 3 года назад +1

    Thank you so much! Helped a lot :D

  • @maximgonsalez2010
    @maximgonsalez2010 Год назад

    Thank you very much! This video was very useful for me.

  • @Lambdapod
    @Lambdapod Год назад

    Thank you so much for this man, it was really useful for this level I'm building 👍

  • @guillermo4730
    @guillermo4730 4 месяца назад

    Thanks for the video!

  • @huiAPPOAJ
    @huiAPPOAJ 2 года назад

    thanks a lot, exacly what was i looking for

  • @lizkimber
    @lizkimber Год назад

    This was awesome, i made a subgraph to redo the samples and make it a bit tidier, but i ran into an issue where the lighting wasnt being applied - and was a little confused. As it was perfect in every way, except now my dark dungeon isnt. PS My bad, for some reason the emission was glowing way too much glow.. removed emissions and huzzah..

  • @EliasModeMusic
    @EliasModeMusic 2 месяца назад

    Thank you!!

  • @tamus3057
    @tamus3057 Год назад

    Great tutorial !

  • @MTandi
    @MTandi 3 года назад +1

    Awesome, thank you!

  • @mtn_wnd
    @mtn_wnd Год назад +1

    Hi :) so the shader works really well but for some reason if i rotate an object that has the shader applied by more than 90 or -90 degrees, the texture shading somehow changes? i havent found a way to fix that

    • @FoleyX90
      @FoleyX90  Год назад

      Maybe try looking at some triplanar techniques for a solution for it

  • @guillermo4730
    @guillermo4730 3 месяца назад

    Question: ¿How can add textures with transparency in this shader graph?

  • @xeraghg
    @xeraghg 2 года назад +1

    Could you please link a download from the file of the shader, thx

  • @SimpleTrax
    @SimpleTrax Год назад +1

    How can I animate this texture, with flipbook or with something else?

    • @FoleyX90
      @FoleyX90  Год назад

      You would use the Time node to modify the textures at runtime ruclips.net/video/p6hYVJqr5sQ/видео.html

  • @tinylarkl1421
    @tinylarkl1421 Год назад +2

    Can i use this on a normal 3D unity project or do i have to use 3D URP or 3D HDRP?

    • @FoleyX90
      @FoleyX90  Год назад +1

      only URP and HDRP support Shader Graph. For normal 3D, you can use something like Amplify Shader Editor. The logic should be similar but I'm not familiar with their node system

    • @tinylarkl1421
      @tinylarkl1421 Год назад +2

      @@FoleyX90 Okay thanks

    • @FoleyX90
      @FoleyX90  Год назад +1

      @@tinylarkl1421 any time :D

  • @AndyxbecK
    @AndyxbecK 3 года назад

    This is amazing dude, thank you. Do you know how I could add a falloff between the first and second texture that wraps around the sides? And could this falloff use an alpha mask?

  • @andreasbrunsmann3408
    @andreasbrunsmann3408 2 года назад

    if i got it right you need another condition in each of the 3 branches to determine the orientation/rotation of the texture for seamleass unregular textuers, don't you?

  • @MrHumanLimitzYT
    @MrHumanLimitzYT 22 дня назад

    The sides don’t work for me?

  • @freelancepakistangames7245
    @freelancepakistangames7245 Месяц назад

    Thank you brother

  • @BlueBeatsChannel
    @BlueBeatsChannel 3 года назад

    hay if you have a light thats only producing half of the shape then go to shader click on graph settings then under Universal there a tab that says fragment normal space click on world.

  • @guategeek.
    @guategeek. 3 года назад

    I'm trying to create a shader like this but where when I torate my floor objects the texture still matches up. The Problem I'm having is that the normal map causes the color of the face to change when the object is rotated, so even though the texture details still match the hue does not. Any idea what could be done with that?

  • @alexisd5410
    @alexisd5410 4 года назад +1

    Thanks a lot!!

  • @KatDiedAgain
    @KatDiedAgain 3 года назад

    Is there a way to do something similar with POM (parallax occlusion mapping)?
    I've been trying to figure out how to make a shader that renders a texture at an absolute given depth from the surface, but when I scale my object, it offsets the depth of the texture inside the surface.
    The reason I need this is because I must base a script off of the same depth value as that shader's texture relative to the origin of the object, and it all needs to be consistent regardless of the scale of the object. So, if I set the depth to 1 meter in the shader, it needs to be physically one unit deep through the surface. Is that possible?

  • @cristiansebastiannavarta5419
    @cristiansebastiannavarta5419 3 года назад +1

    is it possible to add a bump map?

    • @FoleyX90
      @FoleyX90  3 года назад

      Yes, just repeat the process for each input (smoothness, metallic, normal)

  • @zguesto
    @zguesto 2 года назад

    There's no PBR graph in my unity shader selector
    I have the shader graph package installed
    and my unity version is 2020 3 28f

    • @sephypantsu
      @sephypantsu 2 года назад

      use the lit graph instead, pretty much same thing

  • @misterm14
    @misterm14 9 месяцев назад

    this shader cant have normal map also?

    • @FoleyX90
      @FoleyX90  9 месяцев назад +1

      It can! Just repeat the process for each input you want to add. I don't know if unity has material functions yet, it's been a while but it would definitely be handy to set one up for each input.

  • @halilcagatayturgut2548
    @halilcagatayturgut2548 2 года назад

    Hi. How can I do with amplifier shader this promblem?

    • @FoleyX90
      @FoleyX90  2 года назад

      never used it but i assume the logic would be similar

  • @smong891
    @smong891 3 года назад +1

    wait how do you get pbr graph

    • @FoleyX90
      @FoleyX90  3 года назад

      Your project must be using HDRP or URP

    • @eumelzocker6880
      @eumelzocker6880 3 года назад

      PBR Graph is not available in Unity 2020.3.23f1 with URP. I managed to create this in version 2019.4.6f1. Worked fine in that version but broke after copying it to my 2020 project. 😪 Hope the forum post will help me. Thanks for pointing to the right direction...

  • @freshmaker4o
    @freshmaker4o 3 года назад

    where would you plug in normal map if you had one for the texture?

    • @erlendsol
      @erlendsol 3 года назад +1

      If you are using the same texture for all the sides you can use the branch nodes to change the UV BEFORE the textures, so you can use the same output for all the different maps :D

    • @freshmaker4o
      @freshmaker4o 3 года назад +1

      @@erlendsol Thank you!

    • @gerardcoquardfranco785
      @gerardcoquardfranco785 Год назад

      @@erlendsol It was not easy to understand for me at first, but after some time reading it carefully and trying to understand it, i figured it out. Than you mate!

  • @aprimic
    @aprimic 2 года назад

    why red and blue, but not green?

    • @aprimic
      @aprimic 2 года назад

      why greater than 0.5 at 11:18, it would be good to get an explanation in the video

  • @sergiobromberg9233
    @sergiobromberg9233 3 года назад

    Please put a link of the forum post!

    • @FoleyX90
      @FoleyX90  3 года назад +1

      forum.unity.com/threads/mapping-texture-to-world-position-instead-of-object-position.94766/

    • @sergiobromberg9233
      @sergiobromberg9233 3 года назад

      @@FoleyX90 Awesome! Thanks!

  • @thebatman_yo
    @thebatman_yo 3 года назад

    lifesaver

  • @Vaultcrawl
    @Vaultcrawl 3 года назад

    awesome

  • @SkorpionYassine
    @SkorpionYassine 2 года назад

    Cory Kenshin fan :)

    • @FoleyX90
      @FoleyX90  2 года назад +1

      you fuckin know it bruv

  • @altf4thc
    @altf4thc 4 года назад +1

    Doing unity tutorials now?

    • @FoleyX90
      @FoleyX90  4 года назад +1

      I couldn't find how to do this anywhere so I figured I'd share it.

  • @davimichaelsen9107
    @davimichaelsen9107 2 года назад

    wow

  • @smong891
    @smong891 3 года назад +2

    T H A M K

  • @theAzumi
    @theAzumi Год назад +1

    thank you very much!

    • @FoleyX90
      @FoleyX90  Год назад

      You're very welcome!

  • @willcamick
    @willcamick 2 года назад

    All of this just to tile a texture. Unreal.

    • @FoleyX90
      @FoleyX90  Год назад

      well it's also like a faux triplanar shader

  • @djtyros
    @djtyros 3 года назад

    No matter how good your video is, stuff like this 0:27 get's you thumbs down....

    • @jadefae
      @jadefae 2 года назад

      No matter how good you are, comments like this get a thumbs down. Asshole

    • @SkorpionYassine
      @SkorpionYassine 2 года назад

      lol stop being triggered

  • @EcIipse_Dev
    @EcIipse_Dev 2 года назад

    fortnite