Search Unity

Polybrush - mesh sculpting, texture blending, and vertex painting for any mesh

Discussion in 'Works In Progress - Archive' started by yahodahan, Jan 25, 2016.

  1. yahodahan

    yahodahan

    Joined:
    Apr 26, 2009
    Posts:
    1,380
    Hi all! "Polybrush" is a tool that lets you sculpt organic meshes, blend up to 12 textures, paint vertex colors, and more on the way. Similar to Unity's terrain tools, but with the freedom to work on any mesh at all (including ProBuilder meshes, more on that later), and some extra features as well.

    Website: www.procore3d.com/polybrush



    Use Mesh Sculpting for:
    • Caves, tunnels, and other complex, otherwise-impossible terrain details
    • Adding special concave areas to your terrain
    • Custom rock/cliff walls, islands, etc
    • visually merging terrain with structures (ie, pushing sand/dirt up toward foundation/etc)
    Use Texture Blending for:
    • Painting terrain textures onto meshes
    • Paint on grunge, moss, dirt, rust, etc (my favorite!)
    Use Vertex Painting for:
    • Adding color to geometry
    • Hand-painting lighting (great for mobile games, or unique look)
    • Painting simple grunge, dirt, and detail onto models

    Polybrush is still in a very early stage, but we've had a lot of interest, so it's being released as an "Early Beta" version, on the Unity Asset Store. Beta purchases will be $65 instead of $95, and you get to help decide how we build Polybrush toward it's final version.

    We'll be adding more info as the tool develops, looking forward to questions/comments/feature requests/etc!
     
  2. ryannelson

    ryannelson

    Joined:
    Feb 26, 2015
    Posts:
    4
    I'm VERY excited for Polybrush. A few questions:

    - Can these mesh modifications be done in-game at runtime? Are there any plans for an API for this sort of functionality?
    - If I buy the beta, how will updates work? I'm assuming my purchase can't be connected to the asset store for later updates.

    Can't wait to see more -- I don't know what I'd do without ProGrids and ProBuilder.

    -Ryan
     
  3. yahodahan

    yahodahan

    Joined:
    Apr 26, 2009
    Posts:
    1,380
    Thanks Ryan!
    1) We haven't done any runtime work yet, but that could be in the future, sure
    2) We just pushed to the Asset Store, should be available there ASAP! :) Sorry for the wait. Otherwise, purchasing via webstore just means you download from our webpage, anytime you need.

    Thanks again!
     
  4. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    It looks promising, i have few questions :
    -What materials are supported ? Normal maps , detail maps ?
    -This is trilinear UV shader ?
    -Does it react to lights and can it uses Unity lightmap baking ?
    -Does it contains collision ? Can it generate a lower detail mesh for collision handling ?
    -What are the mesh polygons limit ? It is possible to make mesh as large as a 128 or 256 terrain mesh ?
    - It is possible to sculpt a low poly version and save it as collision , than have a sudivision brush to detail some parts ?
    - Do you plan some auto painting texture feature based on mesh angle (grass on floor and rocks elsewhere) to speed up the painting before detaillling manually ?
     
  5. yahodahan

    yahodahan

    Joined:
    Apr 26, 2009
    Posts:
    1,380
    Hi zenGarden, thanks!
    1) Polybrush sculpts geometry on any imported mesh, and any material at all can be on that mesh. No limits :) However- if you intend to paint vertex colors, you'll need to use some sort of vertex-color-enabled material. Similarly, for painting textures, you'll need to use a material that supports this feature. We've included example materials for each, and detailed documentation regarding the example texture-blending material.

    2) You could use a triliinear UV shader, sure! Our example does not. Again, any material at all, will work just fine :)

    3) I think there's a bit of confusion- no worries, I should have made it more clear! Polybrush doesn't create a fancy mesh/shader/etc. It just edits existing meshes. So, you can use any mesh, any material, and it'll be just fine. So, to answer, yes, it'll react to light/etc just the same as any other mesh in Unity- that part is completely up to you, we just enable sculpting and painting :)

    4) Yep, it's just a mesh, so collision is no different :)

    5) You could do this, sure

    6) We've talked about this, yep, and it may happen- but can't say for sure.

    Thanks zenGarden, sorry if I didn't make things clear enough (I'll edit the description). I think the most important answer is, Polybrush does not "create" (or require) any special meshes, textures, shaders, etc. All Polybrush does, is enable you to sculpt and paint on existing meshes, Unity :) I hope that helps to clear it up! :)
     
    zenGarden likes this.
  6. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    How do you keep good UV when you extrude some faces without such shader ?or when you grow volume.
    In the video we see texture deformation when you grow some mesh volume.
     
  7. yahodahan

    yahodahan

    Joined:
    Apr 26, 2009
    Posts:
    1,380
    A triplaner shader would be great, I agree. We'll almost certainly included an example shader of that type as well.
     
  8. gameDevi

    gameDevi

    Joined:
    Oct 14, 2015
    Posts:
    155
    oh dear :(

    I thought there would be a discount for ProCore Bundle customers.

    Nevermind.. if a sale comes then I'll purchase it. it's too expensive for me.
     
    S4G4N and DarkXess like this.
  9. yahodahan

    yahodahan

    Joined:
    Apr 26, 2009
    Posts:
    1,380
    Sure, we're open to a discount for Bundle users, just email us directly for info.

    As for a sale, we don't intend to put the tools on further sales- it devalues the product and makes full-price purchase customers unhappy. However, Polybrush is currently $30 off while in Beta, which should last for a couple more weeks, depending on development.

    Thanks for the interest!
     
  10. Brity

    Brity

    Joined:
    Feb 27, 2016
    Posts:
    116
    Hello All,

    I've found a bug.

    If Polybrush window is open.
    clicking a standard unity terrain in the scene freezes the editor and requires a Ctrl + Alt End task.

    Tested in Unity 5.3.2, 5.3.3, 5.3.3 p1
    Fresh project with only Polybrush installed.
    Windows 10


    Kind Regards
    Brity
     
    Last edited: Feb 27, 2016
  11. Collrain

    Collrain

    Joined:
    Oct 27, 2012
    Posts:
    45
    I am also having this issue. I don't have terrain in my scene though. Mine seems to freeze when I change from focus on the scene view to the Hierarchy. No error codes appear it just freezes requiring Ctrl+alt+del.

    Also windows doesn't recognise unity as not responding. Its mem usage and cpu ect all seem normal its just frozen and cannot click on anything within Unity.
     
  12. yahodahan

    yahodahan

    Joined:
    Apr 26, 2009
    Posts:
    1,380
    @Brity and @Collrain - thanks for the detailed bug reports! Will take a look ASAP.

    If you have time to also post this to our official support forum at "www.procore3d.com/forum", that really helps ensure we can fully track the issue. Either way, we'll get right on this and have an update quickly, thanks again for the info!
     
  13. karl_

    karl_

    Joined:
    Mar 4, 2010
    Posts:
    464
    Thanks for the reports, I just committed the fix for both of these crashes. Asset Store update submitted (0.9.4b0) and should be live any time now. Also included in this update are two new shaders for legacy lighting mode.
     
    Brity likes this.
  14. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    I find expensive 60$ for these features, i hope the tool will expend with more utilities.

    Anyway , you should change the name of the tool, why not ProBrush, because it is confusing with another product.
    http://polybrush.org/
     
    DarkXess likes this.
  15. Brity

    Brity

    Joined:
    Feb 27, 2016
    Posts:
    116
    Thanks guys for the speedy fix.
    Works perfect
     
    yahodahan likes this.
  16. Brity

    Brity

    Joined:
    Feb 27, 2016
    Posts:
    116

    That's what I thought before I purchased. I waited several days thinking but do I really need this, I have two other tools that do a similar thing. But the other tools have terrible customer service and bad workflow.

    I know ProCore customer service is amongst the best of them and they handle criticism so well. That's why I have all their tools and even double purchased. :) (purchased a few here and there then purchased the bundle)

    Also this is a very well thought out tool. I love the way I can adjust the brush size and falloff :) very speedy workflow.

    Well worth the money
     
    yahodahan and karl_ like this.
  17. Collrain

    Collrain

    Joined:
    Oct 27, 2012
    Posts:
    45
    I'm also happy with the price. Its a complicated tool condensed into an easy to use package. One thing I'm impressed with is the speed at which it handles a large vert count object. I created a massive plane and subdivided it loads to see how PolyBrush handled, it seemed fine, smooth and responsive. Any extra features would be a bonus but it already contains all of the functionality I personally wanted.

    Thanks for the quick fix Karl_. I'll try it out again once I'm home from work.
     
    yahodahan and karl_ like this.
  18. yahodahan

    yahodahan

    Joined:
    Apr 26, 2009
    Posts:
    1,380
    @Collrain and @Brity, thanks very much! It's really good to hear that! I know Karl has worked like mad to make this an especially solid "beta" launch.

    PS- may I shamelessly ask if you could post reviews on the Asset Store? :D Those really help new products!
     
  19. Collrain

    Collrain

    Joined:
    Oct 27, 2012
    Posts:
    45
    Review posted, keep up the fantastic work.
     
  20. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    @yahodahan
    Can the tool delete faces and weld vertex ? This is essential to build caves or holes on some mesh imported for example.
    It is included a triplanar shader in the actual version ? It is usable to avoid texture obvious deformations when we sculpt a mesh ?
     
    Last edited: Mar 3, 2016
  21. karl_

    karl_

    Joined:
    Mar 4, 2010
    Posts:
    464
    (Not @yahodahan, but I'm the dev responsible for Polybrush)

    No, it does not delete or weld vertices; though ProBuilder can perform these operations (and QuickEdit can delete faces but not weld). I think for this to be an effective all-in-one cave building tool we'd also need extrude and subdivide (both of which ProBuilder does). Definitely good feature requests, I'll add those to our list (can't say for sure when they would be implemented though).

    There are two tri-planar shaders included; one PBR enabled 4 texture blend and one legacy lighting 4 texture diffuse. You can check out a list of the included texture blending shaders here: http://procore3d.github.io/polybrush/modes/texture/

    If you have any other shaders that you think would be useful please let us know! It's also trivial to get existing texture blending shaders working with Polybrush (literally 2 extra lines in the shader), so there's that route too.
     
    zenGarden likes this.
  22. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Being able to specify precisely what vertexAttribute channels each writes into via preferences allows for much more custom shader usage by advanced developers. We might want flow painting. We might want to abuse other channels for more vertex colours than 4.
     
    karl_ and Brity like this.
  23. karl_

    karl_

    Joined:
    Mar 4, 2010
    Posts:
    464
    Currently you can use any combination of the mesh Colors, UV0, UV2, UV3, UV4, and Tangents attributes, all in Vec4 configurations. There's a 12 texture blend shader included with the package currently.

    For shader developers, telling Polybrush which channels to pass data to looks like this (in the shader):

    Code (csharp):
    1.  
    2.         // Tell Polybrush that this shader supports 12 texture channels
    3.         #define Z_TEXTURE_CHANNELS 12
    4.         // Tells Polybrush that the shader expects data in the Color, UV3 and UV4 channels
    5.         #define Z_MESH_ATTRIBUTES COLOR UV3 UV4
    6.  
    I didn't include the positions or normals as an option since I assumed those would almost never be used, but on thinking about it now I don't see a good reason for not including those. Who knows what weird hackery people will do in shaders :)

    Also, full docs on writing custom shaders (either in code or with ShaderForge) can be found here: http://procore3d.github.io/polybrush/shaders/

    I did a video tutorial on writing a simple unlit blend texture here:


    I'm not familiar with the technique, but I'm guessing that you'd write basically set custom bitangents to dictate the direction of a visual effect? I'd not considered that use, but that's a super cool idea. It would be pretty easy to translate brush strokes to directional data, I'll make a note to add that in soon!
     
  24. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Yeah there's a cool implementation over on github which allows us to use verts to paint the flow of water, which is kind of important :) Lava, other effects. Slime. You know! :)

    In addition you may want a set of utilities so they do not crowd the core package. Things like baking directionality from gravity automatically. So with a click, this mesh's flow is calculated for running water. Pretty hardcore sales pitch.
     
    McMayhem likes this.
  25. McMayhem

    McMayhem

    Joined:
    Aug 24, 2011
    Posts:
    443
    Hey @yahodahan, this tool looks beautiful! I've really wanted some kind of plugin/feature that allows for a terrain-like editing tool for ProBuilder meshes. You state that the tool can edit ProBuilder meshes, is that the case in the current beta? If so then I'll gladly fork out the cash for it. Just want to make sure that's a feature as it's pretty much going to be my primary use for this tool.

    Thanks in advance!
     
  26. karl_

    karl_

    Joined:
    Mar 4, 2010
    Posts:
    464
    @McMayhem yes, Polybrush currently supports editing ProBuilder meshes. However there're still a few caveats (which will be cleared up before Polybrush moves out of beta). They are:

    - UV3 and UV4 channels can't be set on ProBuilder meshes (which makes most of the included shaders useless. This is fixed in the next ProBuilder update, which will be 2.5.0)
    - The 'Hide Wireframe' toggle in Polybrush doesn't affect ProBuilder meshes
    - If you Subdivide a ProBuilder mesh you will need to weld the vertices before sculpting in Polybrush (also slated to be fixed in the 2.5.0 update)
     
  27. kilju

    kilju

    Joined:
    Nov 4, 2013
    Posts:
    127
    just bought and really love it :D
    just can u guys help me little bit with caves. cant seem to get it work like in your video demostration. seems like u use probuilder to push walls further away. but i tryed that with probuilder basic and cant seem to be able to choose faces.
    so can u guys give me some tips for making caves?

    thank you

    -Toni
     
  28. yahodahan

    yahodahan

    Joined:
    Apr 26, 2009
    Posts:
    1,380
    Hi Toni! Sure, I'll make a tutorial for caves ASAP!
    -GW
     
    kilju likes this.
  29. kilju

    kilju

    Joined:
    Nov 4, 2013
    Posts:
    127
    thank you yahodahan :D nice to hear

    Can somebody that is using polybrush with rtp3 shader help me little bit of setting shader to work with polybrush?
    mesh modification is working great but cant seem to get textures to show in paint mode. only empty slots
    thank you.

    -Toni
     
  30. karl_

    karl_

    Joined:
    Mar 4, 2010
    Posts:
    464
    I tested this with the `ReliefTerrainPMTriplanarStandalone` shader.

    First step - create a copy of the shader and name it something unique.

    Next, open the shader and change the first line (visible name) to something unique. Ex:

    Code (csharp):
    1.  
    2. Shader "Relief Pack - Standalone/Parallax Mapped Triplanar" {
    3.  
    4. // becomes
    5.  
    6. Shader "Relief Pack - Standalone/Parallax Mapped Triplanar (Polybrush)" {
    7.  
    Now search for the line "#define WNORMAL_COVERAGE_X_Z_Y_Ypos_Yneg" and comment it out.

    Code (csharp):
    1.  
    2. // the line:
    3. #define WNORMAL_COVERAGE_X_Z_Ypos_Yneg
    4.  
    5. // is now
    6. // #define WNORMAL_COVERAGE_X_Z_Ypos_Yneg
    7.  
    Finally, paste the the following lines anywhere in the shader source:

    Code (csharp):
    1.  
    2. // define Z_TEXTURE_CHANNELS 4
    3. // define Z_MESH_ATTRIBUTES COLOR
    4.  
     
    kilju likes this.
  31. kilju

    kilju

    Joined:
    Nov 4, 2013
    Posts:
    127
    Thank you karl. i will definetly try this tomorrow :D
    Grade A support!!
    thank you!
     
  32. karl_

    karl_

    Joined:
    Mar 4, 2010
    Posts:
    464
    No problem! If you have any trouble getting it working please let me know.

    On a side note, we've been in contact with the Relief Terrain Pack author and plan on rolling out some updates to Polybrush to better interface with his excellent shaders :)
     
    kilju likes this.
  33. kilju

    kilju

    Joined:
    Nov 4, 2013
    Posts:
    127
    nice to hear that u guys are working together :D both products rock!!
    im playing with polybrush and its really nice.
    but when i try to sculp mesh with like 30k triangles its really slow.
    its like i have to wait few minutes when i bring my mouse pointer to mesh is it normal?
    should i try to lower my tris count?

    thank you
     
  34. karl_

    karl_

    Joined:
    Mar 4, 2010
    Posts:
    464
    Thanks for the kind words!

    The lag on higher vertex count meshes is a bug; it will be fixed before Polybrush moves out of beta.
     
  35. ludos

    ludos

    Joined:
    Nov 14, 2011
    Posts:
    55
    how much work would be involved to make this possible to use at runtime?
     
  36. karl_

    karl_

    Joined:
    Mar 4, 2010
    Posts:
    464
    Quite a bit. It's technically possible, but I'd need to write almost all of the input and interface from scratch.
     
  37. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Is this a stand-alone product or does it require some other pro core asset to work?
     
  38. karl_

    karl_

    Joined:
    Mar 4, 2010
    Posts:
    464
    It's a Standalone plugin that works with any Mesh.
     
  39. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Thanks. I was hoping that was the case.

    I'm considering this for a terrain replacement, but I'm not really sure just how robust it is. Can painted textures have normal maps? Also, when sculpting terrain does the mesh tessellate to provide higher resolution for finer detail sculpting?
     
  40. karl_

    karl_

    Joined:
    Mar 4, 2010
    Posts:
    464
    Whether painted terrains contain a normal is up to the shader, and Polybrush does include a normal mapped texture blend standard shader. It also works with other terrain shaders you might find in the Asset Store (thanks to the new shader metadata system).

    It does not dynamically tesselate meshes, but it's something we're looking at for the future (no estimate on when though).
     
  41. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Like RTP or Uber?

    So, the polygon count doesn't change during sculpting? So I just have to make sure I have a sufficiently tessellated mesh to begin with?
     
  42. karl_

    karl_

    Joined:
    Mar 4, 2010
    Posts:
    464
    Yes, and yes. I think RTP would require shader metadata to be set up, but I'll look into doing that and including the template in the next update.
     
  43. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Thanks. I may just pick this up. I own both RTP and UBER and the combination with Poly Brush would be quite nice.
     
  44. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    This one could also suit your needs about shaders and it has flow options ?
    https://www.assetstore.unity3d.com/en/#!/content/55649
     
  45. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
  46. DGordon

    DGordon

    Joined:
    Dec 8, 2013
    Posts:
    649
    Hello!

    Two quick questions which will determine if I pick this up very shortly ... or most likely later :p.

    A) I'm using the Curved World standard shader. Will this work out of the box with it, and if not, is anyone able to figure out how to get it working?

    B) I'm currently using a unity terrain ... what would the performance cost (for better or worse) be if I switched over to one large subdivided mesh instead? Is this not recommended? It seems to me like this is just a better version of terrain, but maybe I'm missing something.

    Thanks!
     
  47. karl_

    karl_

    Joined:
    Mar 4, 2010
    Posts:
    464
    If the Curved World shader works on any mesh, it ought to be fine.

    This depends on the situation, but if you have a large terrain vs. a large subdivided mesh I think the terrain would probably be preferable. The Unity terrain and it's associated shaders have optimizations for LOD, where a large subdivided mesh is just loaded all at once. That said, it may be more performant to load the terrain as a mesh in some cases, as meshes can be batched. Apologies for the opaque answer here, but this is one of those things where there's not a blanket "yes" or "no" answer.
     
  48. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    Posting because I love this asset, highly recommended, but since flow came up - I do quite like the product linked but I find polybrush so easy and fast to use it don't want to stray from it, leading me to request if flow map generation or painting would be possible in future?
     
  49. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
  50. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    That looks brilliant I had no idea it existed, cheers!