Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Path Painter - Paths, Ramps, Roads & River Beds for Unity Terrain

Discussion in 'Assets and Asset Store' started by AdamGoodrich, Sep 11, 2018.

  1. PWPeter

    PWPeter

    Joined:
    Dec 16, 2018
    Posts:
    555
    I've added an entry for our development backlog to remove those fixed paths. We plan to get rid off this path dependency in future versions of Path Painter because it creates problems for us as well in development.
     
  2. frankslater

    frankslater

    Joined:
    May 9, 2016
    Posts:
    213
    Hey @Shadowing,

    That was an oversight I have already looked at in the update that's coming (will need to check if properly resolved). Sorry for the inconvenience and the delays. I started reviewing my procedures to avoid bigger/longer updates delaying urgent ones in the future.

    If you think, you can try to figure out which other product is affected by the DB refresh. That can help the publisher in case it's down to something unintended by them. I will also look at optimising Path Painter.
     
  3. SickaGamer

    SickaGamer

    Joined:
    Jan 15, 2018
    Posts:
    1,267
    When is Path Paint going to incorporate a Spline tool?
     
  4. PWPeter

    PWPeter

    Joined:
    Dec 16, 2018
    Posts:
    555
    We are currently exploring splines as an option to have more flexibility / editable paths in Path Painter, but we cannot guarantee yet splines will be coming as a feature and when that feature would arrive.
     
    Mark_01 and recon0303 like this.
  5. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,780
    Hey everyone,

    We are very pleased to announce that Path Painter 1.1 is now live on the asset store!

    Enhancements:
    • The paint button is now bigger.
    • Changed the size hotkeys to CTRL+Q/E.
    • Updated for 2018.3 to use the new terrain API.
    • Path Painter can now be placed into any directory.
    • Single active terrain is now automatically selected on open.
    • Made the status bar hotkey tips adapting to OSX (CTRL/CMD).
    • Added visualization to show the active line (editable) and display when straight painting.
    • Added a workaround for the Unity bug that causes things not to not render over the terrain in 2018.3.
    • Updated warning message for non-square terrains to make it more clear that only square terrains are supported.
    Fixes:
    • Stop null pointer exceptions when the environment changes. Path Painter should now do a much better job recovering from these situations.
    • Avoided cursor pointer exceptions on OSX!

    Check this video out to see how we use Path Painter to take advantage of a Gaia Terrain and the height blending feature of CTS to create perfectly blended paths with your terrain:

     
    Last edited: Feb 21, 2019
    Mark_01 likes this.
  6. ebadier22

    ebadier22

    Joined:
    Jun 20, 2017
    Posts:
    9
    Hi,

    Is there a way to get the length of a path (all over the terrain slopes & curves) edited with path painter ?

    Thanks in advance,
     
    frankslater likes this.
  7. PWPeter

    PWPeter

    Joined:
    Dec 16, 2018
    Posts:
    555
    There is nothing currently built in in path painter for that, I'm afraid. Depending on how precise the measurement needs to be I would create a small script that allows you to place a list of cubes in the unity terrain and then measures the distance between them, adding up to a total distance.
     
  8. ebadier22

    ebadier22

    Joined:
    Jun 20, 2017
    Posts:
    9
    Hi Peter,

    Inversely, is there an API where I can automatically generate a path by providing a list of predefined positions ? (Instead of using my mouse to generate the path manually).
     
    frankslater likes this.
  9. frankslater

    frankslater

    Joined:
    May 9, 2016
    Posts:
    213
    Hi @ebadier22,

    I've been planning to explore an API, and it's one of the first things on my list to explore at the moment. Not yet sure when I will be able to spend some time with Path Painter, but I added it to the item on my list to give you more details when I get there.
     
    Mark_01 likes this.
  10. lolaswift

    lolaswift

    Joined:
    Jan 10, 2019
    Posts:
    151
    Hi, a noob question. I want to create rally racing tracks and offroad racing tracks(desert, lake area, mountain, mud,etc). Can I do it with Gaia + path painter ? Any advice would be much appreciated.
     
  11. PWPeter

    PWPeter

    Joined:
    Dec 16, 2018
    Posts:
    555
    You can certainly do that, path painter allows you to change the ground textures and the heightmap of your terrain in one go, so you could draw a mud trail through your terrain for example. However what could be problematic is that you are quite limited in editing your paths after you created them, I can imagine that for a rally game it might be important to go back and edit the tracks again and again until all turns are fair, and the course is fun to drive etc. This would be difficult with path painter as it alters the terrain data directly, and after that is saved it can't be edited that easily anymore.
    I would therefore rather recommend to get a pure road building asset (Easy Roads, Pro Road) from the asset store instead.
     
  12. lolaswift

    lolaswift

    Joined:
    Jan 10, 2019
    Posts:
    151
    Awesome answer. Many thanks PWPeter.
     
  13. pilgrimage80

    pilgrimage80

    Joined:
    Mar 15, 2019
    Posts:
    4
    I'm using Path Panther 1.0. What should I do to remove the path that I created later? I'm looking for a solution other than CTRL + z. How do I add new textures?

    thankyou for support.
     
  14. PWPeter

    PWPeter

    Joined:
    Dec 16, 2018
    Posts:
    555
    The paths you paint are directly applied to your terrains heightmap and splatmap data, so they "become part of the terrain" if you so will. This means to remove the path you would need to paint over with the different texture that you want displayed instead.

    To add new textures you need to add them to the terrain itself, Path Painter will use the textures that are currently present on the terrain.
     
  15. MaximilianPs

    MaximilianPs

    Joined:
    Nov 7, 2011
    Posts:
    321
    Did it works with multiterrain grid?
    I'm using Terrain Former on Unity 2018.2, but I've a copy of the project also on Unity 2018.3
     
  16. PWPeter

    PWPeter

    Joined:
    Dec 16, 2018
    Posts:
    555
    You can't seamlessly paint from one terrain to the other, but you can switch to the other terrain and continue painting with the same settings there. You might need to fix up small gaps between the terrain with the unity smoothing tool, but I think it is a doable workaround, I made a sample recording here of painting across two terrains & fixing the seams:
    https://imgur.com/a/y7rVjAr
    (note that path painting is usually not that choppy with path painter, looks like recording the screen at the same time was too much for my poor CPU)
     
  17. MaximilianPs

    MaximilianPs

    Joined:
    Nov 7, 2011
    Posts:
    321
    I see it's not a big issue after all. :D
     
  18. yotingo

    yotingo

    Joined:
    Jul 10, 2013
    Posts:
    44
    Hi, I'm thinking about purchasing Path Painter but just had a few questions first.

    1. Is it fully compatible with RTP (Relief Terrain Pack)?
    1.a. Are the Embankment textures tri-planar? Does it just use your current terrain shader?
    2. How many different textures can you load into the tool? In the video I see 4.
    3. Can you change the path size half-way through a path? (e.x. wide road that converges into a small foot-trail)
    4. Is the tree/grass clear feature compatible with Vegetation Studio?
    5. Is there anyway to randomize or add noise to the edge of the path brush? (So the edge of a river wouldn't be so clean and smooth.)
     
  19. PWPeter

    PWPeter

    Joined:
    Dec 16, 2018
    Posts:
    555
    Path painter modifies the existing terrain splat and heightmap, if RTP uses the terrain splatmap as well as its control texture (to determine which texture is displayed where on the terrain) it should work. Or in other words: If you still can paint on textures with the unity terrain tools while using RTP path painter should work as well.
    Does just use the current terrain shader, if the terrain shader supports triplanar mapping you should be able to use it on the embankment textures.
    As many as the terrain shader supports.
    There is no direct setting for different start and end width, you would need to draw repeatedly with increasing / decreasing settings to achieve this.
    No, but we plan to support this in the future as it has been requested a lot. What you can do now is to use the Vegetation Mask Line component, that also allows you to use noise on the edge of the path: https://www.awesometech.no/index.ph...onents/vegetation-masks/vegetation-mask-line/
    Not yet, but also planned.
     
  20. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Hi. If you set up a terrain texture exclude rule in Vegetation Studio for the path/road texture it will exclude where you have painted a path. It will update when you enter playmode or if you toggle the Vegetation Studio gameobject on/off.

    There is a simple refresh function that takes a bounds. I think it should be easy for Path Painter to call this for changed areas.

    Lennart
     
    Mark_01 and PWPeter like this.
  21. yotingo

    yotingo

    Joined:
    Jul 10, 2013
    Posts:
    44
    Thanks, both of you, for the detailed info!

    That answers all my questions, I'll go ahead and make the purchase. -have been happy with the other assets from Procedural Worlds and Awesome Tech.
     
    PWPeter likes this.
  22. netpost

    netpost

    Joined:
    May 6, 2018
    Posts:
    388
    Hi,

    Is Path Painter compatible with Unity 2019? I have no error but I can't draw a negative elevation. Even when holding shift later on... I also tried to raise my terrain so I can dig in with the same result. So I can't draw rivers and lakes. I use Unity 2019.1.7f1

    Thanks for your help!
     
  23. PWPeter

    PWPeter

    Joined:
    Dec 16, 2018
    Posts:
    555
    Yes, it should work in this version. It is correct that you would need to raise the terrain first, before being able to dig down again, if you have a terrain located at y=0 you are not able to dig below 0, this is an engine / terrain system limitation. But other than that there should be nothing preventing you from doing this. Can you please try the following to see if it works in a new scene:

    1. Create a new scene
    2. Create a terrain from the Scene Hierarchy "Create" Menu
    3. Add a bit of hills on the terrain with the built-in unity terrain tools
    4. Open the Path Painter window, set a negative elevation
    5. Start paint mode and see if you can carve in the terrain.
    Result should look like this:

    2019-07-03_00-48-15.gif

    If this works in the empty scene we need to dig deeper to find the difference to the non-working terrain.
     
    Mark_01 and AdamGoodrich like this.
  24. netpost

    netpost

    Joined:
    May 6, 2018
    Posts:
    388
    Thanks for the quick reply. Yes I can carve the hills. Usually I use Gaia to create my terrain but for this test I was trying to dig in a basic unity terrain but I understand now. I have to make a volume first before I dig in. It make sense. :)

    Thank you.
     
    frankslater, AdamGoodrich and PWPeter like this.
  25. Ziplock9000

    Ziplock9000

    Joined:
    Jan 26, 2016
    Posts:
    360
    Is there a demo version of this?
     
  26. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,780
    No. There is already plenty of material out there that shows what it does. Creating demo's for tools like ours is difficult as you can't make them 'half work', and you can't control their usage.
     
    Mark_01 and Ziplock9000 like this.
  27. jebediahh

    jebediahh

    Joined:
    Feb 20, 2017
    Posts:
    26
    Can you create paths in code or just in editor?
     
    frankslater likes this.
  28. PWPeter

    PWPeter

    Joined:
    Dec 16, 2018
    Posts:
    555
    Currently it is only possible in editor, but we are thinking about adding an API to Path Painter at some point.
     
  29. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    Hi, I am using Vegetation Studio Pro, CTS and Path Painter.

    My first issue is this:

    I have set VSPro up and CTS and have the terrain looking fine.

    However, when I paint the paths that works fine too. My problem is that after I paint a path it isn't permanent. Meaning If I return to VS to make a fine adjustment then Generate Biome Splatmaps, this wipes out all the paths.

    Is there a way to paint the paths, make adjustments to biomes in VSPro and still keep the paths?

    I am at the beginning and don't want to paint lots of paths and have them all wiped out?

    In other words, do I need to finalize the terrain texture/biome splats before beginning the Path Painting?

    The second point is: Is there a way to paint from tile to tile on a multi tiles terrain?
    The third point is: If I change the resolution of a tile will that displace the tile I am painting from other tiles? IO ask because I noticed a tile was displaced so wanted to make sure that it was PP causing the displacement. I changed resolution from 1020 to 2048 to paint a terrain so presume that is what cause d the misalignment.

    Thanks
     
    Last edited: Sep 20, 2019
    frankslater likes this.
  30. PWPeter

    PWPeter

    Joined:
    Dec 16, 2018
    Posts:
    555
    Currently this is the case, yes: Path painter works by altering both the terrain splatmap and heightmap which are basically both simple image files stored in the terrain data. If either the splatmap or heightmap is overwritten by another tool, you will lose your path texturing or your path shape. We are working on a path painter API however which should allow you to place abstract spline based paths which then can be repainted on request. Until that update is in, I would recommend to restrict the path painting to when the terrain is mostly finalized.

    You can't seamlessly paint from one terrain to the other, but you can switch to the other terrain and continue painting with the same settings there. You might need to fix up small gaps between the terrain with the unity smoothing tool, but I think it is a doable workaround, I made a sample recording here of painting across two terrains & fixing the seams:

    https://i.imgur.com/4kSxgCO.mp4

    (note that path painting is usually not that choppy with path painter, looks like recording the screen at the same time was too much for my poor CPU at that time)

    I'm not 100% sure how severe the misalignment was, and if it was on the control texture / splatmap, or on the heightmap, but in general if you change the resolution of one terrain while the resolution of the other terrains stay the same, I would expect problems with alignment. This is however a bit more of a logical problem than a Path Painter bug: Imagine you have two images next two each other, both with the same resolution. You draw a line that is 5 pixels wide across the border of both images, no problem, both have the same resolution. Now you reduce the resolution of one image by half, and try to scale the content in the new resolution - should the formerly 5 pixel wide line now be 2 pixels or 3 pixels wide? In both cases the line would not align properly with the line on the other image anymore.
     
    Hawk0077 likes this.
  31. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    Thanks PWPeter, much appreciated. I did paste the 1024 version with the new 2048 resolutioned terrain and that did close the gaps again. Thanks.
     
  32. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    Hi Lennart, Is this also true of Plant and Objects, as Path painter doesnt currently remove Plants and Objects. I did try this yesterday and it didnt seem to be the case? I will try again today though. Thanks.
     
  33. Steveuk87

    Steveuk87

    Joined:
    Feb 16, 2016
    Posts:
    3
    Hi all, late to the party on this, bought the product yesterday and its awesome... but i want to use my own terrain textures... i can't seem to find how to import them... am i missing a trick?
     
  34. SickaGamer

    SickaGamer

    Joined:
    Jan 15, 2018
    Posts:
    1,267
    Add them to the terrain and then you can use them.
     
    frankslater and Hawk0077 like this.
  35. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    When you open Window > Path Painter -> Path Painter... then click your terrain all of the textures that you have assigned to the terrain layers (or used in vegetation studio) should be available to use.
     
    frankslater likes this.
  36. frankslater

    frankslater

    Joined:
    May 9, 2016
    Posts:
    213
    Welcome Steve,

    thanks for your question.
    I want to avoid others getting stuck with this.
    Do you think tooltips on the texture controls, like the one below, would have helped you with this?

    upload_2019-11-20_15-57-26.png
     
    Hawk0077 likes this.
  37. frankslater

    frankslater

    Joined:
    May 9, 2016
    Posts:
    213
    Hi @Hawk0077,

    Sounds like Vegetation Studio doesn't know/expect that you changed the terrain there and is working from a then outdated cache and overwriting your paths. Is it possible that you paint the paths in the middle of a Vegetation Studio procedure during which you are not supposed to edit your terrain?
    It's on my TODO list to dig into Vegetation Studio, but I don't yet know when because I have more pressing things before. When I get there, I'm planning to explore better cooperation/integration with Vegetation Studio.


    I have already spent time exploring this and it is high on my list. I can't promise you anything at this stage, because it isn't as simple with Path Painter as with regular paint tools and the aim is to support this in older Unity versions as well. Something just occurred to me regarding the API (available in 1.2.0+). The API still only paint on the first terrain it hits, but if you have a spline across two tiles, you could try painting from one end of the spline and then the other (so painting starts on one tile and then the other) and see what that does.
     
    Hawk0077 likes this.
  38. frankslater

    frankslater

    Joined:
    May 9, 2016
    Posts:
    213
    (Obviously this isn't a great solution by any means, but I hope I can give you something better soon.)
     
  39. frankslater

    frankslater

    Joined:
    May 9, 2016
    Posts:
    213
    Hi @jebediahh,

    In case you missed the update, the first API of Path Painter was released with 1.2.0 in September. I hope it helped you with what you needed.
     
  40. marcrem

    marcrem

    Joined:
    Oct 13, 2016
    Posts:
    340
    Hi

    I'm using a spline tool to create our road meshes. This tool doesnt come with a very robust terrain levelling function. Could I use PP's API to input the coordinates of my spline to create a ramp that matches my spline? Thanks
     
    frankslater likes this.
  41. SickaGamer

    SickaGamer

    Joined:
    Jan 15, 2018
    Posts:
    1,267
    To bad they can't get their software back...
     
  42. mthawley

    mthawley

    Joined:
    Sep 7, 2018
    Posts:
    104
    Hi all! Is there a way to run Gaia Texture Spawner without over-writing the Path Painter textures? Cheers.
     
    frankslater likes this.
  43. DiscoFever

    DiscoFever

    Joined:
    Nov 16, 2014
    Posts:
    286
    Well, they will for sure !
     
  44. frankslater

    frankslater

    Joined:
    May 9, 2016
    Posts:
    213
    Hi marcrem,

    It depends how you want to deal with the height.
    Do you want your road meshes to align with and run on the track Path Painter created for them, or do you want Path Painter to adjust the terrain to fit your road meshes?
    The latter is not a target use case at the moment, and it would require a very specific method I can't really recommend.

    I was planning for two options once I get to explore built-in splines for Path Painter. The two options are "2D" and "3D".
    1. In 2D mode you only care about your spline's x and z coordinates to provide the input that you would normally do with your mouse pointing at the terrain, but otherwise you work with the usual terrain follow setting of Path Painter.
    2. In 3D mode the spline also specifies the height you want your path to run at.
    The first API (in v1.2.0) only does option #1. That's what the painter naturally does since splines are not implemented as of now.
    I'm pretty much done adding a preliminary feature to make option #2 possible with the API. Currently you make the API call Painter.Paint() (using PathPainterAPI), which does option #1. Once the feature is released (probably with the next update), you will call Painter.Paind3D().

    Here are examples of both using a Pegasus spline.

    Unity_2019-11-22_10-47-25.jpg

    Code (CSharp):
    1. Painter.Paint(nodes, Paint.Size(6f), Paint.EmbankmentSize(30f), Paint.Elevation(-1f), Paint.EvenRamp(0.6f), Paint.TextureIndex(1), Paint.EmbankmentTextureIndex(3));
    Unity_2019-11-22_10-47-33.jpg

    Code (CSharp):
    1. Painter.Paint3D(nodes, Paint.Size(6f), Paint.EmbankmentSize(30f), Paint.Elevation(0f), Paint.TextureIndex(1), Paint.EmbankmentTextureIndex(3));
    Unity_2019-11-22_10-47-42.jpg


    Note: road meshes on a Unity terrain can be tricky. For example due to how 3D objects work in computer graphics. Recently I've been helping someone with their project of placing (mesh) roads on Unity terrain. They bumped into the zigzag shaped, choppy results many people gets puzzled about when making sharp rises or falls on terrains. That's just not something you can do well on a Unity terrain.

    Here is an image of the problem and I marked with red some areas where the terrain would have to drop fairly sharply.



    You can actually see the terrain height resolution by the tris, so I (badly) painted them on to show the person what caused the problem.



    I also painted approximately what a 3D modeller would do if he was creating a mesh for the terrain with the road.


    The sharper is the change in steepness on a Unity terrain, the more prominent this issue will be (unless the drop/rise is parallel with the vertices (edges) of the terrain mesh). Increased heightmap resolution will make these imperfections smaller, but won't get rid of them completely. You sort of need to find the sweet spot and not exceed a certain sharpness at areas where you don't want the effect. When you need a sharp drop/rise, usually you will want to cover it with rock, cliff and other prefabs.

    I hope this helps.
     
    AdamGoodrich likes this.
  45. frankslater

    frankslater

    Joined:
    May 9, 2016
    Posts:
    213
    Hi @mthawley,

    The short answer is no.
    I have some future plans where a solution for this could fit in well (if I succeed with the plan). I added to my backlog to explore a feature where you could reapply paths as a whole or in parts (texture, vegetation, height, etc.). I'm also planning to explore a feature that would allow you to export masks of your paths.

    Very good question, thanks.
     
  46. mthawley

    mthawley

    Joined:
    Sep 7, 2018
    Posts:
    104
    Ok thanks. In that case I have a feature request. Would it be possible to paint textures without any terrain deformation?
     
    frankslater likes this.
  47. marcrem

    marcrem

    Joined:
    Oct 13, 2016
    Posts:
    340

    Thanks so much for your detailed answer! Yeah, we are trying to adjust the terrain to fit our road meshes. Our meshes are generated from the splines, so we don't have an actual modeler doing this part.
     
    frankslater likes this.
  48. frankslater

    frankslater

    Joined:
    May 9, 2016
    Posts:
    213
    Great idea thanks. It occurred to me once or twice as well, but I forgot about it. I added to my current plans to explore that option. I'll let you know once I have a better idea if/when that will be available.
     
    SickaGamer likes this.
  49. frankslater

    frankslater

    Joined:
    May 9, 2016
    Posts:
    213
    At the moment working on a number of performance gain tech.
    This will help to fare better in case you want to paint some real long strokes

    upload_2019-12-3_19-9-41.png
    > Animated GIF image here <

    and also allows painting with bigger brush/embankment sizes

    2019-12-03_18-42-00.gif
     
    Last edited: Dec 3, 2019
    mthawley and StevenPicard like this.
  50. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,557
    Screen Shot 2019-12-04 at 10.39.20 AM.png

    Im using a simple A* to generate points along a terrain.

    Can I feed these points to Path Painter at runtime and have it generate a road/deform the terrain from them?

    And would this work in runtime on IOS and Android?

    Thank you:)
     
    StevenPicard and frankslater like this.