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.
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!!!!!
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.
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
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.
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.
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..
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
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
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?
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?
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.
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?
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?
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.
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...
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
@@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!
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.
Thanks for the feedback!
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
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!!!!!
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.
i gotchu bruv
@@FoleyX90 Wow! 160 likes (1 from me) and no dislikes! But you deserve more because you solved me a big problem
@@themarbleboss1268 happy to help, bud!
Hey great video! This helped me a lot even though it is a bit old. You earn a subscription!
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
I could kiss you right now! Thank you! This has saved me countless hours of googling and potentially laying out walls piece by piece.
Thanks pal! This was a game changer for our project! Great Video!!!
Glad it helped!
Couldn't find the proper way to do this. You're a lifesaver, thanks! :)
very useful!
I was making a road for my car game,
the road was stretched,
this solved my problem.
Thank you so much! I've been looking for something like this for a long time
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.
freaking amaizing, you saved my life from innefficient map building :D
lifesaver. I'm astonished that this isn't default unity feature...
i wish i could like a video more then once. thank you so much for this tutorial!
I'm glad the video was helpful! Thank you :D
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.
Amazing tutorial. Teaches a lot of shadergraph stuff in a very intuitive way. Thank you!
That was a lot of graphing lol, it worked, thanks.
THANK YOU, I wasted 1h with it, u saved me
In the name of the Humanity, i hereby thank you!
well explained, straight to the point and very informative. Thanks!
This is absolutely amazing ! thanks for the tutorial.
Thank you so much! Helped a lot :D
Thank you very much! This video was very useful for me.
Thank you so much for this man, it was really useful for this level I'm building 👍
Glad to hear it!
Thanks for the video!
thanks a lot, exacly what was i looking for
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..
Thank you!!
Great tutorial !
Awesome, thank you!
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
Maybe try looking at some triplanar techniques for a solution for it
Question: ¿How can add textures with transparency in this shader graph?
Could you please link a download from the file of the shader, thx
How can I animate this texture, with flipbook or with something else?
You would use the Time node to modify the textures at runtime ruclips.net/video/p6hYVJqr5sQ/видео.html
Can i use this on a normal 3D unity project or do i have to use 3D URP or 3D HDRP?
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
@@FoleyX90 Okay thanks
@@tinylarkl1421 any time :D
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?
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?
The sides don’t work for me?
Thank you brother
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.
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?
Thanks a lot!!
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?
is it possible to add a bump map?
Yes, just repeat the process for each input (smoothness, metallic, normal)
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
use the lit graph instead, pretty much same thing
this shader cant have normal map also?
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.
Hi. How can I do with amplifier shader this promblem?
never used it but i assume the logic would be similar
wait how do you get pbr graph
Your project must be using HDRP or URP
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...
where would you plug in normal map if you had one for the texture?
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
@@erlendsol Thank you!
@@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!
why red and blue, but not green?
why greater than 0.5 at 11:18, it would be good to get an explanation in the video
Please put a link of the forum post!
forum.unity.com/threads/mapping-texture-to-world-position-instead-of-object-position.94766/
@@FoleyX90 Awesome! Thanks!
lifesaver
awesome
no u
Cory Kenshin fan :)
you fuckin know it bruv
Doing unity tutorials now?
I couldn't find how to do this anywhere so I figured I'd share it.
wow
T H A M K
thank you very much!
You're very welcome!
All of this just to tile a texture. Unreal.
well it's also like a faux triplanar shader
No matter how good your video is, stuff like this 0:27 get's you thumbs down....
No matter how good you are, comments like this get a thumbs down. Asshole
lol stop being triggered
fortnite