Search Unity

TOZ Vertex Painter

Discussion in 'Assets and Asset Store' started by aubergine, May 11, 2015.

  1. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,602
    Version: 1.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 for FREE!!!

    vpaint.jpg
     
    Last edited: Dec 16, 2018
  2. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,602
    Video tutorial on how it Works.

     
  3. mangax

    mangax

    Joined:
    Jul 17, 2013
    Posts:
    275
    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
     
  4. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,602
    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.
     
  5. mangax

    mangax

    Joined:
    Jul 17, 2013
    Posts:
    275
    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?
     
  6. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,602
    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.
     
  7. wadewt

    wadewt

    Joined:
    Mar 17, 2013
    Posts:
    14
    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.
     
    Last edited: Oct 3, 2015
  8. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,602
    Well, there was a small bug.
    Please edit the VertexPainter.cs file and change the line 241 into the following:
    Code (CSharp):
    1. Vector3 hitPos = Vector3.Scale(go.transform.InverseTransformPoint(hit.point), go.transform.lossyScale);
    also the line 243 into the following:
    Code (CSharp):
    1. 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.
     
  9. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,602
    This package is now free at the assetstore.
     
  10. NeedNap

    NeedNap

    Joined:
    Nov 1, 2012
    Posts:
    22
    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
     
  11. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,602
    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.