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. GenOli

    GenOli

    Joined:
    Apr 21, 2013
    Posts:
    135
    Does UVPaint recompress the character's textures to ETC2 after it adds the decal?

    (I am deploying to mobile)
     
  2. beNice

    beNice

    Joined:
    Sep 12, 2014
    Posts:
    28
    Hey. Congrats on the daily deal. We have been looking forward to getting this asset.

    Is it possible to get some PlayMaker actions to use with UVPaint?

    Thanks!
     
  3. iRobi

    iRobi

    Joined:
    May 1, 2016
    Posts:
    170
    Hi! Yes! Fully compatible with mobile platforms.
    No, but UVPaint is very easy to use. Just one call Function to make decal!
     
  4. GenOli

    GenOli

    Joined:
    Apr 21, 2013
    Posts:
    135
    Ok I just bought it, imported into my Android project, using Unity 5.4.0p3, I get this shader error (character in Brush Paint demo is pink):

    Shader error in 'Hidden/iRobi/Projector': variable 'o' used without having been completely initialized at line 110 (on d3d9)

    Compiling Vertex program
    Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING
     
  5. iRobi

    iRobi

    Joined:
    May 1, 2016
    Posts:
    170
    So bad, UVPaint is work? Decals is applied? Color Play demo scene is work?
     
  6. GenOli

    GenOli

    Joined:
    Apr 21, 2013
    Posts:
    135
    I just tried on Windows platform and it works, must be something to do with my Android project, will keep investigating.

    Edit: Created a new Android project with UVPaint and it works, at top though it says DX11 instead of DX9, so it could be that my other project is stuck in DX9 for some reason and UVPaint doesn't like it.
     
    Last edited: Sep 19, 2016
  7. iRobi

    iRobi

    Joined:
    May 1, 2016
    Posts:
    170
    I wrote the Fix. where can I send it?
     
  8. SweatyChair

    SweatyChair

    Joined:
    Feb 15, 2016
    Posts:
    118
    We brought the plugin today too for our mobile game, which player can brush paint their characters.

    May be a good idea to provide/fix a demo in Android too. I built a demo apk, the camera rotate drag is not working and the one touch paint not working well as touch (although it's not the plugin for)

    Also a minor con is that the script style is a bit messy (variables use both PascalCase and camelCase, sorry I may be a bit strict programmer in styling), I need spend some time to understand the demo script.
     
    Last edited: Sep 19, 2016
  9. SweatyChair

    SweatyChair

    Joined:
    Feb 15, 2016
    Posts:
    118
    And I also have problem on "Saving", I assume it's the "ExportToPNG" right?

    Every time I press it, part of the model became white, and nothing is saved. I stop the game and start again, the model back to original.

    Screen Shot 2016-09-19 at 6.43.10 PM.png

    Unity 5.4.0p3, Mac OS X
     
  10. iRobi

    iRobi

    Joined:
    May 1, 2016
    Posts:
    170
    Textures are saved at Assets folder. Demo code was written superficially. The main principle is to call just one function UVPaint.Create();
     
  11. Guile_R

    Guile_R

    Joined:
    Dec 29, 2012
    Posts:
    53
    Does it support non skinned meshes?
     
  12. SweatyChair

    SweatyChair

    Joined:
    Feb 15, 2016
    Posts:
    118
    I found the problem happens only in Mac (disregard I am in standalone, iOS or Android build), the PNG generated is half whiten!

    Screen Shot 2016-09-19 at 8.58.25 PM.png Screen Shot 2016-09-19 at 8.58.49 PM.png

    While in my PC works fine. Since the UVPaint.FIX function is sealed in dll, I cannot debug futher.... Can you possibly take a look?
     
    Last edited: Sep 20, 2016
  13. iRobi

    iRobi

    Joined:
    May 1, 2016
    Posts:
    170
    Yes, if mesh have Unwrapped UV
     
  14. iRobi

    iRobi

    Joined:
    May 1, 2016
    Posts:
    170
    UVPaint is not officially supported Mac. If you want, I can send you the source code
     
  15. ikemen_blueD

    ikemen_blueD

    Joined:
    Jan 19, 2013
    Posts:
    312
    I just bought it. Can I request the source? I prefer to work with source packages for my game though :)
     
  16. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,110
    yes, source would be great. Trying to fix the mac issue also.
     
  17. iRobi

    iRobi

    Joined:
    May 1, 2016
    Posts:
    170
    Now I am far away from my PC. I uploaded the source code in the update as soon as I can. Patience guys
     
    julianr and ikemen_blueD like this.
  18. ikemen_blueD

    ikemen_blueD

    Joined:
    Jan 19, 2013
    Posts:
    312


    I did a quick test. When I shoot very near to the wall, the decal got horizontally stretched. Is it intended or a bug?
     
  19. iRobi

    iRobi

    Joined:
    May 1, 2016
    Posts:
    170
    This demo based on Unity physics. Its normal, the distance between A and B must be greater than 0
     
  20. GenOli

    GenOli

    Joined:
    Apr 21, 2013
    Posts:
    135
    You can PM me the code/shader fix but I found a quick fix, so I could wait for store update if that's more convenient for you; I run Unity with commandline: -force-d3d11

    Android now starts in DX11 mode.
     
  21. beNice

    beNice

    Joined:
    Sep 12, 2014
    Posts:
    28
    Can we get an option to rotate textures (randomly) so that we can achieve more variation?

    Your asset rocks, by the way. Great work.
     
  22. SweatyChair

    SweatyChair

    Joined:
    Feb 15, 2016
    Posts:
    118
    Will look forward when it supports Mac...

    Source code will be great or an option to set the output of PNG in UVPaint.FIX, such as path and filename, would be good too.
     
  23. iRobi

    iRobi

    Joined:
    May 1, 2016
    Posts:
    170
    Thanks a lot!
    Sure, i can add it in new Update!
    No problem!
     
  24. iRobi

    iRobi

    Joined:
    May 1, 2016
    Posts:
    170
    Ok
     
  25. iRobi

    iRobi

    Joined:
    May 1, 2016
    Posts:
    170
    Thanks for your support guys!:)
     
  26. eyalfx

    eyalfx

    Joined:
    Oct 8, 2010
    Posts:
    98
    Just got the system and it works well.
    However, when I try to create a decal on a texture that already has alpha and a material that uses the alpha, it completely breaks .
    The original alpha of the texture gets overwritten with the alpha of the decal and fades the whole image. any tips?
    Thanks
     
  27. iRobi

    iRobi

    Joined:
    May 1, 2016
    Posts:
    170
    Hi, can you provide screenshots?
     
    Last edited: Sep 23, 2016
  28. Setmaster

    Setmaster

    Joined:
    Sep 2, 2013
    Posts:
    194
    Your website http://irobi.uz doesn't seem to be working, I'm trying to check the web demos.
     
  29. melkior

    melkior

    Joined:
    Jul 20, 2013
    Posts:
    195
    Hello,

    I'm having a little bit of trouble implementing your asset. Similar to ikemen_blueD problem above however the damaging object is always at least 8 units away so the 0 distance issue you mentioned shouldn't (?) be a problem?


    Code (CSharp):
    1.  private void bloodyspray(GameObject damagingObject)
    2.     {
    3.         // Vector3 direction = (playercenterPoint.transform.position - damagingObject.transform.position).normalized;
    4.         Vector3 direction = playercenterPoint.transform.position - damagingObject.transform.position;
    5.         // Cast a sphere X meters from the damaging game object towards the player
    6.         RaycastHit[] hits = Physics.SphereCastAll(damagingObject.transform.position, 1.5f, direction, 8);
    7.         foreach (RaycastHit h in hits)
    8.         {
    9.             //UVPaint.Create(h.transform.root.gameObject, h.point, h.transform.rotation, blood, true, Random.Range(1.5f, 3f), Color.red);
    10.             //UVPaint.Create(h.transform.root.gameObject, h.point, Quaternion.Euler(h.normal.x,h.normal.y,h.normal.z), blood, true, Random.Range(1.5f, 3f), Color.red);
    11.             // using transform.root == really bad the entire level gets the streaking!!
    12.  
    13.             //both of these give bad results
    14.             //UVPaint.Create(h.transform.gameObject, h.point, Quaternion.Euler(h.normal.x,h.normal.y,h.normal.z), blood, true, Random.Range(1.5f, 3f), Color.red);
    15.             UVPaint.Create(h.transform.gameObject, h.point, h.transform.rotation, blood, true, Random.Range(1.5f, 3f), Color.red);      
    16.         }
    17.     }
    I have commented out several approaches that I have tried above but they have similar (or worse) results.

    Notes:
    • I have tried using in Update method ; no change. This should not be necessary as the game is turn based and nothing is moving between turns.
    • When attempting to use transform.root.gameObject this causes same problem except ALL floors in the entire level get the same streaking on them. So using the root is a bad idea here.
    • The asset has been changed several times to test for different results - but it is a UVmapped .obj file exported from a modelling program.
    • The asset has had different type of colliders applied(mesh,cube) to no effect.
    • The material at one point was tiled , then I removed tiling - same problem
    Thanks for any suggestions on fixing this!
     

    Attached Files:

  30. iRobi

    iRobi

    Joined:
    May 1, 2016
    Posts:
    170
    Hi! You can add Componet "Ignore UV Paint" to avoid unwanted decals on floor.
    So, and please, turn off "Generate Mip Maps" in decal texture, this may fix your issue.
    Write here result please!
     
  31. melkior

    melkior

    Joined:
    Jul 20, 2013
    Posts:
    195
    Hello, thank you for the reply.

    I have checked the Mip Mapping and disabled for all the texture layers (diffuse, normal, specular) and this does not change the problem.

    I did try to add the "Ignore UV Paint" however this is highly undesirable -- I need to have blood splats on the floor and walls of the level ; this is the whole reason for the purchase of this asset. As the character is top down - the UV painting on the character is only small use ; it can not be seen normally.

    One thing I did notice when adjusting texture parameters is that when turning "Wrap Mode" from Repeat to Clamp this shows blocky areas where the texture streaks in clamp mode. The black streaks in UVPaint very closely match the area that is effected by wrap/clamp settings ; see screenshot.


    I suspect what we have is the UVPaint does not know how to handle wrap/clamp settings properly?

    Thank you for your assistance!
     
  32. iRobi

    iRobi

    Joined:
    May 1, 2016
    Posts:
    170
    Could you send me the part of your project, which uses UVPaint? ill try to fix this problem. Thanks
     
    Last edited: Sep 28, 2016
  33. melkior

    melkior

    Joined:
    Jul 20, 2013
    Posts:
    195
    I have sent you a private message with a reproduction scene iRobi, thanks for your help!
     
  34. iRobi

    iRobi

    Joined:
    May 1, 2016
    Posts:
    170
    Oh no, you used tile texture... UVPaint works with UNWrapped UV, see at Color Play demo. Look at Environment Material (Texture) as example for decaling
     
  35. Siccity

    Siccity

    Joined:
    Dec 7, 2013
    Posts:
    148
    Hey, awesome plugin, really. I have an issue though. It seems your UVPaint applies paint only to mainTexture. I need it on other layers for custom shaders. Is it possible that you could add an extra parameter to UVPaint.Create that will let me do this? Maybe like
    Code (CSharp):
    1. UVPaint.Create(enemy.gameObject, hit.point, Quaternion.LookRotation(-hit.normal), bloodTex, false, 0.5f, Color.white, "_PaintOverlay");
    2.  
    Thank you

    EDIT: With this implemented, a user could also paint to the metallic and emission maps, and possibly even the normal map. That would be pretty useful
     
    Last edited: Sep 29, 2016
  36. iRobi

    iRobi

    Joined:
    May 1, 2016
    Posts:
    170
    Hi! Yes, it will be in next update!)
     
  37. Siccity

    Siccity

    Joined:
    Dec 7, 2013
    Posts:
    148
    Awesome! Thanks!

    On a separate note, seams in the UV are visible when you paint on them. Maybe put an option to increase the projected UV islands slightly before applying texture would fix it.

    Unity_2016-09-29_13-34-09.png
     
  38. iRobi

    iRobi

    Joined:
    May 1, 2016
    Posts:
    170
    Oh, yes, it is known issue. I have idea how to fix it, but im not sure that will help. I will try
     
  39. melkior

    melkior

    Joined:
    Jul 20, 2013
    Posts:
    195
    Hi iRobi,

    The UVW's in my project are unwrapped on the objets. But they are also tiled ; so you are saying the issue is that UVPaint does not supporting tiling ? Just want to confirm?

    Thanks
     
  40. iRobi

    iRobi

    Joined:
    May 1, 2016
    Posts:
    170
    Unfortunately yes... But we currenly work on not UV decal, and hope, it will be in the future
     
  41. iRobi

    iRobi

    Joined:
    May 1, 2016
    Posts:
    170
    As solution, i suggest use Projectors as Decals on Environment
     
  42. Siccity

    Siccity

    Joined:
    Dec 7, 2013
    Posts:
    148
    Back again iRobi! With more favors to ask!

    I've got this enemy model which is split up in limbs (arm, head, torso etc.) to allow dismemberment. All limbs use the same material, but when you shoot the enemy, UVPaint makes a new material instance for every limb, putting 6 or more new textures into memory where only 1 was necessary. I'm not asking you to magically fix this issue in my game, but maybe provide me with an option to turn your material instancing off, so that I can implement my own.

    Thanks again :)
     
    Last edited: Oct 3, 2016
  43. iRobi

    iRobi

    Joined:
    May 1, 2016
    Posts:
    170
    Hi!) Are you using atlas of all limbs?
     
  44. Siccity

    Siccity

    Joined:
    Dec 7, 2013
    Posts:
    148
    Yes you could say that. I would prefer 1 texture instance per enemy instead of 1 texture instance per limb
     
  45. Setmaster

    Setmaster

    Joined:
    Sep 2, 2013
    Posts:
    194
    I'm still unable to access the demos, your website seems to be having issue still.
     
  46. iRobi

    iRobi

    Joined:
    May 1, 2016
    Posts:
    170
    Sorry for delay!
    Im think, its possible to use 1 texture. Just call only for shared material, but all character instances must have exclusive material...
    Yes, you're right, some days the site was down, but now everything is working!
     
  47. Siccity

    Siccity

    Joined:
    Dec 7, 2013
    Posts:
    148
    How do i do this? UVPaint.Create does not have material parameter..
     
  48. SS3

    SS3

    Joined:
    Aug 28, 2014
    Posts:
    4
    Hi

    I bought UVPaint.
    Give me the source code of the dll.
    I'm want to rewrite to its own processing.

    Receipt
    Order number: 15668057260589
    Date: 2016-10-14 23:22:51 (UTC)
    haru@manycolors.flop.jp
     
  49. iRobi

    iRobi

    Joined:
    May 1, 2016
    Posts:
    170
    Sorry for delay! In a few days it will be updated with new functionality including support shared materials. Thanx for your patient!
    I have written to you in a P.M.
     
    julianr likes this.
  50. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,110
    Nice work iRobi, the more functionality you add to your asset to cover every scenario will make this a solid and worth having asset. Looking forward to the new functionality.