Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

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

Discussion in 'Assets and Asset Store' started by GlitchedPolygons, Jan 12, 2014.

?

MeshPaint on Asset store...

  1. Yes pls

    56 vote(s)
    91.8%
  2. No thanks

    5 vote(s)
    8.2%
  1. GlitchedPolygons

    GlitchedPolygons

    Joined:
    Jun 18, 2013
    Posts:
    201
    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.

    [EDIT]
    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.

    $Screenshot 2014-01-12 20.33.08.jpg

    $Screenshot 2014-01-12 20.33.26.png

    $Screenshot 2014-01-12 21.53.01.png



    Newer version:



    [EDIT2]

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



    [EDIT3]

    MeshBrush Update V1.2 out now:



    Here a video regarding the MeshBrush @Runtime feature

    [EDIT4]

    MeshBrush Update V1.3 out now!

    [EDIT5]

    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...
     
    Last edited: Jul 15, 2015
  2. Thomas-Pasieka

    Thomas-Pasieka

    Moderator

    Joined:
    Sep 19, 2005
    Posts:
    2,126
    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?)
     
  3. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    That's great!
     
  4. rpgw

    rpgw

    Joined:
    Jul 3, 2012
    Posts:
    46
    Have used similar tools with in-house tech before. Would love to see this on the asset store.
     
  5. GlitchedPolygons

    GlitchedPolygons

    Joined:
    Jun 18, 2013
    Posts:
    201
    Thanks for the nice words guys :) I'll submit it tomorrow
     
    Last edited: Jan 13, 2014
  6. GlitchedPolygons

    GlitchedPolygons

    Joined:
    Jun 18, 2013
    Posts:
    201
    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) :D
     
    Last edited: Jan 13, 2014
  7. bac9-flcl

    bac9-flcl

    Joined:
    Dec 5, 2012
    Posts:
    824
    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.
     
  8. GlitchedPolygons

    GlitchedPolygons

    Joined:
    Jun 18, 2013
    Posts:
    201
    Yes, I just thought of a solution to the "paint multiple objects at once" problem :D
    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
     
  9. GlitchedPolygons

    GlitchedPolygons

    Joined:
    Jun 18, 2013
    Posts:
    201
    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
     
  10. shkar-noori

    shkar-noori

    Joined:
    Jun 10, 2013
    Posts:
    833
    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
     
  11. bac9-flcl

    bac9-flcl

    Joined:
    Dec 5, 2012
    Posts:
    824
    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.
     
  12. GlitchedPolygons

    GlitchedPolygons

    Joined:
    Jun 18, 2013
    Posts:
    201
    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
    ?
    What restrictions are there in your country? Why is this still a problem nowadays? :S
     
    Last edited: Jan 13, 2014
  13. bac9-flcl

    bac9-flcl

    Joined:
    Dec 5, 2012
    Posts:
    824
    Sure, fair enough.
     
  14. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,655
    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.
     
  15. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,649
  16. GlitchedPolygons

    GlitchedPolygons

    Joined:
    Jun 18, 2013
    Posts:
    201
    I added additional parameters and stuff in it. Almost done guys :D
    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 :)

    $Screenshot 2014-01-14 11.56.29.png
     
  17. bac9-flcl

    bac9-flcl

    Joined:
    Dec 5, 2012
    Posts:
    824
    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
    └ [...]​
    Color
    Radius
    Randomize
    └ Scale
    └ Random width
    └ Random height
    └ [...]​
    Presets
    └ [■] Grass
    └ [_]Stones​
    Save current settings​

    2. 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?

    3. 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).
     
    Last edited: Jan 14, 2014
  18. GlitchedPolygons

    GlitchedPolygons

    Joined:
    Jun 18, 2013
    Posts:
    201
    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:

    $Screenshot 2014-01-14 15.32.04.png
     
    Last edited: Jan 14, 2014
  19. blackant

    blackant

    Joined:
    Jun 18, 2009
    Posts:
    506
    Yeah looks very interesting plugin.
    will buy it for sure !
     
  20. GlitchedPolygons

    GlitchedPolygons

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

    $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 :D and I think it is getting really close to a release now.
     
  21. GlitchedPolygons

    GlitchedPolygons

    Joined:
    Jun 18, 2013
    Posts:
    201
    Okay guys, good news :)
    I am done now; submitting right now...

    Let's hope for an approval by the asset store team!

     
  22. bac9-flcl

    bac9-flcl

    Joined:
    Dec 5, 2012
    Posts:
    824
    Looking forward to the release, the tool looks nice and is going to come in handy in quite a few environments.
     
  23. GlitchedPolygons

    GlitchedPolygons

    Joined:
    Jun 18, 2013
    Posts:
    201
    Yes, me too! Let's hope the Asset store reviewers approve it :D And thanks for the nice words and advice.
     
  24. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    I love MeshPaint even if I haven't tired it out yet. Be prepared that I am going to buy it on day one :)
    I just had a closer look at your demos and I fear Unity is going to reject it, because "Paint meshes on selected GameObject" should not be in GameObject, but Component. You are adding a component to the selected game object, that's why it is technically wrong to place it in GameObject. Maybe you are lucky and it goes through.
     
  25. GlitchedPolygons

    GlitchedPolygons

    Joined:
    Jun 18, 2013
    Posts:
    201
    Thanks for the nice words :) Hm, I didn't even think about that :-| But it's a matter of seconds to change that, thanks for noticing. Argh I have a headache now: how could I possibly not think about this? Maybe I'm lucky and they don't even notice it ;D
    It'd be so boring to re-submit it and wait even more time, just because of 1 line of code :S
     
    Last edited: Jan 18, 2014
  26. GlitchedPolygons

    GlitchedPolygons

    Joined:
    Jun 18, 2013
    Posts:
    201
    MeshPaint has been declined guys... and among the things I have to fix, I also have to rename it... I think I'll call it MeshPaintBrush... or MeshBrush.... I don't know :/
     
  27. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,462
    If nothing better comes up, how about "Mesh on Mesh" ...?
     
  28. GlitchedPolygons

    GlitchedPolygons

    Joined:
    Jun 18, 2013
    Posts:
    201
    Hm, I used MeshBrush because it is what the Asset Store guy recommended me :|
     
  29. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,462
  30. GlitchedPolygons

    GlitchedPolygons

    Joined:
    Jun 18, 2013
    Posts:
    201
    Well, with MeshBrush you have much more control over the randomozation and placement in general. Populator populates your meshes with the "populate" button, which reminds me of the "Mass place trees" button of Unity's terrains.. You only have limited control whatsoever... With MeshBrush you actually have a circle brush area with customizable radius, scattering, offset and stuff like that to
    Precisely paint your meshes onto your meshes ;)
     
  31. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,649
    MeshBrush?!. Love the name. :D
     
  32. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,176
    Yep - cool asset, love the name MeshBrush! :)
     
  33. GlitchedPolygons

    GlitchedPolygons

    Joined:
    Jun 18, 2013
    Posts:
    201
  34. GlitchedPolygons

    GlitchedPolygons

    Joined:
    Jun 18, 2013
    Posts:
    201
  35. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    Bought! I am curious to try it out!
     
  36. GlitchedPolygons

    GlitchedPolygons

    Joined:
    Jun 18, 2013
    Posts:
    201
    Cool, thanks :D I already submitted the first update, which renames the main folder of MeshBrush (I accidentally called it Assets). In the meantime it gets updated on the store, you can just rename it to MeshBrush, it should work fine like that too. How is it so far? :) Sorry, I think I'm being a bit too curious too soon ;)
     
  37. GlitchedPolygons

    GlitchedPolygons

    Joined:
    Jun 18, 2013
    Posts:
    201
    Update got accepted too; folder name is fixed and a typo in the screenshots of the asset store page as well :D
     
  38. Play_Edu

    Play_Edu

    Joined:
    Jun 10, 2012
    Posts:
    722
    great work man
     
  39. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    8,394
    $10? That's a pretty fair price. I'll pick this up when I do my next round of Asset Store purchases.
     
  40. GlitchedPolygons

    GlitchedPolygons

    Joined:
    Jun 18, 2013
    Posts:
    201
    thanks man :D
     
  41. GlitchedPolygons

    GlitchedPolygons

    Joined:
    Jun 18, 2013
    Posts:
    201
    Cool! :D I hope you'll enjoy it. I actually have to say I am using my own tool a lot in my current forest scene. I am quite happy with what I have done here ;)
     
  42. GlitchedPolygons

    GlitchedPolygons

    Joined:
    Jun 18, 2013
    Posts:
    201
    By the way guys, if you have any requests, bug reports, feedback, questions or other stuff regarding MeshBrush feel free to just contact me here, through PM on the forums or e-mail if it's urgent.
     
  43. im

    im

    Joined:
    Jan 17, 2013
    Posts:
    1,396
    looks good

    added to my list of things to buy...
     
  44. GlitchedPolygons

    GlitchedPolygons

    Joined:
    Jun 18, 2013
    Posts:
    201
    Thanks :)
     
  45. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,649
    Yes, combine meshes and material. ;)
     
  46. GlitchedPolygons

    GlitchedPolygons

    Joined:
    Jun 18, 2013
    Posts:
    201
    Work in progress ;)
     
  47. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    Just a really quick summary of my first impression. I didn't read anything, opened the scene selected a cube and the wanted to draw on the cube. So I clicked another time on the cube and dragged the mouse. That resulted in:
    Afterwards I opened the help foldout and suddenly saw, that I have to press P, which certainly worked :)

    Other than that it works really good! I am going to write you a more detailed feedback when I have some more time. But be assured that the overall impression is good and you can also expect me to write a review in the Asset Store.
     
  48. GlitchedPolygons

    GlitchedPolygons

    Joined:
    Jun 18, 2013
    Posts:
    201
    Thanks a lot :). I already fixed that null reference exception error, it'll be in the next update. The 1.1 update actually has a new function in it: Combine painted meshes.
    With that function you can squish even more performance out of your scene by combining your painted meshes into a single mesh once you're done painting.
     
    Last edited: Jan 29, 2014
  49. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,074
    This is very interesting... I will be looking to use something like this eventually to add stuff like trash, debris, and really cool stuff...and it looks easy to use.
     
  50. GlitchedPolygons

    GlitchedPolygons

    Joined:
    Jun 18, 2013
    Posts:
    201
    Yes, that's a good idea. You'll be painting trash into your scene with ease ;D no more manual mesh-placing
     
unityunity