Hi @LiamAcademy, thanks for the great video... Do you think this method would be possible to use for blending two lightmaps together? I'm making a procedural game and need to blend the lightmaps of two rooms together in a small hallway that connects them? Would be greatly appreciated...
Thank You for this Lesson 💯👍🏻 Very cool video. This is a very interesting topic, maybe for adding more realism..., for instance when a grenade explodes in front of a wall and you want to paint a section black (because of the blast).
I'm a huge fan of your game development content and I've been working on a project where I want to create an AI that can climb buildings similar to what we see in Assassin's Creed, using Nav Mesh agents. I've been struggling with this and would greatly appreciate it if you could create a tutorial or offer some guidance on how to achieve this in Unity. Your expertise in this area would be invaluable to me and many others in the game development community.
You can set vertex colors in code using Mesh.colors & Mesh.SetColors docs.unity3d.com/ScriptReference/Mesh.html Or I’m sure they can be set in a 3D modeling program but I don’t know how to do that 🙂
I did this twice now but my material is going to be pink and applying vertex colors doesn't do anything at all. What did I do wrong? Edit: I downloaded your code from github and it does the same error... something is missing on my project. EDIT2: I didn't had a Scriptable Render Pipeline Setting in "Project Settings" -- "Graphics". It works now. Very good tutorial!
Great Tutorial, I've just started playing around with shaders after a few years of game development and it is a shocker. Quick question, what was the reason to us the 'Split Texture Transform' and 'Tiling and Offset' nodes rather than plugging the BaseMap directly into the 'Sample Texture 2D' node? It seems to have the same effect on my setup but I'm wondering if I'm not understanding something? Again pretty new to shaders so there's a good chance I've missed something :)
By splitting the texture transform it allows us to customize the tiling and offset to get more/less repeating of the texture before going to the Sample Texture 2D
Sure. On higher poly meshes you can get some good looking results. For lower poly meshes, using a similar pattern based on a texture you manipulate would give better results.
Hi m8,i hope you had a great new year ! Iw want to create an outrun / pole position style game . I've used an asset to pixelize it. But looks wrong because of the huge amount of colours on the screen. I want to limit the screen to only 32 so it works authentic, but how do i do that? I did want to use 2d and sprites but i don't know how to create a pseudo 3d road in 2d, everyone that i ask don't have a clue or they just ignore when they see the question lol
For limiting the screen to only 32 colors you can use a full screen shader or a post processing effect that uses a color ramp to clamp your values, or I think you could achieve the same effect using a LUT. The pseudo 3d in 2d, not sure because I haven't done any 2d development in Unity :(
I've been trying luts, but talking about 2d I didn't use it in unity for the first 2 years and now I'm addicted to doing 2d games... You need to try my m8!@@LlamAcademy
For Splatoon it is probably painting to a virtual texture or using decals instead of vertex colors. The level of detail on those is higher than is feasible with Vertex colors. For setting in code, you can use Mesh.colors and Mesh.SetColors docs.unity3d.com/ScriptReference/Mesh.html
Great tutorial as always! I fiddled around with the exact same setup as showcased in this video before. I wasn't very satisifed with the 4 texture limitation, especially for ground meshes. Couldn't find a better solution for it tho. My last idea before giving up on the whole thing was using multiple vertex textures, but it felt very janky how some textures could override some and not others. Got any idea how to do more than 4? Also great to hear about that gamedev TV course. I took courses from them before and they're really good, looking forward to it!
you could do splatmapping, just like unity terrain. I don't know exactly how its done, but I have some guesses. Instead of using vertex color, we could use a image texture, and use its channels to blend between 4 materials. This will be our mask texture that is uv mapped 1:1 along the whole mesh. And we could add more then one mask textures. Needs some thought on how to blend between multiple mask textures.
What would be a practical way to be able to detect material with raycasting to set up various footstep material sounds while using Polybrush Shader Blend? Thanks!
I think you can do something like this: ruclips.net/video/YX8E1AE3BYs/видео.html In this video we handle simple single textures and renderers and terrains. Following similar logic as we do on the terrain, you can identify which triangle was hit on the mesh and figure out the vertex colors active on that triangle and then you can tell which texture was active. Not sure if there’s an easier way but that’s my initial thought.
Unfortunately this doesn't seem suited to typical gamedev pipelines because polybrush creates a new mesh, so if you're making assets in a 3D program (i.e not probuilder) then if you need to do revisions and re-export it's not going to update in engine because it's using the mesh from polybrush. Please someone correct me if wrong?
You are right. In your 3D modeling program you can do the vertex color painting and re-export / import to Unity to avoid the poly brush mesh creation, or you can also export the modified mesh and use that as your new mesh
It’s good to have clarification, wasn’t quite sure. The export option is nice, just wish it wasn’t needed (like Unreal). Hopefully something that is addressed in the near future. Thanks for the info!
Edit to my comment is there a way to add more than two textures like 4/5 or something like that I didn’t watch the full video and that’s the reason I commented the thing before hand.
Hi, anyone using mac having problem with probrush like me: anytime i try to use the paint brush, the window goin crazy, it keep zooming in and out and super hard to paint. It happen on my M1 mac, but work fine on window xD
Hi @LiamAcademy, thanks for the great video... Do you think this method would be possible to use for blending two lightmaps together? I'm making a procedural game and need to blend the lightmaps of two rooms together in a small hallway that connects them? Would be greatly appreciated...
Not sure. Best way to find out is to give it a shot!
Thank You for this Lesson 💯👍🏻
Very cool video.
This is a very interesting topic, maybe for adding more realism..., for instance when a grenade explodes in front of a wall and you want to paint a section black (because of the blast).
Great idea!
I'm a huge fan of your game development content and I've been working on a project where I want to create an AI that can climb buildings similar to what we see in Assassin's Creed, using Nav Mesh agents. I've been struggling with this and would greatly appreciate it if you could create a tutorial or offer some guidance on how to achieve this in Unity. Your expertise in this area would be invaluable to me and many others in the game development community.
That’s definitely a tricky one to set up where it would look nice 🤔 I’ll have to think about it
Great tutorial! How can we make this without ProBuilder? Will you make a tutorial about it?
You can set vertex colors in code using Mesh.colors & Mesh.SetColors docs.unity3d.com/ScriptReference/Mesh.html
Or I’m sure they can be set in a 3D modeling program but I don’t know how to do that 🙂
I did this twice now but my material is going to be pink and applying vertex colors doesn't do anything at all. What did I do wrong?
Edit: I downloaded your code from github and it does the same error... something is missing on my project.
EDIT2: I didn't had a Scriptable Render Pipeline Setting in "Project Settings" -- "Graphics". It works now. Very good tutorial!
Great Tutorial, I've just started playing around with shaders after a few years of game development and it is a shocker.
Quick question, what was the reason to us the 'Split Texture Transform' and 'Tiling and Offset' nodes rather than plugging the BaseMap directly into the 'Sample Texture 2D' node?
It seems to have the same effect on my setup but I'm wondering if I'm not understanding something? Again pretty new to shaders so there's a good chance I've missed something :)
By splitting the texture transform it allows us to customize the tiling and offset to get more/less repeating of the texture before going to the Sample Texture 2D
Cool!
Could be used for blood splash on a character?
Sure. On higher poly meshes you can get some good looking results. For lower poly meshes, using a similar pattern based on a texture you manipulate would give better results.
Hi m8,i hope you had a great new year ! Iw want to create an outrun / pole position style game . I've used an asset to pixelize it. But looks wrong because of the huge amount of colours on the screen. I want to limit the screen to only 32 so it works authentic, but how do i do that?
I did want to use 2d and sprites but i don't know how to create a pseudo 3d road in 2d, everyone that i ask don't have a clue or they just ignore when they see the question lol
For limiting the screen to only 32 colors you can use a full screen shader or a post processing effect that uses a color ramp to clamp your values, or I think you could achieve the same effect using a LUT. The pseudo 3d in 2d, not sure because I haven't done any 2d development in Unity :(
I've been trying luts, but talking about 2d I didn't use it in unity for the first 2 years and now I'm addicted to doing 2d games... You need to try my m8!@@LlamAcademy
Awesome! Could show how to change the vertex colors in code to make a splatoon like panting effect?
For Splatoon it is probably painting to a virtual texture or using decals instead of vertex colors. The level of detail on those is higher than is feasible with Vertex colors. For setting in code, you can use Mesh.colors and Mesh.SetColors docs.unity3d.com/ScriptReference/Mesh.html
Great tutorial as always! I fiddled around with the exact same setup as showcased in this video before. I wasn't very satisifed with the 4 texture limitation, especially for ground meshes. Couldn't find a better solution for it tho. My last idea before giving up on the whole thing was using multiple vertex textures, but it felt very janky how some textures could override some and not others.
Got any idea how to do more than 4?
Also great to hear about that gamedev TV course. I took courses from them before and they're really good, looking forward to it!
I do not have an idea going beyond 4 additional textures per material 🤔. That would require some real trickery.
you could do splatmapping, just like unity terrain. I don't know exactly how its done, but I have some guesses. Instead of using vertex color, we could use a image texture, and use its channels to blend between 4 materials. This will be our mask texture that is uv mapped 1:1 along the whole mesh. And we could add more then one mask textures. Needs some thought on how to blend between multiple mask textures.
What would be a practical way to be able to detect material with raycasting to set up various footstep material sounds while using Polybrush Shader Blend?
Thanks!
I think you can do something like this:
ruclips.net/video/YX8E1AE3BYs/видео.html
In this video we handle simple single textures and renderers and terrains. Following similar logic as we do on the terrain, you can identify which triangle was hit on the mesh and figure out the vertex colors active on that triangle and then you can tell which texture was active.
Not sure if there’s an easier way but that’s my initial thought.
Vertex Color from ProBuilder DO NOT aply to my mesh! Why???
It only applies to ProBuilder meshes as far as I know. Your mesh can get converted with the “probuilderize” option from ProBuilder
hi i just wondering can we use custom pre built models outside
from blender etc?
Yup!
Hi, can you please help me use this at runtime?
What aspect of this is not working at runtime for you?
I wonder how feasible this would be to do with the built in renderer to be used in VRChat.
Wondering this myself, I've definitely seen this used in VRC worlds, but not sure if it's using the probuilder material
i cant even get polybrush to begin with
I have a 2d texture flag sprite. I want to make a flag shader and I couldn't manage it, please make a video. ı use urp
Unfortunately this doesn't seem suited to typical gamedev pipelines because polybrush creates a new mesh, so if you're making assets in a 3D program (i.e not probuilder) then if you need to do revisions and re-export it's not going to update in engine because it's using the mesh from polybrush. Please someone correct me if wrong?
You are right. In your 3D modeling program you can do the vertex color painting and re-export / import to Unity to avoid the poly brush mesh creation, or you can also export the modified mesh and use that as your new mesh
It’s good to have clarification, wasn’t quite sure. The export option is nice, just wish it wasn’t needed (like Unreal). Hopefully something that is addressed in the near future. Thanks for the info!
Is there a way to add normals etc
Edit to my comment is there a way to add more than two textures like 4/5 or something like that I didn’t watch the full video and that’s the reason I commented the thing before hand.
Yes. You can use each R, G, B, and A channels for a different texture
@@LlamAcademy how to do it?
@testt3134 it’s the same process as we used for the R channel here, just with each of G/B/A showing a different texture
@@LlamAcademy
how i can make more colors, e.g pink or orange?
Hi, anyone using mac having problem with probrush like me: anytime i try to use the paint brush, the window goin crazy, it keep zooming in and out and super hard to paint. It happen on my M1 mac, but work fine on window xD
❤🎉✌💯👏