MeshPaint - Dynamically paint meshes onto other GameObject's surfaces.

Hey there,

just wanted to show you guys and devs my first asset: MeshPaint.
I've been scripting it for the last 3 days because I needed it for my own project, so I just decided to eventually put it on the Asset Store for free too, maybe someone else needs it as well :)

MeshPaint basically allows you to paint stuff onto your stuff... Well... Actually that's it. It is a really plain, simple and minimal asset.
You can paint prefab meshes on top of your currently selected GameObject, and use randomizing parameters to give the painted meshes a bit of variation.
You can randomly scale, rotate and offset your meshes and paint them. The GameObject on which you want to paint meshes on obviously has to have a collider on it, otherwise, where would we paint our meshes on? :-|

Check out these screenshots and my YouTube demo video and let me know what you think about it :)

Let me know if you would like something like this on the asset store, and if I should continue improving it and elaborate it even further.

MeshPaint is now available on the asset store under the name MeshBrush. Added a couple of functionalities in V1.1, and even more is coming soon. Thanks for the support and motivation you guys gave me here :)

Find MeshBrush on the Asset Store here

I'll be posting all the updates, enhancements and/or ideas for future updates in this thread here and keep you guys up to date. And don't forget that if you have any questions, requests, bug reports or suggestions, feel free to contact me at any time; just leave a comment here or PM me. I'll try to reply as quickly as possible.

1481812--82119--$Screenshot 2014-01-12 20.33.08.jpg

1481812--82117--$Screenshot 2014-01-12 20.33.26.png

1481812--82118--$Screenshot 2014-01-12 21.53.01.jpg

Newer version:


Tutorial video on YouTube (used version 1.13) - with voice commentary:


MeshBrush Update V1.2 out now:

Here a video regarding the MeshBrush @Runtime feature


MeshBrush Update V1.3 out now!


MeshBrush Update V1.4, work in progress:

Here an insight into MeshBrush V1.4; one of its new features is the precision placement mode. This video is a preview and a tutorial at the same time...

That's surely looking interesting to me! Will have to keep an eye out for this. Would love to see this on the Asset Store free or for a few bucks (why not charge a little bit for your efforts?)

That's great!

Have used similar tools with in-house tech before. Would love to see this on the asset store.

Thanks for the nice words guys :) I'll submit it tomorrow

Thanks :) but no, I think this asset should be free. Maybe I'll submit something like a pro version in the future, with super cool enhancements and additional parameters and maybe swaying animation support (I'm looking into terrain shaders right now.. maybe I'll add that in too, uh) :smile:

Woah, incredible timing. I was just wrestling the development of a similar tool myself, but my version is far more simple at the moment, capable of using only one prefab at a time, and without any randomization. I would really appreciate such an advanced implementation, - tool like that is incredibly useful for filling environments with props.

Yes, I just thought of a solution to the "paint multiple objects at once" problem :smile:
I guess it's programming time tomorrow evening :->
You know, reading the nice words above made me wanna develop this tool even further and give it even more usefulness :O (damn group-pressure hahaha) ;D

Hey guys, I found out plenty of stuff I could do with this tool to further improve it, and I think I'll delay it till next week :/
Do you guys think it is way too rude from me to ask a few dollars for it after it's done? I'll add in more randomizers, multiple mesh painting and opacity parameters, as well as some grass swaying feautre thingy. Let me know what you think would be a fair price. 10$? 5$? Let me know, I really hope I am not too rude to ask something for this, it's just that my teammate has a good point: we are students and we need every buck... :/
I guess he's right about that

some of us cant pay a dollar not because we dont have it...but because of restrictions..i would say you should make two version...a free and a standard

Asking 5-10$ is fair, why not. I certainly wouldn't mind getting it. Keep in mind, though, that some people in the community have no PayPal account or eligible credit card to access purchases on the Asset Store, so releasing a free version with some part of the functionality either on Asset Store or as e.g. sample code on Unity Wiki would be nice - as far as I see, there is no openly available sample of such a tool yet apart from few very basic examples of raycasting editor tool.

Myself, I don't have any terrains and natural landscapes, so sway wouldn't be particularly useful to me. But I guess for other people it would be. Here are some other ideas:

  1. Adding an array you can fill with animations which will then be randomly selected for each prop: useful for, again, e.g. vegetation sway, but also for enormous amount of other applications. For example, you can make a set of wall lights and a set of animations for them where they either work properly, or flicker lightly, or flicker heavily, or are almost non-functional, or have switched the color, and so on. Another example would be a set of water fountains each having different sprite animation, a set of particle emitters for fire or smoke each getting random animation type, and so on.

  2. (assuming you don't have that yet) A field that allows you to specify which GameObject all spawned props should be placed into. Then, maybe that field can be contained within an array too: you can specify multiple GameObjects, configure all randomization parameters and prefab arrays individually for each holder object, and switch between them at will. That would do wonders to the speed of work and will keep the scene clean.

Yes, those are awesome tips. I'll make sure to add in that array. Although I don't think that it is worth the time to make both a free version and a paid one, because I don't think the array thing and the customizeable holder objects are worth the upgrade to the full version. At the same time though, I am investing plenty of effort into scripting this at all, so I think I'll charge a few beers (not more than 10$ though, I think this is a fair price) for the complete tool, with all possible enhancements and stuff.
I commented the entire code so it is quite easy to read and eventually extend. In addition: I am also implementing an update button to make the current changes of the randomness parameters apply to all the painted objects so far (of the selected holder object).

PS: may I ask Shkarface Noori what he meant with
some of us cant pay a dollar not because we dont have it...but because of restrictions
[/quote] ?
What restrictions are there in your country? Why is this still a problem nowadays? :S

Sure, fair enough.

This is very nice tool, i think it's a good idea if you do two version of your plugin.
Even your current tool i think it's good enough if you release it for free, and in Pro version add another enhancement like other people said.

A pecfect tool to add Greebles and Nurnies on gameObjects. Thanks a lot. :smile:

I added additional parameters and stuff in it. Almost done guys :smile:
Tomorrow I'll add in the tooltips and tweak the design a little bit, and fiddle around with the maths of the randomizers.
Then I'll submit it, and hope that the Asset store team accepts the submission :)

1483575--82293--$Screenshot 2014-01-14 11.56.29.png

Looking great!

  1. Only thing that's unclear is whether randomization/color/radius settings are stored separately for each element and if so, how do you switch between them. Let's say there is a group for grass and a group for stones, each with distinct settings, which you want to switch between often - a way to store settings for them separately would be pretty neat.

Visually, it can probably be done either by making the Element field a parent for every single other parameter:

Array of meshes to paint
└ [_] GameObject1
└ [■] GameObject2
└ Color
└ Radius
└ [...]
└ Randomize
└ Scale
└ Random width
└ Random height
└ [...]

Or by adding a new property: an array for the Text Assets storing the presets for the tool. Configure how you want to paint grass, save the file, configure how you want to paint stones, save the file, then switch between the settings by clicking on one you want right now in the Inspector.

Array of meshes to paint
└ GameObject1
└ GameObject2
└ [...]
└ Scale
└ Random width
└ Random height
└ [...]
└ [■] Grass
└ [_]Stones
Save current settings

  1. A question, also: judging from the presence of the "Array of meshes to paint" field, the script is meant to be attached to just one object in the scene and not to every target object, correct?

  2. Another suggestion: maybe it will be useful to separate "Array of meshes to paint" into two properties: one containing all meshes raycasting is allowed to hit, and another containing the mesh you want props to be parented to. That will allow easier scene hierarchy management (e.g. all vegetation drops into "Props_Vegetation" GameObject even though it's allowed to grow on a dozen of objects).

Those are AWESOME suggestions, thanks a lot.
Let me just clear things up a bit for you:

  1. Yes, I guess you're right about this. This'll delay the release even more, but I guess it's worth the time (it'll be 10$ then not 5$ hahah everyone blaim him ;D )

  2. Nono don't worry, you only attach the script once to the GameObject on which you would like to paint the meshes on.

  3. Also very useful thank you! I will implement this by next week. I got time until february, so I am pretty sure this'll be released soon :)


[EDIT] Oh and I almost forgot that I have to still make a coroutine for when the user holds the button down. Right now, if you hold the button you get a very... uhm... hairy surface if you know what I mean (considering you are painting vegetation) :/

[EDIT2] Hey I just tried to make an array of arrays for that group suggestion and I want to be really honest with you: this is where my skills as a programmer end.
I was able to do it so far, but that thing with the groups is simply too sophisticated for me at the moment. I am really sorry to announce this, but I had to backup my scripts because I started to do really, really filthy stuff in my code (and I even have a headache now :|)

If I learn how to do it in the future I promise I will put it in a free update of course, and I will DEFINITIVELY try again, but for the time being I am really sorry but I simply don't have enough programming skills to do such thing. I think I also mentioned above that this is my first asset lol, not my first script of course, but my first attempt to do editor scripting...

I found a simpler solution though: I changed a few lines of code and now, if you want to paint many types and arrays of meshes, you can just add more than one MeshPaint script to the object... it works really good actually, why didn't I think of this earlier? The parameters are per-script, so it works exactly like with your groups. Here's, a screenshot:

1483671--82320--$Screenshot 2014-01-14 15.32.04.jpg

Yeah looks very interesting plugin.
will buy it for sure !

Hey guys,
I think I'm almost done here... Here's a screenie of the inspector. Let me know what you think about it:

1484478--82452--$Screenshot 2014-01-15 03.24.57.png

I feel still sorry that I couldn't implement that grouping feature just yet, but I really hope I can find a solution to that very soon. I'll have to improve my programming skills, but hey: the tool works :smile: and I think it is getting really close to a release now.