This looks fantastic!
I have one question: Can it be made to work with pressure sensitivity? Like the iPad Pro with Apple Pencil or Surface Pro for instance?
Thank you! That would be amazing. Can symmetry be enabled in some way too? It would be great to be able to paint on both sides of a mesh at the same time. This would be amazing for editing a characters face and clothing at runtime.
I love this so far! It has been the easiest 3d painting asset to implement compared to the three I tried today. I already have a very decent base to work with. I am going to look into adding Apple pencil support tonight somehow.
This is a very good idea and should be fairly easy to implement, I’ll include it in the next version too, along with some improvements to the input system used on mobiles.
Great! Speaking of performance, version 1.5.2 went live today, and this includes massive performance improvements, particularly when painting multiple times per frame. This version was submitted before your feature requests so it doesn’t include them, but that will come soon.
Thanks for the feature ideas by the way, they’re very good. If you have more then I’d love to hear them to improve the product even more!
Thank you for being so responsive! I will update to the new version now.
Anything to simplify the runtime aspect of this asset would be fantastic. I would love to have the ability to easily erase, undo and change colour at runtime. Is there a way to have a smudge or blur brush too?
I have also found that two finger panning still draws on the mesh. I am working on all of these things but I am pretty sure you would be able to do all of this way quicker than me.
I am certainly not a natural coder. I am learning all of the time but I am definitely more of an art guy.
I have a small question and hopefully someone can help me with that. I am painting with P3D_Paintable on a Plane. Beforehand I want to check if the color on that position is already the same I wanna paint on. How can I get this data?
Hi, I’m really interested in this asset and I have a few questions to see if it would be suitable for my needs. Does it work in VR? Is it possible to serialise the painted objects so that they can be loaded again at a later point? For example, presets for stickers in a car game.
I just submitted version 1.5.3, which includes pressure based opacity/radius/hardness settings. Mirroring will come in a future version because it requires an animated mesh to be in a bind pose, which I don’t have prepared just yet. I don’t think there’s a sensible way to prevent painting while keeping the old control system, so I added a ‘rotation’ button to most demo scenes, which allows you to toggle between paint mode and rotate mode. I may change this again in the future, but for now it’s a simple fix.
You can already erase by using the ‘Subtractive’ blending mode, and setting the RGB to 0, so only the A gets subtracted. This is what the bullet hole demo scene does. If you want the erase to basically undo what was painted in that area then I’ll need to add some new blending modes, but these should be easy to add.
I will look into adding blur and smudge, these are much more difficult to do, especially smudge
Thanks for the great ideas as always, I’ve added them all to my to-do list!
Assuming you’re using an older version (before 1.5.0), then the P3D_ReadToImage component (Read Color demo scene) shows you how to read a pixel at a specific point and output that color to a UI.Image.color. To do what you describe you can make a new component, copy + paste most of P3D_ReadToImage, but instead of writing the color to an image, you call P3D_Painter.PaintAt(point) if the read color satisfies your requirements.
Yes, it works great in VR. I didn’t mention this in the product description yet because there is no VR integration (e.g. VRTK demo scene). But if you know how to connect a VR controller to a painting GameObject (e.g. spray can coming in version 1.5.3), then it will work.
Yes, all paintable textures use the P3dPaintableTexture component, which has the ‘Save Name’ setting. Setting this to something causes the texture to automatically save/load. Keep in mind this won’t work correctly with multiple prefabs in the same scene, because they will all share the same name. For this scenario you need to write a script to decide which prefabs get which save name, but the code to handle this is as simple as yourPaintableTexture.Save(uniqueName) and yourPaintableTexture.Load(uniqueName). I’ll include a demo of this in the next version!
Erase seems to be working but does seem to leave a bit of ghosting behind which is visible when painting over the area again. I also really need to get runtime image saving / export working so that the user can save their painted image for later use.
I got something working with easy save but the png image would not open in photoshop so I must have done something wrong. Ideally I would love to have a gallery of saved files that the user can nip back in to.
Thank you for creating an asset which is making the runtime painting aspect possible and thanks again for listening.
Another quick question: (sorry)
I am using this script to save an image to the device gallery:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class savetogallery : MonoBehaviour {
public Texture2D myTexture;
// Use this for initialization
public void saveitman () {
NativeGallery.SaveImageToGallery( myTexture, "GalleryTest", "My img {0}.png" );
}
}
(This seems to be working a lot easier than the other assets I have tried)
How do I access the ‘painted’ texture to save it to the device gallery?
I was simply dragging an image into the myTexture slot to make sure it is working but I want to reference the aafacepainter texture from the image so I can save that to the gallery.
The current alpha blending approach doesn’t work well with 0 alpha, and will cause this bleeding/ghosting when painting in a different color. I know how to fix this, but that will have to wait for next week.
To get a Texture2D snapshot of a paintable texture, you first need to store a reference to the P3dPaintableTexture component you want to use, then you can call these two methods: var outputTexture2D = P3dHelper.GetReadableTexture(yourPaintableTexture.GetCurrent(false));
You can then save that texture. Keep in mind you should destroy that texture when you’re finished with it.
I had another thought this evening; Physics or particle based brushes! Is there a way to make particles leave a paint trail on the mesh texture? It could create some cool, random paint effects where no stroke is ever the same.