Polybrush glitches out my whole mesh when using prefab mode

When using the Polybrush (latest version) prefab tool to place objects, my custom mesh just bugs out completely. I have to remove the component that is added to fix it, but in doing so I can’t place the objects using this tool.

I tried using vertex streams option for the component but then I can’t place objects where I want.

Any ideas how to fix this, as I prefer to use this tool over others (which don’t have this problem but are missing some features I need).

Before:

After when moving mouse over the mesh after clicking the prefab tool.

Hi there, does this glitch also appears in other modes than the scatter prefab tool?
The tool shouldn’t modify the topology of the mesh you are painting on, this does look weird indeed.
How is the topology of your original mesh?

Hi,

I have a low poly terrain which looks like this…

It also happens when I use the Smooth Mesh Geometry option. The other options I can’t use as it says my material doesn’t support vertex colors, or texture blending, which is fine as I only need it for prefab placement.

Can you give me more info on what you are using ?

  • version of Unity
  • version of Polybrush?
  • Are you using ProBuilder?
  • does it always happen? only sometimes? perhaps only with specific meshes?

Unity 2020.2.0b2 (using URP latest)
Polybrush 0.9.15

I have had it happen on previous low poly meshes using stable releases of tools and Unity, but could never pinpoint the issue, so I always gave up on using Polybrush. I recreated another low poly mesh and it didn’t happen. But my current mesh, it happens every single time.

I’m not sure Polybrush 0.9.15 is up to date to work with the lastest Unity beta version.
Polybrush 1.0.2 is the verified version for Unity 2020.2.0b2, you should go with this version, especially because lost of changes have been made since version 1.0.0 to better handle URP.

Would that be possible for you to provide me the mesh that is creating these artifacts?

I am using the latest, I was looking at assets and not installed packages.

I don’t think it is Polybrush that is the issue, I think it is my low poly mesh. I tested various low poly meshes I created in Blender, and sometimes they have issues, were others did not.

Some meshes the faces glitch out.
Sometimes I just can’t place any prefabs on certain faces of the mesh as well.

I think I will go back and look at the meshes and see. I think it could be the way I am decimating them in Blender perhaps. I can send you the mesh if you like, but I feel the issue maybe with me and not your tool after doing more testing.

1 Like

One thing you could also try maybe is to use the probuilder plugin after importing your mesh to probuilderize the mesh and see if that works with this version of the mesh, if it does work, it might certainly comes from the original mesh you have created indeed.
All that the prefab tool is doing is raycasting the target object to check if it is possible to place an element on it or not, it’s not touching/modifying the mesh, so I doubt also that the behavior is coming from the prefab placement :slight_smile:

Hope it’s alright that I am commenting on a dead thread after such a long time, but I just spent like 2 days dealing with the same problem, and I think I found a solution. I stumbled upon a few threads with no answers, so I thought I would share it in case someone else has the same issue

With your broken mesh selected, got to the Tools tab → PolyBrush → Bake Vertex Streams. Then under Bake Options, click on Apply to current mesh. This seems to fix the broken vertices, and all functions of Polybrush seem to then work fine.

I am using Unity 2021.3.8 and Polybrush 1.1.3. The Polybrush docs say that this is a deprecated function and will be removed in a future update. I am not sure why, but in any case, this was what saved me.

This still seems to be an issue as of Unity 2022.2.9 with Probuilder 5.0.7 and Polybrush 1.1.4. I was able to work around the issue by checking the “Use Additional Vertex Streams” option in Preferences > Polybrush. It still acts like it’s going to break momentarily but then snaps into working when I start painting.

1 Like

Thanks man, you’re a lifesaver. I’m amazed they haven’t fixed this yet in 2023.