Search Unity

Realtime terrain vertex painting?

Discussion in 'Shaders' started by Dobalina, Sep 28, 2019.

  1. Dobalina


    Sep 6, 2013
    Hey everyone, I have a terrain vertex painting question.

    Here's brief explanation of what I have. I'm currently using a shaderforge material on my terrain. As with any typical terrain setup, I've hand painted the different layers (ie, grass,dirt,rock etc...) That all works and is fine...

    Next, I have a vehicle that drives on this terrain. I want to find some way that the tires will vertex paint my terrain as it traverses. Here's a somewhat similar example, except this is mesh only and doesn't support terrain painting.

    I know there are packages on the asset store that allow you to vertex paint on meshs via mouse clicks.... but I haven't seen much in the way of gameobject translation or collision painting the terrain. Any suggestions?
    Last edited: Sep 29, 2019
  2. unikum


    Oct 14, 2009
    Take a look at how the new painting tools works in Unity:

    Now they are part of editor namespace and use other unityeditor classes, but you can easily rewrite them to your own classes. I've done this myself for my game that has real-time terrain painting and this new system is very fast. You get the same performance as if you paint in the editor.