Search Unity

  1. Unity 2019.1 is now released.
    Dismiss Notice

Polybrush: Runtime vertex painting

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

  1. MechaWolf99

    MechaWolf99

    Joined:
    Aug 22, 2017
    Posts:
    16
    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:
    512
    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:
    16
    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:
    512
    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:
    16
    Cool! Thank you for the quick reply!
     
  6. Tudor

    Tudor

    Joined:
    Sep 27, 2012
    Posts:
    95
    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:
    188
    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:
    773
    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:
    95
    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
    Rahd likes this.
  10. hippocoder

    hippocoder

    Digital Ape Moderator

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

    Sonorpearl

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

    OldLegWig

    Joined:
    Mar 18, 2018
    Posts:
    56
    I was curious if there was any update on this. Not much news on this tool lately.
     
  13. gabrielw_unity

    gabrielw_unity

    Unity Technologies

    Joined:
    Feb 19, 2018
    Posts:
    512
    We burned WAY past that deadline (sorry!) but we do have a dev working 100% on this. One of the latest additions to 1.x was ensuring that pre-1.x meshes will update smoothly, we do not want to rush things and cause trouble. Thanks for your patience! :)