Polybrush URP Texture Blend stretching textures

Update: Alright I think I was just being a dunce and not realizing that I need to update and/or modify shaders myself to get this to work. I kind of feel like Polybrush overall is unfinished and it looks like support for it maybe isn’t great but hopefully that will change going forward. I’ll make this as closed.

Adding a TLDR here since it seems like it’s not getting much traction:

  1. Has anyone had issues with polybrush stretching textures?
  2. Is there a preferred shader to use for blending textures in polybrush? I only see Polybrush/URP/Lit Texture Blend URP after addding polybrush to assets. There is a Probuilder/diffuse texture blend shader but it appears broken when I try to use it (pink color and cannot fix it via Rendering->Materials->Convert.

I’m on Unity version 2022.3.30f1 and trying to use Polybrush paint textures on meshes. I have created a cave mesh in Blender with no texture and exported it to Unity. I want to use the texture painting and blending for it since I’m struggling with the texturing in Blender, however whenever I start painting the texture on the mesh, it first seems to apply a texture to the entire mesh as if I have Flood selected, but I have Brush selected every single time. That wouldn’t be a big deal since I can then paint textures, however the texture is always stretched out on the mesh. I have included a screen with the stretched textures on the mesh on the left hand side, and some textured terrain on the right hand side with the same textures so you can see how it’s stretching out the same rock and dirt/grass textures compared to when it’s painted on the terrain.

Besides that I also seem to get random errors from Polybrush when just doing basic things like changing the albedo texture. I am on URP, and I have also downloaded the Shader URP Examples. After adding Polybrush to my assets, it added the Polybrush/URP/Lit texture blend URP shader so that’s what I am using on the material currently. If I am supposed to be using a different shader, any idea where I can get it? Or is this whole problem potentially a problem with my Blender mesh? I know this is a Unity forum and maybe I should ask that question on a Blender forum, but since Polybrush has been kinda wonky so far I was thinking I’d check for a Polybrush problem first. Thanks!

I think your problem lies within your model itself, Polybrush needs UVs in order to map the textures correctly, if your model have wrong UV’s or doesn’t have at all, you’ll start to see weird textures when you paint.

Also, I learned there’s some requirements in order to success using Polybrush, I’m listing here what I’ve found.

1.- Your geometry needs UV properly lay out in a 0-1 space, otherwise you’ll see undesirable textures.
That mean a plane needs to fill the entire space otherwise you’ll see some gaps (seams). This gets difficult as soon as you get a complex geometry (like a sphere) because there’s no way to avoid gaps, so you must be clever with your UV’s.

2.- Your geometry needs to be high resolution in order to get a good painted texture, the less resolution you have, the more pixelated you’ll see your textures (this is independent of the texture resolution). Since Polybrush works with vertices, having more vertices means having more resolution to paint. For this you must find a balance in your poly-count for optimization purposes.

3.- You can make your own texture-blend shader if you know shader graph. The one provided with the samples is a good start, but there’s room for improvement. I made one that supports more than 2 textures and also allows me to use a normal map and change the UV tile which is something useful.

If the shader isn’t compatible, it simply wont allow you paint.

Hope this shed some light.

2 Likes