Is it possible with Unity to “paint” textures on a Mesh like a plane, during RUNTIME?
Much like what warcraft 3 editor does on terain?
I’m not sure about the Warcraft Editor and how it’s handled there, but for mesh texture painting you’ll most likely need to go with vertex color painting and blending multiple textures in a shader based on the RGB(A) values of the colors.
This would require 2 things next to the textures themselves and solid UV coordinates:
1.) A shader handling the blending based on the color
2.) A vertex painting tool
For 1.) that’s not too hard, I’ve created a basic shader allowing to blend 3 different textures in (diffuse, specular and normal) with the Strumpy shader editor within minutes.
For 2.) There ARE solutions around, yet they are far from usable. There is a tool called “Simple Vertex Painter”, but it is very sluggish and might possibly mess up more than it should - depends. It’s free, so I don’t want to critize too much, but it might simply not suit your needs.
There are some other (paid) tools, which I haven’t tried though, but Asset Store reviews mentioned things like bad performance and such.
So, basically, when I wanted to do the same, I ended up with the shader mentioned, and vertex color painting directly in 3ds Max rather than in Unity. Not the perfect solution, but the only one turning out to be effective.
It’s a feature which I have seen being requested quite often though, so hopefully there will be a built-in solution some day.
Thanks for the reply, but what I want to do is to make a GAME that paints the textures on meshes. That is on game mode. Not on Unity editor mode. Real-time.
Like a paint brush game.
Ah ok, got that mixed up as you mentioned the W3 editor.
Well another thing just came to my mind - of course you could also use blend masks for blending between two different textures. That should also be easier, but is limited to meshes only as you will need to use blend masks which are more or less tightly connected to the UV layout of the mesh.
I would have deeper looks into that direction first and see what you can find - I’m sure you are not the first one asking for this, so there might be solutions around - e.g. UnityPaint – Arongranberg.com .
Yep, that’s close to what I was searching for. Thanks a lot.