TOZ Vertex Painter

Version: 1.3.0

Description:
This simple editor tool helps to easily paint vertex colors on any 3d mesh and save it as a new mesh with vertex color data.
Pack also includes an Unlit and a Standard shader variation that does splat mapping with 4 different textures based on mesh vertex colors.

Get it on ASSETSTORE!!!

2108878--138290--vpaint.jpg

Video tutorial on how it Works.

https://www.youtube.com/watch?v=PZaxpTQZUk0

hello is the painted mesh, for each mesh requires a different copy of material?
or i can use same material + shader + textures, and apply paint on different models each with different paint?

thanks

[quote=“mangax”, post:3, topic: 580185]
hello is the painted mesh, for each mesh requires a different copy of material?
or i can use same material + shader + textures, and apply paint on different models each with different paint?

thanks
[/quote]

Painted meshes can share same material/shader/textures. But different paint means different mesh.
Final result after painting is saved as a mesh object, so you must apply this saved mesh to the “mesh” on your MeshFilter.

so in order to have same mesh character with same material but with different two paint jobs, i have to clone mesh and save each as separate mesh correct?

[quote=“mangax”, post:5, topic: 580185]
so in order to have same mesh character with same material but with different two paint jobs, i have to clone mesh and save each as separate mesh correct?
[/quote]

The paint tool doesnt let you save on the original mesh anyways, it always asks you to save the painted data as a seperate new mesh.
So, yes in order to have same mesh with different paint jobs, you must have 2 or more different mesh data.
Mesh and the object representation in your editor are different stuff, mesh is just an asset that holds vertex/index/uv/color…etc arrays.

Has a real hard time painting on big meshes. It'll work if I scale my mesh down but then it'll only paint the entire mesh in one stroke. Can't seem to make it work. Also it's way too easy to accidentally undo all your painting if you stop painting or click one of the fill buttons, I feel like there should be a dialogue for these.

EDIT: I think I've found out the cause of the problem. I made sure my mesh' file scale and import scale and in scene scale were all 1. I'm not sure which of these causes problems but never mind. The main problem I think was because it was a child of an object with a scale that was not 1, so its scale was being set to .002 or something when I childed it. Regardless it'd be super nice if this tool could work regardless of scales. It works really nice when it does.

[quote=“wadewt”, post:7, topic: 580185]
Has a real hard time painting on big meshes. It’ll work if I scale my mesh down but then it’ll only paint the entire mesh in one stroke. Can’t seem to make it work. Also it’s way too easy to accidentally undo all your painting if you stop painting or click one of the fill buttons, I feel like there should be a dialogue for these.

EDIT: I think I’ve found out the cause of the problem. I made sure my mesh’ file scale and import scale and in scene scale were all 1. I’m not sure which of these causes problems but never mind. The main problem I think was because it was a child of an object with a scale that was not 1, so its scale was being set to .002 or something when I childed it. Regardless it’d be super nice if this tool could work regardless of scales. It works really nice when it does.
[/quote]

Well, there was a small bug.
Please edit the VertexPainter.cs file and change the line 241 into the following:

Vector3 hitPos = Vector3.Scale(go.transform.InverseTransformPoint(hit.point), go.transform.lossyScale);

also the line 243 into the following:

Vector3 vertPos = Vector3.Scale(vertices[i], go.transform.lossyScale);

EDIT: The above will solve the scale problem, it used to ignore if an object was in a hierarchy, with the global scale; it will work as you want.

EDIT2: It is possible to make an undo button however it will cause memory leaks to temporarily save the data. And it is not allowed for editör tools.

This package is now free at the assetstore.

Hi,
can I use it to paint textures dynamically at run-time using the ray cast method to know the exact point?
If yes, can I paint with different brushes (like a decal)?
Thanks

This is an editor script as is, but all the necessary code is there and package is free.
So, you can code it yourself. If you get stuck, i would like to help if i have the free time.

Just had some free time to update this handy tool. New features are:

  • Slightly faster painting
  • Custom save location for the painted mesh
  • Minor bug fixing
  • Updated shaders for Unity version 2020.x
  • Documentation is now online (WIP continuously)

Download link at first post.

I see the unity changed hashing in 2021.3.x versions, If you are using 2021.3.x and having problems, just delete the line 236 and it will work as desired again.

Hello aubergine, I try to use your tool. I'm on unity 2022 with the Universal Render Pipeline. Unfortunately the material created by TOZ Vertex Painter is Pink and I can't figure out how to make it work. I have try to update the material to URP with no success.

Can you help me please ?

Hello, unfortunately i dont plan to support URP or HDRP as they are incomplete and useless. The created material is just an average vertex color shader which you must write yourself for urp or hdrp and point the script to the newly written shader(s).
However, why bother and just work in standard renderer while painting your objects and then you can import them back to your urp project?

new update available:
* Forced ads and obsolete api calls removed.

Version 1.3 is available at the ASSETSTORE
You can now paint multi material/submesh objects, faster, more readable source code. Changed the way of debugging to shaders rather than object materials.
NO HDRP or URP support!!