ZzZzZ UVPaint ( skinned mesh Decal+Texturing System) ZzZz

Good idea, thanx. Tomorrow it will be Done!

Done, WebGL Demo now Available!

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.

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)

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

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!

@iRobi

Thanks for the reply.

This is the hierarchy of the Puppet Master GO

2708564--192046--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.

Please, leave a part of your code where you get GO (By Raycast or something yet) and call UVPaint.Create();

@iRobi

I do , This is my code …

function Update ()
{
    if (Input.GetMouseButtonDown(0))
    {
        var ray : Ray = Camera.main.ScreenPointToRay(Input.mousePosition);

        var hit : RaycastHit = new RaycastHit();

        if (Physics.Raycast(ray, hit, 200, layers))
        {
            UVPaint.Create(hit.transform.gameObject, hit.point, hit.transform.rotation, f1, true, Random.Range(0.5,1.0), color);
        }
    }
}

Did you try like this?
:

function Update ()
{
    if (Input.GetMouseButtonDown(0))
    {
        var ray : Ray = Camera.main.ScreenPointToRay(Input.mousePosition);
        var hit : RaycastHit = new RaycastHit();
        if (Physics.Raycast(ray, hit, 200, layers))
        {
            UVPaint.Create(hit.transform.root.gameObject, hit.point, hit.transform.rotation, f1, true, Random.Range(0.5,1.0), color);
        }
    }
}

hit.transform.root.gameObject instead hit.transform.gameObject

1 Like

Thank you … That worked :slight_smile:

You’re always welcome :slight_smile:

@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;

var f1 : Texture2D;
var bothSides : boolean;
var color : Color = newColor(1,1,1,1);

private var frame : int;
private var Direct_VECTOR : Vector3;
private var trans : Transform;
private var time : float;
private var test : boolean;

function Start ()
{
trans = transform;
Direct_VECTOR = trans.position;
time = Time.time;
}

function Update ()
{
frame+=1;

if(frame.Equals(2))
{
Direct_VECTOR = trans.position;
}
trans.LookAt(Direct_VECTOR);

if(Time.time > time+10)
{
Destroy(gameObject);
}
}

function OnCollisionEnter(collision: Collision)
{
var contact : ContactPoint = collision.contacts[0];
trans.forward=-trans.forward;
UVPaint.Create(contact.otherCollider.gameObject, contact.point,trans.rotation, f1, bothSides, Random.Range(0.4,0.8), color);
//CreateDec.Create(contact.otherCollider.gameObject,contact.point,trans.rotation,f1,false,Random.Range(1.5f,3f),color);
Destroy(gameObject);
}

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.

OK, Thanks for the reply …

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;

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?

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.

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

Works perfectly with Unity5 Standart shader.
Only must have is Unwrapped UV
2792336--202482--AssetDifference.jpg

1 Like