Search Unity

VPaint: Advanced Vertex Painting [Released]

Discussion in 'Assets and Asset Store' started by beck, Jul 27, 2013.

  1. beck

    beck

    Joined:
    Nov 23, 2010
    Posts:
    294
    The VPaintObject is what the VPaintGroup targets, so once you've added a VPaintObject it should then be a valid selection in the Add Objects window. I would recommend to instead put the VPaintGroup on a separate object, as it will make painting easier.

    A VPaintObject is added automatically to every renderer selected when you select Create VPaint Group, so if you added the VPaintGroup from the component menu then this wasn't done and needs to be done manually. It's a bit of an awkward workflow, I agree, and I've got a bit more user-friendly of a solution coming in the next version. For now, though, make sure that every object you wish to paint on has a VPaintObject attached to it.
     
  2. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,241
    Okay, so now:
    1) I created a new empty GO and added VPaintGroup to it.
    2) I added the actual object I want to paint on using Add Object in VPaint, but it didn't work. So then I selected that object and added VPaintObject to it from the dropdown menu. Then I added it again in VPaint (where now it says "(Colorer)" next to it) and this time it worked -- it's listed under Object Targets, and it's also listed in the Colorers array on my master GO.
    3) I chose a VPaint shader for that object and assigned textures to it -- they're now all evenly blended on the mesh. (This workflow is fine if it's correct, but it's different than what the manual says to do.)
    4) But I still can't paint -- there is still no paintbrush cursor when I click "Paint" button in VPaint and drag the cursor over the mesh.
     
  3. beck

    beck

    Joined:
    Nov 23, 2010
    Posts:
    294
    That's very strange, that is an appropriate workflow. I followed your steps exactly, using the cube primitive, and I was able to paint on the object. Could you try closing VPaint and re-opening it? Could you post a screen shot of your object's inspector? Are you receiving any errors in your console?

    Edit: If you wish to have more direct help, feel free to email me or contact me on irc @becksebenius
     
    Last edited: Aug 27, 2013
  4. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,241
    No console errors. I tried it again in a new scene, just to be sure, with a cube primitive. Same thing, see attached.
     

    Attached Files:

  5. beck

    beck

    Joined:
    Nov 23, 2010
    Posts:
    294
    Which Unity version are you using? I've just tested it in 4.1.5f1 and 3.5.7 to be sure. Here's a few more things to check:

    Is the Isolated Region box disabled? Is the object enabled in the Object Targets window? Is the selected layer enabled?
     
    Last edited: Aug 27, 2013
  6. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,241
    I'm using 4.1.5. Looks like the problem was with Isolated Region -- if I disable/enable it, or choose Reset, then suddenly painting works! Very cool. Thanks for your help!
     
  7. beck

    beck

    Joined:
    Nov 23, 2010
    Posts:
    294
    Absolutely, I'm glad that I could help solve the problem. Thanks for choosing VPaint!
     
  8. ShoyukenX

    ShoyukenX

    Joined:
    May 11, 2013
    Posts:
    6
    I can paint with colors but how do you paint with a texture?
     
  9. beck

    beck

    Joined:
    Nov 23, 2010
    Posts:
    294
    Hi ShoyukenX,
    To paint with textures you simply need to assign the right shader. Here's a list of some of the texture blend shaders included in the package:

    TextureBlendx2
    TextureBlendx2_Normal
    TextureBlendx3
    TextureBlendx3_Normal
    TextureBlendx4
    TextureBlendx4_Normal
    TextureBlendx5
    TextureBlendx5_Normal

    These can all be found in the shader folder. Just assign a material with one of these shaders and you're ready to go. To paint each channel, use a full white color and select only the channel you want. Here's an example of selecting only the red channel, allowing you to paint the first texture assigned to the material:



    I hope that helps!
     
  10. Tom-Ash

    Tom-Ash

    Joined:
    Aug 3, 2012
    Posts:
    10
    Hi.

    Is it (and how) possible to "bake" somehow VPaintGroup to the mesh itself ? Say I made a scene with several prefabs, vertex painted them and now I want the VPaint to break the prefab instances and permanently bake the colors to new unique meshes.
    It's because I want to export the scene with painted objects to unitypackage and send it to a friend without VPaint, but with my custom vertex blend shaders.
     
  11. beck

    beck

    Joined:
    Nov 23, 2010
    Posts:
    294
    Hi Tom,
    That's an interesting use case, honestly I hadn't considered that to be a useful thing to include. It's fairly simple though so I'll add it to the list for the next release. For now the best way to allow saving of instanced meshes is to open the file VPaint/Editor/VPaintSaveProcess.cs and wrap the entirety of the file in this format:

    /*
    file contents
    */

    This will allow you to save the scene with the instanced meshes. Obviously you'll want to remove the VPaintObject and VPaintGroup components before you package your scene to your friend. Removing those changes from that file will enable VPaint to function normally again.
     
  12. Tom-Ash

    Tom-Ash

    Joined:
    Aug 3, 2012
    Posts:
    10
    Thanks for answer and hacky solution - I'll check it as soon as possible. I eagerly wait the next release.
     
  13. beck

    beck

    Joined:
    Nov 23, 2010
    Posts:
    294
    VPaint 1.2 has just been submitted to the asset store. Here's a list of changes included:
    In general, this update was aimed at improving the workflow with unity. I was hearing some issues with the Object Targets panel being very slow, and so I've moved that into a separate window, called Object Manager.

    The Object Manager also helps you fix errors with your VPaint Objects, as well as manage which objects are targeted and how they function. In previous versions, if you updated a mesh it would break the vertex colors. VPaint now caches vertices so that you can properly transfer the old color data onto the new model. In the Object Manager, you can also manually break instances, like Tom Ash was asking for.

    A few more important features are the Clipboard window, which helps you copy/paste vertex colors from one object to another, and the Isolate Select window, which helps you manage which objects are currently paintable.

    I will post here again when the update makes it onto the store.
     
  14. Deleted User

    Deleted User

    Guest

    This looks great!

    Ive just purchased it and Ive had a look through the demo scene. I'm reasonable new with unity but I wanting to achieve something like this which is done in unreal

    http://www.youtube.com/watch?v=qaCKPmJFOi8&feature=youtu.be

    So I would be basically importing 4 textures each - Diff, NM, Spec, be able to control the spec. intensity and colour pick paint colour.

    Metal - DIff, NM, Spec
    Rust - Diff, NM Spec
    Dirt - Diff, NM Spec
    Paint - Diff, NM, Spec (with option to colour pick paint color)

    Also do I need to export my meshes with 2 UV sets?

    Is it possible to achieve this control? If so is it possible can you give me a quick overview or record screen demo?
     
  15. beck

    beck

    Joined:
    Nov 23, 2010
    Posts:
    294
    Hi wr_uk, thanks for your purchase.

    The shader you're speaking of requires very few modifications from one of the shaders that comes with VPaint, TextureBlendx5_Normal. The things that you mentioned that aren't included are sliders for Spec/Gloss, as well as the Paint color for texture 4. I assume that you mean that the Metal, Rust, Dirt, and Paint are blended on top of a base texture. I'm not sure if you're looking to actually use 2 uv sets for your model, but it isn't necessary for what you're asking. If your metal, rust, dirt, and paint textures tile, you can set the tiling options on the material to get higher resolution detail along your mesh.

    I've gone ahead and modified the above-mentioned shader for you, here is the code for it. Simply select Asset/Create/Shader, and open the file and paste this code in. The shader can then be selected from a material; the shader is located in the shader menu at VPaint/Lit/Blendx4 Bump,Spec,T4Color.

    Code (csharp):
    1.  
    2. Shader "VPaint/Lit/Blendx5 Bump,Spec,T4Color" {
    3.     Properties {
    4.         _BaseTexture ("Base Texture (RGB: Diffuse) (A: Spec)", 2D) = "white" {}
    5.         _BaseTextureBump ("Base Texture Bump", 2D) = "bump" {}
    6.        
    7.         _Texture1 ("Metal (RGB: Red Channel) (A: Spec)", 2D) = "white" {}
    8.         _Texture1Bump ("Metal Bump", 2D) = "bump" {}
    9.        
    10.         _Texture2 ("Rust (RGB: Blue Channel) (A: Spec)", 2D) = "white" {}
    11.         _Texture2Bump ("Rust Bump", 2D) = "bump" {}
    12.        
    13.         _Texture3 ("Dirt (RGB: Green Channel) (A: Spec)", 2D) = "white" {}
    14.         _Texture3Bump ("Dirt Bump", 2D) = "bump" {}
    15.        
    16.         _Texture4 ("Paint (RGB: Alpha Channel) (A: Spec)", 2D) = "white" {}
    17.         _Texture4Bump ("Paint Bump", 2D) = "bump" {}
    18.         _Texture4Color ("Paint Color", Color) = (1,1,1,1)
    19.        
    20.         _Gloss ("Gloss", Range(0,1)) = 0.5
    21.         _Spec ("Specularity", Range(0,1)) = 0.5
    22.     }
    23.     SubShader {
    24.         Tags { "RenderType"="Opaque" }
    25.         LOD 200
    26.        
    27.         CGPROGRAM
    28.         #pragma surface surf Lambert
    29.         #pragma target 3.0
    30.  
    31.         sampler2D _BaseTexture;
    32.         sampler2D _BaseTextureBump;
    33.        
    34.         sampler2D _Texture1;
    35.         sampler2D _Texture1Bump;
    36.        
    37.         sampler2D _Texture2;
    38.         sampler2D _Texture2Bump;
    39.  
    40.         sampler2D _Texture3;
    41.         sampler2D _Texture3Bump;
    42.        
    43.         sampler2D _Texture4;
    44.         sampler2D _Texture4Bump;
    45.        
    46.         half4 _Texture4Color;
    47.         fixed _Gloss;
    48.         fixed _Spec;
    49.  
    50.         struct Input {
    51.             half2 uv_BaseTexture;
    52.             half2 uv_Texture1;         
    53.             half2 uv_Texture2;         
    54.             half2 uv_Texture3;         
    55.             half2 uv_Texture4;
    56.            
    57.             float4 color : COLOR;
    58.         };
    59.  
    60.         void surf (Input IN, inout SurfaceOutput o) {
    61.             float4 color = IN.color;
    62.            
    63.             half4 t0 = tex2D (_BaseTexture, IN.uv_BaseTexture);
    64.             half4 t0b = tex2D (_BaseTextureBump, IN.uv_BaseTexture);
    65.            
    66.             half4 t1 = tex2D (_Texture1, IN.uv_Texture1);
    67.             half4 t2 = tex2D (_Texture2, IN.uv_Texture2);
    68.             half4 t3 = tex2D (_Texture3, IN.uv_Texture3);
    69.             half4 t4 = tex2D (_Texture4, IN.uv_Texture4);
    70.             t4 *= _Texture4Color;
    71.            
    72.             half4 t1b = tex2D (_Texture1Bump, IN.uv_Texture1);
    73.             half4 t2b = tex2D (_Texture2Bump, IN.uv_Texture2);
    74.             half4 t3b = tex2D (_Texture3Bump, IN.uv_Texture3);
    75.             half4 t4b = tex2D (_Texture4Bump, IN.uv_Texture4);
    76.            
    77.             half4 cum = t1 * color.r + t2 * color.g + t3 * color.b + t4 * color.a;
    78.             half4 nrm = t1b * color.r + t2b * color.g + t3b * color.b + t4b * color.a;
    79.             fixed fac = color.r + color.g + color.b + color.a;
    80.            
    81.             if(fac != 0)
    82.             {
    83.                 cum /= fac;
    84.                 nrm /= fac;
    85.             }
    86.             cum = lerp(t0, cum, fac);
    87.            
    88.             o.Albedo = cum.rgb;
    89.             o.Specular = cum.a * _Spec;
    90.             o.Normal = lerp(UnpackNormal(t0b), UnpackNormal(nrm), fac);
    91.             o.Gloss = _Gloss;
    92.         }
    93.         ENDCG
    94.     }
    95.     FallBack "Diffuse"
    96. }
    97.  
    To use this shader, just apply a material using the shader to your model and open up VPaint. To paint texture 1, select only the Red channel, for texture 2 use the Green channel, and so on. For an example of how to paint with only one channel, look at this image (posted in response to a previous question):

    i.imgur.com/CLmcNUV.png

    To paint more of that texture, select white, and to remove it, select black.

    I hope this helps you with your project. Let me know if you have questions.
     
    Last edited: Aug 31, 2013
  16. Deleted User

    Deleted User

    Guest

    Thanks Man. That kinda get me 95% of what I'm looking for. I think the only thing thats missing would be an option to add a black white texture for the blend mask between each the main textures this way I could get some nice crisp edges on things light peeling paint or rust. Plus I would still have the option to vertex paint where I want these to appear. Not sure if this is even doable or its pushing things too far.
     
  17. beck

    beck

    Joined:
    Nov 23, 2010
    Posts:
    294
    Not sure if that is feasible, might run just into the sample limit. I have already left the office for the day but when I'm next at a computer I will see what I can do.
     
  18. Deleted User

    Deleted User

    Guest

    No worries, for some reason I cant get the spec to work even though Its there in the alpha channel of the texture. Gloss spec sliders do seem to have any effect either.

    Also the when painting in the blue or green channels no texture is revealed in either .. all the other channels seem to work OK

    Rather that waste you time asking for features to work with a shader within VPaint I though it might be quicker to PM you with a few video files showing an example of the shader and attributes within unreal. I'm wondering if it can be replicated to work within unity. This should show you exactly what I'm looking for.

    Let me know what you think
     
  19. bpears

    bpears

    Joined:
    Aug 23, 2012
    Posts:
    249
    Can't catch a break can you beck :p
     
  20. beck

    beck

    Joined:
    Nov 23, 2010
    Posts:
    294
    @wr_uk: Below is a fixed shader. It appears I had mixed up some of the specular stuff, it should be working okay now. I'm not sure what was happening with the blue/green channels, they work okay on mine. Make sure you have a white color selected when painting, as even if you have masked out the red channel, if the red channel of the selected color is 0 then it will not add the texture. I was also able to add the blend mask to the shader. The blend mask must be a composite texture, with each channel representing the mask for the texture of their respective vertex color channel.

    Code (csharp):
    1. Shader "VPaint/Lit/Blendx5 Bump,Spec,T4Color" {
    2.  
    3.     Properties {
    4.         _BlendMask ("Blend Mask", 2D) = "white" {}
    5.    
    6.         _BaseTexture ("Base Texture (RGB: Diffuse) (A: Spec)", 2D) = "white" {}
    7.         _BaseTextureBump ("Base Texture Bump", 2D) = "bump" {}        
    8.  
    9.         _Texture1 ("Metal (RGB: Red Channel) (A: Spec)", 2D) = "white" {}
    10.         _Texture1Bump ("Metal Bump", 2D) = "bump" {}
    11.  
    12.         _Texture2 ("Rust (RGB: Blue Channel) (A: Spec)", 2D) = "white" {}
    13.         _Texture2Bump ("Rust Bump", 2D) = "bump" {}        
    14.  
    15.         _Texture3 ("Dirt (RGB: Green Channel) (A: Spec)", 2D) = "white" {}
    16.         _Texture3Bump ("Dirt Bump", 2D) = "bump" {}      
    17.  
    18.         _Texture4 ("Paint (RGB: Alpha Channel) (A: Spec)", 2D) = "white" {}
    19.         _Texture4Bump ("Paint Bump", 2D) = "bump" {}
    20.         _Texture4Color ("Paint Color", Color) = (1,1,1,1)
    21.  
    22.         _SpecColor ("Specular Color", Color) = (0.5, 0.5, 0.5, 1)
    23.         _Shininess ("Shininess", Range (0.03, 1)) = 0.078125
    24.     }
    25.  
    26.     SubShader {
    27.         Tags { "RenderType"="Opaque" }
    28.         LOD 200
    29.  
    30.         CGPROGRAM
    31.  
    32.         #pragma surface surf BlinnPhong
    33.         #pragma target 3.0
    34.  
    35.         sampler2D _BaseTexture;
    36.         sampler2D _BaseTextureBump;
    37.        
    38.         sampler2D _Texture1;
    39.         sampler2D _Texture1Bump;
    40.        
    41.         sampler2D _Texture2;
    42.         sampler2D _Texture2Bump;
    43.        
    44.         sampler2D _Texture3;
    45.         sampler2D _Texture3Bump;
    46.        
    47.         sampler2D _Texture4;
    48.         sampler2D _Texture4Bump;
    49.         fixed4 _Texture4Color;
    50.        
    51.         sampler2D _BlendMask;
    52.        
    53.         half _Shininess;
    54.  
    55.         struct Input
    56.         {
    57.             half2 uv_BaseTexture;
    58.             half2 uv_Texture1;          
    59.             half2 uv_Texture2;          
    60.             half2 uv_Texture3;          
    61.             half2 uv_Texture4;          
    62.             half2 uv_BlendMask;
    63.             float4 color : COLOR;
    64.         };
    65.  
    66.         void surf (Input IN, inout SurfaceOutput o) {
    67.  
    68.             float4 color = IN.color;
    69.            
    70.             half4 t0 = tex2D (_BaseTexture, IN.uv_BaseTexture);
    71.             half4 t0b = tex2D (_BaseTextureBump, IN.uv_BaseTexture);
    72.  
    73.             half4 t1 = tex2D (_Texture1, IN.uv_Texture1);
    74.             half4 t2 = tex2D (_Texture2, IN.uv_Texture2);
    75.             half4 t3 = tex2D (_Texture3, IN.uv_Texture3);
    76.             half4 t4 = tex2D (_Texture4, IN.uv_Texture4);
    77.             t4 *= _Texture4Color;
    78.  
    79.             half4 t1b = tex2D (_Texture1Bump, IN.uv_Texture1);
    80.             half4 t2b = tex2D (_Texture2Bump, IN.uv_Texture2);
    81.             half4 t3b = tex2D (_Texture3Bump, IN.uv_Texture3);
    82.             half4 t4b = tex2D (_Texture4Bump, IN.uv_Texture4);
    83.  
    84.             half4 blendMask = tex2D( _BlendMask, IN.uv_BlendMask);
    85.             color *= blendMask;
    86.  
    87.             half4 cum = t1 * color.r + t2 * color.g + t3 * color.b + t4 * color.a;
    88.             half4 nrm = t1b * color.r + t2b * color.g + t3b * color.b + t4b * color.a;
    89.             fixed fac = color.r + color.g + color.b + color.a;
    90.  
    91.             if(fac != 0)
    92.             {
    93.                 cum /= fac;
    94.                 nrm /= fac;
    95.             }
    96.            
    97.             cum = lerp(t0, cum, fac);
    98.  
    99.             o.Albedo = cum.rgb;
    100.             o.Gloss = cum.a;
    101.             o.Normal = lerp(UnpackNormal(t0b), UnpackNormal(nrm), fac);
    102.             o.Specular = _Shininess;
    103.         }
    104.  
    105.         ENDCG
    106.  
    107.     }
    108.  
    109.     FallBack "Diffuse"
    110.  
    111. }
     
  21. beck

    beck

    Joined:
    Nov 23, 2010
    Posts:
    294
    Hi guys, VPaint 1.2 is through the certification process and the update is now live.
     
    Last edited: Sep 6, 2013
  22. Venged

    Venged

    Joined:
    Oct 24, 2010
    Posts:
    500
    Very nice! This is on My shopping list now(-:
     
  23. beck

    beck

    Joined:
    Nov 23, 2010
    Posts:
    294
    Just finished implementing per-vertex ambient occlusion without baking lightmaps! Although this will be included in the next version, I don't think this is enough of a change for a full update; what's missing in your vertex painting workflow?
     
  24. Jax_Cavalera

    Jax_Cavalera

    Joined:
    Jul 22, 2013
    Posts:
    44
    I'm creating a game where the players will have the ability to paint their own game character texture and thought that being able to use this inside of the game would be really handy. Is it possible to include a tool like this in your game so players can perform direct texture painting? If not, what would be my best method to achieve this?
     
  25. Deleted User

    Deleted User

    Guest

    wow amazing
     
  26. beck

    beck

    Joined:
    Nov 23, 2010
    Posts:
    294
    @Jax_Cavalera VPaint currently doesn't have a run-time vertex painter. There are a number of helpful functions that will aid in modifying vertex colors, but the painter itself is editor-only. However, someone asked a similar question via PM recently and I created an example script for how you might accomplish vertex painting during runtime - it's quite simple!

    Code (csharp):
    1.  
    2. public MeshCollider[] paintTargets = new MeshCollider[0];
    3. public Color targetColor;
    4. public float paintRadius = 1f;
    5. public float paintSpeed = 1f;
    6.  
    7. public void Update ()
    8. {
    9.  
    10.     if(Input.GetKey(KeyCode.Mouse0))
    11.     {
    12.  
    13.         Ray r = Camera.main.ScreenPointToRay(Input.mousePosition);
    14.         foreach(MeshCollider target in paintTargets)
    15.         {
    16.  
    17.             RaycastHit hit;
    18.             if(target.Raycast(r, out hit, 100f))
    19.             {
    20.  
    21.                 var mesh = target.sharedMesh;
    22.                 var colors = mesh.colors;
    23.                 var vertices = mesh.vertices;
    24.                 if(colors.Length != vertices.Length)
    25.                     colors = new Color[vertices.Length]
    26.  
    27.                 //Loop through the vertices of the mesh to see which ones we hit
    28.                 for(int i = 0; i < vertices.Length; i++)
    29.                 {
    30.                     //Convert the vertex into world space
    31.                     var point = target.TransformPoint(vertices[i]);
    32.  
    33.                     float distance = Vector3.Distance(point, hit.point);
    34.  
    35.                     //If the vertex is too far away, don't perform any calculations
    36.                     if(paintRadius < distance) continue;
    37.  
    38.                     float factor = 1-distance/paintRadius;
    39.  
    40.                     colors[i] = Color.Lerp(colors[i], targetColor, paintSpeed * factor * Time.deltaTime);
    41.                 }
    42.                 mesh.colors = colors;
    43.             }
    44.         }
    45.     }
    46. }
    47.  
    Note I haven't tested this code, but hopefully it gives you an idea of how runtime vertex painting might be done.
     
  27. I am da bawss

    I am da bawss

    Joined:
    Jun 2, 2011
    Posts:
    2,574
    Hey beck,

    I am still wondering if you would implement direct access to color pickers, something like this :







    It would make changing color and painting so much faster (1 click instead of 3)
     
  28. Nifflas

    Nifflas

    Joined:
    Jun 13, 2013
    Posts:
    118
    I'm on Unity 4.1.5 and just got VPaint from the asset store. There are some problems, maybe I'm using it wrong.

    All my tests involve creating a new project, adding a plane and creating a VPaint Group, and making them both a child of an empty game object.

    * When saving and exiting a scene, then loading it again, the planes no longer appear painted. That is, until I click the plane which fixes it.
    * Sometimes when loading a scene, the plane is invisible until I select the New VPaint Group and enable the VPaint editor.
    * When dragging the parent game object into the project browser to create a prefab, a seemingly random number of "Editor Colliders" are being created as children to the plane.
    * When dragging the prefab into the scene, the plane is invisible until I select the VPaint Group and enable the VPaint editor.
    * When saving a scene, sometimes Unity reports "Cleaning up leaked objects in scene since no game object, component or manager is referencing them. Mesh has been leaked 1 times." and the vertex painted data is lost.
    * I got a NullReferenceException when loading a VPaint test project I had experimented with earlier.

    I just moved to VPaint since our previous vertex painter of choice would also randomly lose data. This one seems very nice though, maybe it'll work well enough that we can use a later version of it.
     
    Last edited: Sep 17, 2013
  29. beck

    beck

    Joined:
    Nov 23, 2010
    Posts:
    294
    Hi Nifflas,
    That seems to be an appropriate workflow, and I'll see if I can help you debug your problems.

    1. That's an unfortunate bug with how I'm doing the automatic loading of vertex colors, since it doesn't save instances it will apply them when the scene initially changes - but if you open the same scene, then it doesn't register a change. I'm hoping to find a solution to this in the future. For now, you'll have to select the vpaint group to reload the vertex colors when a scene is reloaded.
    2. Is the plane itself disappearing - as in, there's no wire-frame displayed when the object is selected? One thing to check is to open the object maintenance panel and make sure there are no errors. If it's losing mesh references that is a serious problem, so please let me know any other information about how it might have been caused.
    3-5. I took a look and I am seeing these same behaviours. It seems that VPaint is not properly deconstructing it's editor instances when creating a prefab. I'll have this fixed in the next version.
    6. Well that's never good. If it happens again, could you let me know the call stack so I can debug the problem?

    Thanks for posting the problems you've been having. I will work to have them remedied as soon as possible. If your workflow is time sensitive, PM me your invoice # so that I can give you an advance copy of the update (after dev time, the update certification process usually takes a week).
     
  30. beck

    beck

    Joined:
    Nov 23, 2010
    Posts:
    294
    I like where that's going. As I said it's definitely something I want to implement, and it's still on my list. I'm hoping to get it in in this coming update or the next.
     
  31. Nifflas

    Nifflas

    Joined:
    Jun 13, 2013
    Posts:
    118
    I'll investigate a bit further tomorrow, and see if I can figure out some consistent way to reproduce the problems I've had.
     
  32. I am da bawss

    I am da bawss

    Joined:
    Jun 2, 2011
    Posts:
    2,574
    Awesome! You definitely got a buyer as soon as you get that in ! ;)
     
  33. Nifflas

    Nifflas

    Joined:
    Jun 13, 2013
    Posts:
    118
    Agh! I set up a screen recorder and now I'm unable to reproduce most problems I had earlier. I'll keep trying though.

    Edit: I managed to produce a project where I get the nullreference when I try to select a plane.
     
    Last edited: Sep 19, 2013
  34. beck

    beck

    Joined:
    Nov 23, 2010
    Posts:
    294
    Hm, I got the project and I'm not seeing the same behavior. Is there something specific you're doing to trigger the exception?

    Also, I was able to reproduce most of the problems you described and I went through and fixed them. Those issues related to prefabs should be fixed in the next update, which was submitted yesterday. I'll post again when the update is pushed through :)
     
  35. beck

    beck

    Joined:
    Nov 23, 2010
    Posts:
    294
    VPaint 1.3 is now up on the asset store - grab it while it's hot! It includes several bug fixes (including problems using VPaintGroup with prefabs) and also a per-vertex ambient occlusion implementation. Here's a gif of the AO on the trusty Unity soldier:



    The ambient occlusion can be found under the Import menu on the layers panel.

    Another feature that was implemented in this version was the auto-updating of meshes when they are reimported. Because meshes are instanced while being edited, they weren't being updated properly if you were to change the model in you 3D program and reimport it until you reloaded the scene. This is no longer the case - VPaint will detect that the model has been reimported and update the instanced mesh.

    And here's the changelog for 1.3:

    Code (csharp):
    1.  
    2.     - Added Ambient Occlusion baking (Import -> Ambient Occlusion)
    3.     - Fixed issue with the Add To Last menu item where it wouldn’t actually add anything
    4.     - VPaint now recalculates errors after selecting “Clear All Colors” or “Clear Current Layer” in the object maintenance window
    5.     - Meshes still linked to their original fbx file will now properly update if that file is imported while the object is open in VPaint.
    6.     - Fixed a number of bugs related to prefab instancing
    7.     - Fixed bug where reloading a scene would lose vertex colors
    8.     - Fixed rare bug where vertex color changes could be lost
    9.  
     
  36. bpears

    bpears

    Joined:
    Aug 23, 2012
    Posts:
    249
    EDIT: I worded my post wrong, so here, I rewrote:

    Is it possible to take a single mesh, and UV map some of the mesh, and texture a part of it, and then bring it into Unity and use your tool to paint over the whole mesh, including the textured part, with 4-5 new textures? If so, would it be beneficial to go ahead and UV the rest of it, or would it not make a difference?

    You see, I want to texture my road in modeling program, and it is combined in one mesh with the terrain. And then I would like to paint over all of it with your tool. But since the road needs to be textured with UV map so that it tiles along path, I wonder if the tool would still work?
     
    Last edited: Sep 22, 2013
  37. bpears

    bpears

    Joined:
    Aug 23, 2012
    Posts:
    249
    Also, is there a way to use 2 materials on one mesh, so that then you could use like 8-10 textures all blended? That would be killer for terrain. And for previous post.
     
  38. beck

    beck

    Joined:
    Nov 23, 2010
    Posts:
    294
    Well it's not possible to use 2 materials on one mesh unfortunately, but for your above problem I think the vanilla blend shaders would work just fine. The blend textures do use your UV maps so as long as all your textures are intended to use them then it would show up correctly.
     
  39. bpears

    bpears

    Joined:
    Aug 23, 2012
    Posts:
    249
    I see. So then I could treat the texture that is already placed on model for the road, as a channel, so that it's texture can take up all the UV space just like a terrain texture would? Basically telling the tool, hey this is pretty much just a terrain plane, I just textured part of it already. And still paint on that too with new textures.

    Not sure about this, since UV's for the road part would be overlapped by terrain UV's in order to texture the road. So I am a bit confused about this situation.
     
    Last edited: Sep 22, 2013
  40. CyproNET

    CyproNET

    Joined:
    Sep 15, 2013
    Posts:
    79
    Hi,

    I was wondering when you ere going to implement a Diffuse transparency in materials. Everything looks opaque.
    Is this going to be an option in the future?
     
  41. beck

    beck

    Joined:
    Nov 23, 2010
    Posts:
    294
    @bpears:
    Yes, for the example of a terrain mesh where you might be using a combination of tiling textures and unique UVs, you could set the tiling settings for the tiling textures to a large amount so that it has the right level of tiling in combination with the unique texture.
    If you're looking to have two different UV layouts however you'll need a unique shader for that. It's really not that hard to modify to include that, so if you have a particular shader you'd like to be modified let me know.


    @Coreystj
    Absolutely, in fact it's a simple change and I'll include a large set of transparent variations in the next release. In the meantime, I'm happy to modify and post here any variations you need for your project.
     
  42. CyproNET

    CyproNET

    Joined:
    Sep 15, 2013
    Posts:
    79
    Thank you so much!!
     
  43. CyproNET

    CyproNET

    Joined:
    Sep 15, 2013
    Posts:
    79
    Do you have any idea when the next version will be available? Im very excited for that transparency.
     
  44. beck

    beck

    Joined:
    Nov 23, 2010
    Posts:
    294
    Hi Coreystj, the next version is a ways off - additional shaders don't constitute an update, so I am finishing some other features before the next update. What particular shaders would you like modified to have transparency? Let me know and I'll post them here for you.
     
  45. Reefer

    Reefer

    Joined:
    Jan 13, 2012
    Posts:
    34
    Hey beck, I got few questions for you before thinking of buying it.

    1) Is this fully functional with Unity3D Indie?
    2) Is there a demo version anywhere?
    3) Is this hard to use?
     
  46. beck

    beck

    Joined:
    Nov 23, 2010
    Posts:
    294
    Hi Reefer,

    1) Yes the tool is fully functional in Indie!

    2) No there is not currently a demo version available. I've considered doing this sometime in the future but in the meantime there is only the promotional material you see in the first post.

    3) As the tool author I am a bit bias, but I took special care with the usability of the tool - the whole point is to get you in there painting as quick and painless as possible. The more complex features are accessible from menus, but the don't encroach on the general workflow. The tool also comes with a pdf manual, including a Getting Started section to help you with the setup steps. Getting started painting on an object can be done in under 5 clicks :)
     
  47. Reefer

    Reefer

    Joined:
    Jan 13, 2012
    Posts:
    34
    Ok, thanks for fast answer. I think I will buy this on next week.
     
  48. Aptatart

    Aptatart

    Joined:
    Sep 24, 2013
    Posts:
    2
    In public void OnSceneGUI ()

    We had to change Tools.current = Tool.None; for UnityEditor.Tools.current = UnityEditor.Tool.None;
    to solve an error.
     
  49. beck

    beck

    Joined:
    Nov 23, 2010
    Posts:
    294
    Hi Aptatart,
    That occurs when you have your own class named "Tool" or "Tools", which conflicts with Unity's own classes with the same name. I would strongly advise against using class names which Unity also uses, since some extensions on the asset store might not have such an easy fix. However, I've made this change in VPaint to avoid these particular instances (Tool seems to be used pretty regularly! Another user has had this same issue) and in future updates you won't have to make the change yourself. Thanks for posting your fix for others to see!
     
    Last edited: Sep 26, 2013
  50. CyproNET

    CyproNET

    Joined:
    Sep 15, 2013
    Posts:
    79
    Hi Mr Beck,

    I would really like to have just a Texture Color Diffuse material. I know that having materials alpha blended does cause alpha calculation problems, but the way im going to use it will work fine.

    So yes its basically Diffuse Texture that does have an effect with vertex alpha value changes. Im not sure if you can also add in an Alpha Clip one too but having both would be nice!

    Cheers Corey S.

    Hey guys, this was probably the best 40 bucks ive ever spent, especially that AO addon. Omg the AO makes things look a million times better