Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

ZzZzZ UVPaint ( skinned mesh Decal+Texturing System) ZzZz

Discussion in 'Assets and Asset Store' started by iRobi, May 1, 2016.

  1. iRobi

    iRobi

    Joined:
    May 1, 2016
    Posts:
    170



    UNITY 5 Ready!
    UVPaint creates decals and immediately bakes them in needed ShaderProperty texture on 3D objects. It allows you to draw a variety of accessories and decals into the 3D model at runtime without losing performance and video memory. Very easy and intuitive code.
    Features:

    • Does not require Unity Pro (Unity 5) for stable working;
    • Supports Android and IOS;
    • Does not create additional meshes;
    • More Options;
    • Works with custom Shader;
    • Decals support any alpha channels;
    • Unlimited decals on every skinned mesh;
    • The possibility for creating a wide range of necessary decals in realtime;
    • Only bake texture based on unwraped UV (you can create tattoo, details, blood splatter, etc.);
    • You can draw back to the original texture using the eraser.
    UVPaint Car Garage.jpg
    2.jpg

    Change Log:

    v1.7a
    Notice: This is the last version that supports Unity 4
    • Added "Shadow Painting" feature. (based on depth map)
    • Added Transparent shaders support.
    • Added NPOT textures support.
    • Added "Zombie Race" game demo.
    • Added new Demo Scene "UVPaint Place"
    • Fixed trouble with Repeat Decals (wrap mode:Repeat now supports)
    • Removed old demo scenes.

    v1.5e
    • Now plugin works up to 3x faster;
    • Now works perfectly with Unity 5.4 and high;
    • Added Documentation;
    • Added Component "Ignore UVPaint";
    • Added UVPaint Options for more convenience;
    • Added FlexiMode (Ability to choose Texture Property of the Shader. For example: _BumpMap);
    • Added Rotation in degrees option;
    • Added function to save Result in Disk Space;
    • Added Deep Alpha option;
    • Added Ability to switch Decaling to Shared Material;
    • Added global Alpha option;
    • Fixed bug with pink material on Unity 5.4 and high;

    v1.2b
    • Fixed bug with Android "Black" textures;
    • Added Full Restore tool for turning back the original texture;
    • Added Decal States (save points) for Restore Tool;
    • Small update existing scenes;



    v1.1a
    • Fixed bug with lost textures;
    • Fixed issues with dll (console errors);
    • Increased spot distance;
    • Added erase tool for turning back the original texture;
    • Reduced package size;
    • Added new demo scene "Shooter" (demonstrates blood, color decals and erase tool).

    Raycast Tutorial:



    Visit our web-site: http://irobi.uz


    Follow us:

    Facebook
    Twitter
     

    Attached Files:

    Last edited: Apr 20, 2017
    theANMATOR2b likes this.
  2. ElectroMantis

    ElectroMantis

    Joined:
    Sep 15, 2013
    Posts:
    78
    Looks really interesting. In the paint splat scene, the projection looks funky when the paint hits the corner of the wall though.

    Could this be used in the editor too? That would make it handy for terrain and wall decals. Although for that one would likely want to write onto a detail map instead of the albedo (that's what I'm assuming is going on here).

    'Cause the way it is right now, as far as I'm aware, most decal systems out there use a transparency/fade shader. And that's a bit of an issue when shadows get involved.

    But this system seems pretty cool though. First I've seen on the asset store that can project onto skinned meshes. The results kinda reminds me of how the source engine does it.
     
  3. iRobi

    iRobi

    Joined:
    May 1, 2016
    Posts:
    170
    Thanx for Reply! Nope, this doesn't use any mesh, and another shaders. Only bake texture based on Unwraped UV. Editor side will be in the next update as feature
     
  4. Hamesh81

    Hamesh81

    Joined:
    Mar 9, 2012
    Posts:
    405
    This looks to have a lot of promise! I have been looking for a decal system but the existing ones do not fit the bill. I have a few questions please:

    1) Can this system be used to create/paint bullet holes at the point where a rigidbody bullet collided with another mesh? In the paintball demo, how do you calculate the position where to paint the decal on the skinned mesh? I have previously tried this and could not resolve it.

    2) Is it possible to create/paint decals on enter and on the exit of a collision? For example, when a bullet collides with another mesh it would create one decal on entering it, fly through the mesh, and then exit it creating a second decal.

    3) If an explosion particle is initiated, is it possible to create/paint a dark explosion crater on the surface(s) where the explosion was instantiated? Like this:


    It would be great do be able to try out the demo scenes via web player, to get a better understanding of how this system works and whether it is appropriate for my use case. Keep up the great work :)
     
  5. iRobi

    iRobi

    Joined:
    May 1, 2016
    Posts:
    170
    1. Yes! In Color Play Demo all characters have colliders, and direction of decals was calculated by Force direction of ball rigidbody.
    2. Yes! It do that.
    3. Yes, but mesh must have unwrap UV like an Characters UV.
    In next three days, i will publish web demo with new video guide. Thanx for reply!
     
    Hamesh81 likes this.
  6. Hamesh81

    Hamesh81

    Joined:
    Mar 9, 2012
    Posts:
    405
    Sounds great, I look forward to trying this out ;)
     
  7. Lothar-

    Lothar-

    Joined:
    Jan 26, 2013
    Posts:
    3
    Hi!
    Can it use a texture that is not alpha? If I make a diffuse texture that I want to use straight without adding any color on it with your plugin?
     
  8. iRobi

    iRobi

    Joined:
    May 1, 2016
    Posts:
    170
    Hi! Plugin create instance of the texture, which not affect the shared material. Texture without alpha? (Decal?) Yes, but why?
     
  9. Lothar-

    Lothar-

    Joined:
    Jan 26, 2013
    Posts:
    3
    I mean can I use diffuse texture (multiple colors)? In your video there is only single colored decals. For example I'd like to have a multi-colored tattoo.
     
  10. iRobi

    iRobi

    Joined:
    May 1, 2016
    Posts:
    170
    Yes, its able too))
     
  11. Priyanka-Rajwanshi

    Priyanka-Rajwanshi

    Joined:
    Nov 22, 2013
    Posts:
    7
    Hi

    I had a few questions.

    1. Does the painted Texture stay when we stop the game or when the other scene is loaded?
    2. Can I use my own texture type to painted on the mesh i.e. my own blood Splash when the bullet hits the mesh.
    3. Will it work for box and capsule colliders?
    4. Will the texture be formed on the hit point of a Raycast?
     
    Last edited: May 17, 2016
  12. iRobi

    iRobi

    Joined:
    May 1, 2016
    Posts:
    170
    1. Yes!
    2. Yes, its fully customized asset.
    3. Yes.
    4. Hmm, asset work by texture projection. Yes, in video all work by hit point of colliders (Color Play scene)
     
  13. ge01f

    ge01f

    Joined:
    Nov 28, 2014
    Posts:
    44
    Does this work in 5.3.3 and 5.3.4? The package doesn't say it's updated for 5.x. It looks like you're still active with it, but I just wanted to make sure before buying.

    Also, is there a way to do a fade back into the original texture setup? I would like to use this for environmental effects which wear off over time, and want them to revert to their original state with a fade-back in slowly. Is that a normal operation in your asset?

    Thanks in advance!

    -g
     
    Last edited: May 31, 2016
  14. iRobi

    iRobi

    Joined:
    May 1, 2016
    Posts:
    170
    Yea, its fully compatible with all UNITY 5 versions. Also this plugin work from 4.0.
    Yes, now this plugin are support Erase Decals (Restore) as new feature.
    Sorry for late Reply!
     
  15. iRobi

    iRobi

    Joined:
    May 1, 2016
    Posts:
    170
    Hamesh81 likes this.
  16. Hamesh81

    Hamesh81

    Joined:
    Mar 9, 2012
    Posts:
    405
    Hi @iRobi I have tried out the demo and it is fantastic! The performance was quite slow though, but I suppose that that was because of all the instantiating and destroying?

    I have a question regarding the shaders for this. Do I need to use a specific shader on my models to get it to work, or can any shader be used? I have a special skin shader for example that I am using, will this work with that?

    Also I noticed in the asset store that there is a dll file included, does this mean that the source code cannot be modified?
     
  17. iRobi

    iRobi

    Joined:
    May 1, 2016
    Posts:
    170
    Yes, bullet Instantiating, destroying))
    Now this work with mainTexture (basically used by Standart Unity Shaders), but in next update, i will add workaround with any Property names.
    Hmm, yes, but if you need Source Code, i can provide it.
     
    Hamesh81 likes this.
  18. Hamesh81

    Hamesh81

    Joined:
    Mar 9, 2012
    Posts:
    405
    Ok great, thanks a lot.
     
  19. iRobi

    iRobi

    Joined:
    May 1, 2016
    Posts:
    170
    No problem, let me know if you find bugs
     
  20. bocs

    bocs

    Joined:
    May 9, 2009
    Posts:
    335
    hippocoder likes this.
  21. iRobi

    iRobi

    Joined:
    May 1, 2016
    Posts:
    170
  22. iRobi

    iRobi

    Joined:
    May 1, 2016
    Posts:
    170
  23. Kilo_

    Kilo_

    Joined:
    Mar 21, 2012
    Posts:
    8
    This looks great!

    Can this be used to create custom textures for multiplayer avatars to be viewed over a network?

    and if so can it have different layers involved?

    one layer for the players custom paint texture and another layer for environmental effects and another layer for combat effects.

    so when I want to erase battle damage the player custom layer will not be erased.
     
    Last edited: Jun 30, 2016
  24. iRobi

    iRobi

    Joined:
    May 1, 2016
    Posts:
    170
    Yes! Must be work.
    No, UVPaint doesn't support Multi Layer system, but Textures can be baked and erased to wanted state. In future, asset will support any property name and work with any shader (which has layer mask)
     
    Last edited: Jul 1, 2016
  25. Griffo

    Griffo

    Joined:
    Jul 5, 2011
    Posts:
    664
    @iRobi

    Hi,

    I've just purchased your UVPaint and seem to be having a problem, I'm using Puppet Master and when a bullet or recast hits the enemy no decal is shown, I've tested it with other GameObjects in the scene and it's working fine, shows the decals every time ..

    Any idea why they are not showing on a Puppet Master GameObject?

    Thanks.
     
  26. iRobi

    iRobi

    Joined:
    May 1, 2016
    Posts:
    170
    Hello, i think, i know whats wrong. Can you call your Puppet GameObject as: "YourGameObject.transform.root.gameObject".
    Please, tell me, if this solution works, thanks!
     
    Last edited: Jul 13, 2016
  27. Griffo

    Griffo

    Joined:
    Jul 5, 2011
    Posts:
    664
    @iRobi

    Thanks for the reply.

    This is the hierarchy of the Puppet Master GO

    Screen Shot 2016-07-13 at 08.45.47.png

    I've tried as you asked and still not working.

    In the hierarchy above the Puppetmaster GO holds the rag doll, and the Character Controller GO holds the model and skinned mesh renderer, so the colliders being detected are on the rag doll in the Puppetmaster GO.
     
  28. iRobi

    iRobi

    Joined:
    May 1, 2016
    Posts:
    170
    Please, leave a part of your code where you get GO (By Raycast or something yet) and call UVPaint.Create();
     
  29. Griffo

    Griffo

    Joined:
    Jul 5, 2011
    Posts:
    664
    @iRobi

    I do ,, This is my code ..

    Code (JavaScript):
    1. function Update ()
    2. {
    3.     if (Input.GetMouseButtonDown(0))
    4.     {
    5.         var ray : Ray = Camera.main.ScreenPointToRay(Input.mousePosition);
    6.  
    7.         var hit : RaycastHit = new RaycastHit();
    8.  
    9.         if (Physics.Raycast(ray, hit, 200, layers))
    10.         {
    11.             UVPaint.Create(hit.transform.gameObject, hit.point, hit.transform.rotation, f1, true, Random.Range(0.5,1.0), color);
    12.         }
    13.     }
    14. }
     
  30. iRobi

    iRobi

    Joined:
    May 1, 2016
    Posts:
    170
    Did you try like this?
    :
    Code (JavaScript):
    1. function Update ()
    2. {
    3.     if (Input.GetMouseButtonDown(0))
    4.     {
    5.         var ray : Ray = Camera.main.ScreenPointToRay(Input.mousePosition);
    6.         var hit : RaycastHit = new RaycastHit();
    7.         if (Physics.Raycast(ray, hit, 200, layers))
    8.         {
    9.             UVPaint.Create(hit.transform.root.gameObject, hit.point, hit.transform.rotation, f1, true, Random.Range(0.5,1.0), color);
    10.         }
    11.     }
    12. }
    hit.transform.root.gameObject instead hit.transform.gameObject
     
    hopeful likes this.
  31. Griffo

    Griffo

    Joined:
    Jul 5, 2011
    Posts:
    664
    Thank you .. That worked :) ..
     
  32. iRobi

    iRobi

    Joined:
    May 1, 2016
    Posts:
    170
    You're always welcome :)
     
  33. Griffo

    Griffo

    Joined:
    Jul 5, 2011
    Posts:
    664
    @iRobi
    Hi,
    I’ve been trying you UVPaint and it’s not behaving as I expected, please take a look at the 2 video links.

    1 The cube, when I hit the cube the blood effect appears on all faces of the cube, the cube and sphere are both standard Unity.

    2 The sphere, the effect only seem to effect one side of the sphere, as you can see the paintball hits the sphere but the effect appears on the other side.

    Do you know why this is happening ?
    Here is the code I’m using, the bothSides is set to false, only hitting one side.
    import iRobi;

    Code (JavaScript):
    1. var f1 : Texture2D;
    2. var bothSides : boolean;
    3. var color : Color = newColor(1,1,1,1);
    4.  
    5. private var frame : int;
    6. private var Direct_VECTOR : Vector3;
    7. private var trans : Transform;
    8. private var time : float;
    9. private var test : boolean;
    10.  
    11. function Start ()
    12. {
    13. trans = transform;
    14. Direct_VECTOR = trans.position;
    15. time = Time.time;
    16. }
    17.  
    18. function Update ()
    19. {
    20. frame+=1;
    21.  
    22. if(frame.Equals(2))
    23. {
    24. Direct_VECTOR = trans.position;
    25. }
    26. trans.LookAt(Direct_VECTOR);
    27.  
    28. if(Time.time > time+10)
    29. {
    30. Destroy(gameObject);
    31. }
    32. }
    33.  
    34. function OnCollisionEnter(collision: Collision)
    35. {
    36. var contact : ContactPoint = collision.contacts[0];
    37. trans.forward=-trans.forward;
    38. UVPaint.Create(contact.otherCollider.gameObject, contact.point,trans.rotation, f1, bothSides, Random.Range(0.4,0.8), color);
    39. //CreateDec.Create(contact.otherCollider.gameObject,contact.point,trans.rotation,f1,false,Random.Range(1.5f,3f),color);
    40. Destroy(gameObject);
    41. }
     
    Last edited: Jul 18, 2016
  34. iRobi

    iRobi

    Joined:
    May 1, 2016
    Posts:
    170
    Hello again! UVPaint now worked only with Unwrapped UV like character UV. Cube has tiled UV map.
    Issue with sphere situated in Unity physics, please try another way to use UVPaint.Create();

    UVPaint is not designed to work with primitives, with the characters only. But in the future, support isolated UV map will be added to work with primitives and the environment.
     
  35. Griffo

    Griffo

    Joined:
    Jul 5, 2011
    Posts:
    664
    OK, Thanks for the reply ....
     
  36. iRobi

    iRobi

    Joined:
    May 1, 2016
    Posts:
    170
    New version:
    v1.2b
    • Fixed bug with Android "Black" textures;
    • Added Full Restore tool for turning back the original texture;
    • Added Decal States (save points) for Restore Tool;
    • Small update existing scenes;
     
  37. local306

    local306

    Joined:
    Feb 28, 2016
    Posts:
    118
    For the texture being projected, is it just adding the albedo info to the skinned mesh texture, or is the full PBR texture of the project material transferred?

    I'm thinking if you're projecting blood, paint, or some kind of wet material, could you have its specularity replace the parent material?
     
  38. iRobi

    iRobi

    Joined:
    May 1, 2016
    Posts:
    170
    Hi! UVPaint bakes existing texture blood (or other decal), further stores all decals in this texture. You can also restore the texture partially or completely with bundled tools.
     
  39. local306

    local306

    Joined:
    Feb 28, 2016
    Posts:
    118
    So if the texture is a full PBR material using Unity's standard shader, all that information will get baked into the projection overlay? (Sorry if this question is redundant. Just want to confirm as I am interested in this product).
     
  40. iRobi

    iRobi

    Joined:
    May 1, 2016
    Posts:
    170
    Works perfectly with Unity5 Standart shader.
    Only must have is Unwrapped UV
    AssetDifference.jpg
     
    local306 likes this.
  41. daville

    daville

    Joined:
    Aug 5, 2012
    Posts:
    267
    Does this requiere a special Shader? or can it work with any Shader I'm using?
     
  42. iRobi

    iRobi

    Joined:
    May 1, 2016
    Posts:
    170
    Now UVPaint works only with "_MainTexture" shader property, if your shaders uses this property, all must be ok. But in next update i will add customized Property name, which able to flexible configurate your decal work with any shader.
     
    local306 likes this.
  43. GenOli

    GenOli

    Joined:
    Apr 21, 2013
    Posts:
    135
    Can this paint only diffuse maps?
    What about normal maps or both at same time?
     
  44. iRobi

    iRobi

    Joined:
    May 1, 2016
    Posts:
    170
    Yes!
    You are talking about Decals on normal maps?
     
  45. GenOli

    GenOli

    Joined:
    Apr 21, 2013
    Posts:
    135
    Supposing my character has a material (Standard shader) with a diffuse texture and a normal map texture, could UVPaint apply a decal material that also has diffuse and a normal map?
     
  46. iRobi

    iRobi

    Joined:
    May 1, 2016
    Posts:
    170
    Yes of course! UVPaint are access to texture by Shader property name ("_MainTexture")
     
  47. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,110
    Looks like a great asset! How would this work for melee based weapons or fists?
     
  48. iRobi

    iRobi

    Joined:
    May 1, 2016
    Posts:
    170
    Thanx! If your models have Unwraped UV, UVPaint must work fine!
     
    julianr likes this.
  49. GenOli

    GenOli

    Joined:
    Apr 21, 2013
    Posts:
    135
    So no _BumpMap support then? Only _MainTex?
     
  50. iRobi

    iRobi

    Joined:
    May 1, 2016
    Posts:
    170
    In this version no. But next in update i will add flexibility shaders property. (All shaders property name will be support)