Paint In 3D ✍️ Paint In Editor✏️ Paint In 2D

@kanitabe
Assuming you’re talking about Paint in 2D:

By default, it’s designed to paint on the opaque parts of a sprite. If you want to change this, you can disable the CwPaintableSprite component’s AutoMask setting, and set the CwPaintDecal2D component’s Blend Mode / Channels setting to 1,1,1,1 (alpha = 1). Keep in mind your sprite’s Sprite Mode / Mesh Type must be set to Full Rect, otherwise it will crop out the transparent parts.

Thank you! I am trying to integrate this line vfx from this video (only the line not the laser).
Is it possible to apply the shader and the textures to the line decal in the “32 Between Painting” demo?
VIDEO:

Hi, I’m trying to use Paintable Mesh on a Skinned Mesh Renderer character with multiple submeshes and BlendShapes.
When I set Use Mesh type to “Auto Seam Fix”, the submeshes except for the first disappeared, and the following error was logged:

Failed getting triangles. Submesh index is out of bounds.
UnityEngine.Mesh:SetTriangles (System.Collections.Generic.List`1<int>,int)
PaintIn3D.CwMeshFixer:AddFixSeamData (UnityEngine.Mesh,UnityEngine.Mesh,System.Collections.Generic.List`1<System.Collections.Generic.List`1<int>>,System.Collections.Generic.List`1<PaintIn3D.CwMeshFixer/Insertion>,PaintCore.CwCoord) (at Assets/Plugins/CW/PaintIn3D/Required/Scripts/CwMeshFixer.cs:590)

After some researching, I found out CwMeshFixer is generating fixed mesh for more than first time of painting, seems like it’s running once per frame, causing the game to lag.
Also after a few frames, the submesh count becomes 1.

Is Auto Seam Fix not supposed to be used with skinned mesh and BlendShape, or maybe is there something wrong with my model?
Thank you!

Good evening, @Darkcoder1,

I hope this message finds you well! I’m currently using the Paint in 3D addon for my project and have encountered an issue I’m unsure how to handle.

In my setup, I have a live enemy character that gets painted (i.e., injured) during gameplay. When the enemy dies, it’s destroyed and replaced with a ragdoll prefab. I’d like to transfer the painted material or texture from the live enemy to the ragdoll, so the paint effects remain consistent.

Both the enemy and the ragdoll share the same mesh and material. The main difference is that the ragdoll has AI logic removed and rigidbodies added. I’ve tried simply copying the material from the live enemy to the ragdoll, but the paint didn’t transfer.

Ideally, I’d like to copy the painted mesh or texture at runtime to the ragdoll to avoid modifying the existing enemy prefab(to activate the ragdoll from the live enemy directly), which is already complex and cluttered. Setting up ragdoll colliders and rigidbodies directly on the enemy prefab would be quite time-consuming.

Do you have any advice on how to achieve this? Any guidance would be greatly appreciated!

Thank you for your time and for creating such an great tool!

Edit: The “CwPaintableMeshTexture” doesn’t seem to have such method as “LoadData” in 4.1.3, was it removed or am i missing something? Tried to apply texture data to the ragdoll but the method, as described in “Can I save my in-game paint to my project?” section of the manual, is not there.

Edit 2: After banging my head against the keyboard a little bit more, i found the solution. I cache the ragdoll instantiation, then use that cached variable to get both components “CwPaintableMesh” and "CwPaintableMeshTexture. Then its a matter of assigning each parameter in code instead of manually editing the values of the two components in ragdoll, at last using Graphics.Blit to copy the pixel data from the source (Live enemy) to the destination (Ragdoll). Here’s the snippet:

 // get paint data from live enemy
 var srcPaintable = GetComponentInChildren<CwPaintableMesh>();
 if (srcPaintable == null)
 {
     Debug.LogError("CwPaintable mesh is null");
     return;
 }

 // instantiate ragdoll
 GameObject ragdoll = Instantiate(ragdollPrefab, transform.position, transform.rotation);

 // setup paint components on ragdoll
 var dstPaintable = ragdoll.GetComponentInChildren<CwPaintableMesh>();
 dstPaintable.MaterialApplication = srcPaintable.MaterialApplication;
 dstPaintable.Activate();

 // copy each paintable texture
 foreach (var srcTexture in srcPaintable.PaintableTextures)
 {
     var dstTexture = ragdoll.GetComponentInChildren<CwPaintableMeshTexture>();
     dstTexture.Slot = srcTexture.Slot;
     dstTexture.Group = srcTexture.Group;

     // copy the current render texture directly
     Graphics.Blit(srcTexture.Current, dstTexture.Current);
 }

Hi, thanks for the great Paint in 3D asset—I’m loving it so far.

I’m trying to detect in code when a CW Paint Sphere starts and stops painting so I can trigger a visual effect, like highlighting orbs that are actively painting on the canvas. Is there a way to achieve this?

If it’s covered in the documentation or examples and I’ve missed it, feel free to point me there. Thanks again!

@Lyje
This issue should now be fixed in the latest version!

Keep in mind one of the example meshes you sent me has very narrow separation/gaps in the UV, and when the edges get fixed they overlap a little bit in these areas. This may not be an issue when painting as long as the overlap doesn’t go into the main UV area, but it’s something you should try to avoid when unwrapping your meshes.

@scimusmn
The paint components only paint where they’re told to, they don’t know what finger or event they’re part of. The CwHitScreen component does keep track of fingers and their states, however, there currently aren’t any events you can hook into for this. It makes sense to add events for this though, I’ll see what I can come up with.

1 Like

Hi! How can i make the blood decal emissive in the “Zombie Blood” example?

Can this work with Synty assets? My grass mesh is just a quad with one color picked from their Texture atlas (big png). The mesh fixer gives me these UVs, I guess P3D can’t work with those. If I fix the UVs then the grass mesh will just display the whole Atlas texture. Is there a work around so I can paint on models that use such a texture atlas / lacking UVs?

It works with paining but obviously it should not look like that :smiley:




Thank you! Will test shortly. Aware of the concave areas in the UV island edges - we’re trying to avoid them but a little bit is inevitable. Definitely not expecting the extrusion to magically fix that though!

Hello! I’ve updated to Unity 6 and also updated your asset, but I noticed an issue with material rendering. In the attached screenshots, you can see the difference between the standard URP (Lit) shader and your shader with identical settings. The example of the car also shows the difference in shader behavior (P.S. the bumper uses the Lit Shader). Your package version 3.0.2 still works correctly even in Unity 6, so I’ve temporarily rolled back to it. Could you please let me know if Unity 6 support is planned?

The first car shows the old version of the asset, while the second one shows the new version of the asset (the settings are the same).



@Funtyx
I’ll check it out. I think maybe the color field is in a different color space.

Hi Carlos , What’s the best place to get help with the Flow asset. I did post about a month ago on its Forum.

Hello, I was wondering if it is possible to paint a single channel from a texture. I wrote a shader that takes 5 textures as input. One of these textures is used to blend the others according to the value in each channel. (a little like what Unity does with the terrain shader with layers).
I want to be able to do so with any surface, so I purchased Paint in Editor, but right now I cannot single out a channel so it is very hard to get the result I want from just using a color) also, the selection of the target paint texture is not intuitive, and, not sure what happened but the entire surface got a blue tint while I was experimenting with the tool. Still neet to try to reproduce though