Search Unity

  1. Unity 2018.3 is now released.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Want more efficiency in your development work? Sign up to receive weekly tech and creative know-how from Unity experts.
    Dismiss Notice
  4. Build games and experiences that can load instantly and without install. Explore the Project Tiny Preview today!
    Dismiss Notice
  5. Nominations have been announced for this years Unity Awards. Celebrate the wonderful projects made by your peers this year and get voting! Vote here!
    Dismiss Notice
  6. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  7. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

Polybrush: Runtime vertex painting

Discussion in 'World Building' started by MechaWolf99, Nov 5, 2018.

  1. MechaWolf99

    MechaWolf99

    Joined:
    Aug 22, 2017
    Posts:
    11
    I need to do some vertex painting at runtime and was hopping to use Polybrush rather than having to make my own solution. But there seems to be 0 documentation on the APIs in Polybrush.

    So I am wondering if someone can direct me to some docs for it. Tell me how to do it or where to start.
    Or would it be better to just make my own solution from scratch to handle runtime vertex painting?
     
  2. gabrielw_unity

    gabrielw_unity

    Unity Technologies

    Joined:
    Feb 19, 2018
    Posts:
    230
    Hi there! With Polybrush 1.0 coming out soon, we're waiting a bit before enabling the Public API. Don't want to delay the tool just for that. However, we'll have full documentation and info when that does land (sometime after 1.0). Sorry for the wait!
     
  3. MechaWolf99

    MechaWolf99

    Joined:
    Aug 22, 2017
    Posts:
    11
    Okay, cool. Thank you for the reply and update. Are you able to give me an idea for what that soon looks like? Like a couple of weeks? a couple of months? 6+ months?
     
  4. gabrielw_unity

    gabrielw_unity

    Unity Technologies

    Joined:
    Feb 19, 2018
    Posts:
    230
    We're shooting for around the same time as Unity 18.3 lands, same for ProBuilder 4.x :) So, within the month perhaps?
     
    hippocoder likes this.
  5. MechaWolf99

    MechaWolf99

    Joined:
    Aug 22, 2017
    Posts:
    11
    Cool! Thank you for the quick reply!
     
  6. Tudor

    Tudor

    Joined:
    Sep 27, 2012
    Posts:
    80
    Hi, bumping this because I need to know IF polybrush HAS any runtime capabilities, or if it's something limited to the Editor only? (eg does it depend on editor code that isn't available at runtime (build time)?)

    Do I need to wait for version 1.0 to do runtime painting? Or were we waiting for v1.0 just for the documentation?
     
    Last edited: Dec 7, 2018
  7. lejean

    lejean

    Joined:
    Jul 4, 2013
    Posts:
    157
    Well there is a example in the probuilder package that has runtime face painting..

    But I'm also looking for a way to color a vertex only, not a face so ye, an API would be most useful.
     
  8. dadude123

    dadude123

    Joined:
    Feb 26, 2014
    Posts:
    701
    Using this API, will we be able to (for example) paint on any mesh? Or does it have to be prepared somehow?
    Could I just, for example, apply one brush stroke of "set vertex color to red" on any `UnityEngine.Mesh`?
     
  9. Tudor

    Tudor

    Joined:
    Sep 27, 2012
    Posts:
    80
    Yes the example scenes also work during playmode in the Editor. But the code seems to be heavily involved with `using UnityEditor;` I'm trying to sift through it now and see if/what I can do to get it to work in a build. I just want vertex painting at runtime >_>

    [EDIT] For others that want to use Polybrush in builds, for Vertex Painting, look at `
    z_BrushModePaint.cs` and start from `public override void OnBrushMove(z_BrushTarget target, z_BrushSettings settings)` inside there.
     
    Last edited: Dec 7, 2018
  10. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    23,825
    What new features are available? As a signed up probuilder-lover I demand to know.
     
  11. Sonorpearl

    Sonorpearl

    Joined:
    Sep 8, 2017
    Posts:
    13
    Have you tried Baking the Vertex to the Mesh, via the PolyBrush Bake Vertex Streams? That could also be a problem in some cases. ^^