Search Unity

  1. Unity 2019.2 is now released.
    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. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,638
    Sorry about this - I have been down with bronchitis and the entire team has been crazy busy with Humble Bundle and the updates we have done to all of our tools. Tutorials coming very soon.
     
  2. runningbird

    runningbird

    Joined:
    Sep 3, 2009
    Posts:
    377
    Can't wait I got to play around with Path Painter this weekend and it's amazing.
     
  3. hacker9001

    hacker9001

    Joined:
    Sep 28, 2017
    Posts:
    12
    do you need gaia to use path painter ?
    when we have tutorial videos ?
    thanks
     
  4. txarly

    txarly

    Joined:
    Apr 27, 2016
    Posts:
    197
    hey, great tool,just a question.I see Pathpainter changes the geometry of the map,so i cannot use it with TC2 because it updates the heighmap deleting the changes done with PP.
    Does Gaia do the same?i mean, if i stamp with Gaia after using Pathpainter, all the paths/roads done will be deleted?

    If so, would like to suggest a total integration with Gaia.The option to do manual changes on a map or with Pathpainter and then continue stamping with gaia or other terrain tools will be the perfect tool

    Thanks
     
  5. Shawn67

    Shawn67

    Joined:
    Jan 2, 2014
    Posts:
    2,196
    Path Painter is a totally separate tool. While you can use both tools on your terrain, Gaia is not required for you to be able to use Path Painter.

    The team is working on tutorial materials and hopefully we will have them soon. Normally we try to have these done prior to releasing a tool but the schedule got a little trashed this month due to have so many different things hit at the same time followed by Adam getting bronchitis.

    I would recommend fully stamping/forming your terrain with your terrain tool before using your other tools such as Path Painter. Any tool that you use to add rivers, paths, game objects, creatures, etc are effected when you go back and reform the terrain. Path Painter is no different in that regard. It is usually best to finalize your topography before doing these other things.

    With that said, I know @frankslater is looking at things that are possible for future features. I can't personally think of a way this could be done, but Frank is a much better coder than I am. So who know what the future might hold! :)
     
  6. RonnyDance

    RonnyDance

    Joined:
    Aug 17, 2015
    Posts:
    557
    Shawn67 explained it really well. Normally you stamp your terrain first with TC2, Gaia etc. and after that you add details like rivers, paths etc. Why do you need to do it differently? If you stamp a terrrain completely new after adding details like terrain modification through rivers and paths, it's totally normal that your terrain will change and your changes will be overwriten by the new stamp.

    Cheers
    Ronny
     
    Shawn67 likes this.
  7. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    887
    I have a feature request: Allow painting of tracks as if a 4-wheeled vehicle was driving through the mud. Leaving e. g. a middle line of grass.
     
    Mark_01 and runningbird like this.
  8. RonnyDance

    RonnyDance

    Joined:
    Aug 17, 2015
    Posts:
    557
    Yeah a very important feature. I already posted something like this in the Discord Community. For that you need an extra noise texture and the possibility to define two or more textures for the surface. So you can have a two sided road mud way and in the middle you see some grass texture with grass.

    Mostly like in this pictures:



    I also talked to Recon in the Chat. Lot of people like him are using one subsance texture only for that, so in the middle the texture blends with the terrain texture. The only problem I have is that Vegetation Studio will possible not get, that it has to spawn grass in the middle texture and not on the mud.

    Cheers
    Ronny
     
    Last edited: Sep 23, 2018
  9. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,638
    Hey everyone - finally a Path Painter tutorial!

     
    hoodoo, Mark_01, StevenPicard and 2 others like this.
  10. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    887
    That's great, thanks for the tutorial! Few feature requests come to mind instantly after watching. May I suggest:

    * draw a gizmo on the editable path, i. e. the one with the last stroke

    * maybe visually display that you are in edit mode by changing the background color of the path painter panel parts which affect the editable path instead of having just edit mode on / off on the bottom of the panel; on the other hand, I see most are affecting, so maybe an explicit toggle button on top of the panel next to the painting on/off button might work as well

    * offer an undo button in the path painter panel

    * would it be possible to change the brush and embankment size with something different than a 2 key combination, especially one that doesn't involve the alt key? maybe ctrl + drag and ctrl + shift + drag?

    * for painting straight lines one has to hold the shift key and click. maybe some line preview might be handy, just like e. g. debug rays
     
    Last edited: Sep 26, 2018
    AdamGoodrich likes this.
  11. TomTumbler

    TomTumbler

    Joined:
    Dec 1, 2014
    Posts:
    189
    Can't see it in the video: Is there any use of tesselation in the automatic blended side texture of the paths? If I draw a path, it paints/blends automatically more textures - e.g. stones/rocks (if configured) - but it seems, that this only is a texture - not a 3d element (mesh), right? Sometimes this looks ugly... a flat rock... hm... ;)
     
  12. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,638
    Not in the video, but CTS also supports tessellation, and when I was playing with it and Path Painter I was able to get some quite cool effects - particularly with the more rugged rocks. It was rather fun laying them down at the bottom of a river and seeing the water bounce off them.
     
    Mark_01 likes this.
  13. Vampyr_Engel

    Vampyr_Engel

    Joined:
    Dec 17, 2014
    Posts:
    449
    Can this be used for Spherical Terrain? Or can you use this on a sphere or is it only for terrain objects only
     
  14. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,638
    Standard unity terrain objects only.
     
    Shawn67 likes this.
  15. Gorgoth

    Gorgoth

    Joined:
    Jul 20, 2015
    Posts:
    8
    Hi, i wonder if you have any API that supports runtime generation of pathes? We are thinking about some game like "the settlers" where the player must / can make pathes where the settlers transports goods etc. Something that is supported or planed?
     
    Enoch likes this.
  16. Vampyr_Engel

    Vampyr_Engel

    Joined:
    Dec 17, 2014
    Posts:
    449
    OK Thanks
     
  17. Lecht

    Lecht

    Joined:
    Jul 1, 2014
    Posts:
    24
    Would be really nice to have an option to save the path drawn to a mask texture to be referenced by other terrain tools.
     
  18. Shawn67

    Shawn67

    Joined:
    Jan 2, 2014
    Posts:
    2,196
    I think this is something @frankslater has on his board for possible future updates. I'll double check and if not, I'll add it there as a suggestion. I'm pretty sure this is something which has been suggested.
     
  19. Andreas12345

    Andreas12345

    Joined:
    Oct 17, 2013
    Posts:
    381
    I ve tried to paint a road with a center line. But looks like this is not possible. Did anybody get this managed?
    I ve contact support, and they said it is possible.

    I ve tried with a single texture with sizes 15x15 and 1x1. A working example, or Video would be cool.
    I always get tiled structure on the terrain.

    For painting mountain paths its a really great tool.
     
  20. Shawn67

    Shawn67

    Joined:
    Jan 2, 2014
    Posts:
    2,196
    Hi @Andreas12345. I just spoke with the main developer that works on Path Painter and found out I was in fact mistaken. Where PP just creates and textures it's paths directly on the terrain, that is why you are getting the tiled effect.

    It may be something that could be achieved if we were to create a plane based on the path created, but this isn't something PP can do yet but it has been requested. We can also add this to the list of feature requests for him to look at when he works on updates.
     
  21. Andreas12345

    Andreas12345

    Joined:
    Oct 17, 2013
    Posts:
    381
    Thanks for the Info Shawn
     
  22. PrimusThe3rd

    PrimusThe3rd

    Joined:
    Jul 3, 2017
    Posts:
    19
    Hi all...
    I'm using Path painter in a combination with a free terrain asset:(https://assetstore.unity.com/packages/3d/environments/roadways/windridge-city-132222)... But unfortuantely there is no surface texture option avaialble (see attached screenshot)... Any idea what's going on.
    By the way.. roads are covered with strange (glowing) white mask across the whole map...does any have some clue how to remove it...

    Thx!
    Primus
     

    Attached Files:

  23. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,638
    Hard to say - looks like your terrain has no textures in it.

    Try looking at the terrain textures. If there are none, then there is not much path painter can do.
     
  24. PrimusThe3rd

    PrimusThe3rd

    Joined:
    Jul 3, 2017
    Posts:
    19
    Thanks for your reply... but "my terrain" is in fact yours ("Thanks to NatureManufacture and Indago for their efforts in bringing Windridge City to life. They used their own resources and leveraged tools from the Unity Asset Store including EasyRoads3D by Unity Terrain Tools and Gaia by Procedural Worlds. ")
    I have added textures directly to the terrain... and after that Path painter can in fact see this added textures. But when I draw the path along terrain no selected texture is applied to the terrain. I'll try with the new Unity3D 2018.3 version.
     
  25. PWPeter

    PWPeter

    Joined:
    Dec 16, 2018
    Posts:
    435
    I took a look at the Windridge city scene. It uses a trial version of the CTS shader to render the terrain, which removes textures from the terrain data for optimization reasons. This is why path painter can't find them initially, but if you add textures the CTS shader will not display those automatically because it set up in such way that it ignores the regular splatmap on the terrain.

    You could do the following to use path painter in this scene:

    Switch back to the built-in unity terrain shader. This would turn the terrain white at first, and you would need to retexture it, but then path painter should work as intended. To do so, select the terrain, go to the terrain settings and switch the Material to "Built-In Standard"
    You can restore parts of the splatmap data if you assign the "Terrain Original" terrain data object back to the terrain, but it looks like it contains 8 times the same rock texture in the texture slots. (See screenshot) If you exchange those with different textures, those should appear in the correct spots on the terrain and you should then be able to continue working with splat painter.

    Note that this is only because this asset was built & finalized in a very specific way that is not very friendly for editing afterwards, you will not experience the same issues if you work on your own terrain in a regular unity project.
     

    Attached Files:

    PrimusThe3rd likes this.
  26. PrimusThe3rd

    PrimusThe3rd

    Joined:
    Jul 3, 2017
    Posts:
    19
    Ok, many thanks Peter... I will leave terrain as it is and I will rather not use Path painter ... just good to know what's going on. :)

    On thing though... how to get rid of a strange "texture glow" on the roads? (render light settings adjustments?)

    This one bothers me more than (not) using Path paineter...

    I have purchased CTS, Easy Roads, Gaia .. if these assets have to be imported into project as well...

    Best regards.
     

    Attached Files:

  27. PWPeter

    PWPeter

    Joined:
    Dec 16, 2018
    Posts:
    435
    That is a strange setting on the EasyRoads HD addon shaders....click on any road that shows this issue. In the Renderer, look for the Material, and double click on it. The material should have many shader settings, look for "Main Road Detail Albedo Power" and adjust it down to around 1. You need to repeat this for all roads, crossings etc. that show this issue, or you can go through all the easy roads materials in the asset hierarchy.

    Not necessarily, but if you have those you could reconsider texturing the terrain on your own with gaia, make a CTS profile for better rendering, and then you could use path painter.
     
    PrimusThe3rd and Mark_01 like this.
  28. PrimusThe3rd

    PrimusThe3rd

    Joined:
    Jul 3, 2017
    Posts:
    19
    OMG, You are genius. Thanks a ton! I have so many plans with this beautiful map... so back to work I guess.

    Best regards.
     
    PWPeter likes this.
  29. Hermetes

    Hermetes

    Joined:
    Jan 6, 2016
    Posts:
    6
    Hello! When works your asset on runtime?
     
  30. PWPeter

    PWPeter

    Joined:
    Dec 16, 2018
    Posts:
    435
    You can use path painter in runtime already if you switch to scene view and paint while the game is running, but that is probably not a good way to integrate Path Painter with the gameplay during runtime.

    There are various ideas what could be done with Path Painter in runtime such as procedurally generating a path between two points, but none of those ideas are fixated enough to tell if and when they will appear.
     
    Hermetes likes this.
  31. DiscoFever

    DiscoFever

    Joined:
    Nov 16, 2014
    Posts:
    266
    Is there a way to paint using scripting @RunTime ? ;)
     
  32. PWPeter

    PWPeter

    Joined:
    Dec 16, 2018
    Posts:
    435
    There currently is no API for scripting yet, but we are exploring the possibility of adding this in a future update.
     
  33. dan_wipf

    dan_wipf

    Joined:
    Jan 30, 2017
    Posts:
    208
    just wondering, like all your other assets are”open” for coding, why isn’t path painter? because i miss the option of setting keys for opening/closing editor windows.. like in gaia: cmd+g (mac).. i do understand if you want to protect the source code, but hm, then why is it only in path painter?
     
  34. PWPeter

    PWPeter

    Joined:
    Dec 16, 2018
    Posts:
    435
    Path Painter is our first compiled asset. We are testing the waters to see how it goes.There are a lot of issues with non-compiled assets and like with any business you have to evaluate to see what works best.
    One thing that people have problems with assets being compiled is being unsure that the publisher will stick around. When you are buying from Procedural Worlds, you can buy with confidence that we are not a small hobby developer who will abandon the asset over the weekend. We are targeting to keep our products alive and growing for the next years to come.
     
    dan_wipf likes this.
  35. dan_wipf

    dan_wipf

    Joined:
    Jan 30, 2017
    Posts:
    208
    that’s what i thought though :) and i really love all your work! as far i can tell from gaia and cts. just that was just my first thought about the compiled file, are you intending to release the source code, or is it just if i’d buy it(like adam goodrich mentiond)? btw, just to be courious, what will it cost?
     
  36. PWPeter

    PWPeter

    Joined:
    Dec 16, 2018
    Posts:
    435
    We are currently not planning to release the source code. The cost of buying the sources would be something we would need to discuss on a case-by-case basis, depending on what you are planning to do with it (just extending for your own project? or planning to build a similar product, etc.) how many people would have access, etc.

    If you are interested in buying the source code please send us a support request at
    https://proceduralworlds.freshdesk.com/support/home
    and we will take it from there.
     
    dan_wipf likes this.
  37. dan_wipf

    dan_wipf

    Joined:
    Jan 30, 2017
    Posts:
    208
    Ok Thanks for your time and answer =)
     
  38. PWPeter

    PWPeter

    Joined:
    Dec 16, 2018
    Posts:
    435
    Kafar, Mark_01 and dan_wipf like this.
  39. neosca

    neosca

    Joined:
    Jul 1, 2014
    Posts:
    8
    Can someone show an example of creating an asphalt road using Path Painter..So far the video(s) I have seen are using tileable textures. However, in case of asphalt road how would one keep the middle stripes aligned to the road curve. I want to create something like this.

     
  40. PWPeter

    PWPeter

    Joined:
    Dec 16, 2018
    Posts:
    435
    Sorry for the delayed reply! Making a road like this is currently not possible with path painter because it operates directly on the terrain splatmaps. It is not possible (at least not on a default unity terrain) to rotate terrain textures so that they will change orientation along a path. For such tasks you will usually need a tool like Easy Roads or R.A.M. which will create a separate road mesh for you that follows a spline curve.
     
    Mark_01 likes this.
  41. CF-Games

    CF-Games

    Joined:
    Jun 2, 2013
    Posts:
    88
    Hello,

    I'm having a few issues with Path Painter and was wondering if it's possible to do the following:

    1.) Is it possible to edit previous paths once it has been painted? I know you can edit the most recent painted path by changing the settings, but I'm talking about paths painted before that. Like lets say I painted a path from town 1 to town 2. Then I start painting additional paths in those towns from the main path to the buildings. Now I decide I want to increase the embankment of the main path and make it curved instead of straight. How can I do this as changing the settings only affects the newest path.

    2.) Is there a way to erase parts of paths without needing to repaint the whole path?

    3.) Is there a simple way to delete already placed paths? If not, how can I remove them?

    4.) From what I can see, connected paths need to be done in a single edit mode session, and it's not likely that I can draw the entire path perfectly in one go. Like if I painted a path with multiple curves, not all the curves may end up at the angles I want. How would I go about editing just the parts I need?
     
  42. PWPeter

    PWPeter

    Joined:
    Dec 16, 2018
    Posts:
    435
    Currently not, path painter directly operates on the terrain splatmap and heightmap. The single paths are not kept as editable objects of any sorts. It supports Unity undo operations so you can work your way back to earlier paths in the undo history, but it is not possible to single out an earlier path and delete just this path alone.

    You can retouch the path with the built-in unity terrain tools by applying the textures that were originally below the path and using the smooth brush to remove the height changes (if any).

    Currently not, see 1.

    I would recommend to block out the path loosely with some unity cubes that you place on the terrain before. The cubes serve as visual markers that you can draw over while drawing, and also as designated start and stopping points for drawing to work on the path in segments.

    I hope you aren't disappointed with those replies, since all questions were more or the less tied to the fact that path painter currently does not treat paths as their own, editable object that are accessible later each by their own, but rather operates on one "terrain painting canvas" consisting of splatmap and heightmap. It might be possible that path painter supports such granularity in edits in the future, but this would involve quite a bit of work since the path edits can be interdependent on each other. This makes it hard to just remove one single path and correctly restore the underlying terrain, since it might also influence other paths that have been drawn before or after that.
     
    Mark_01 likes this.
  43. CF-Games

    CF-Games

    Joined:
    Jun 2, 2013
    Posts:
    88

    Thanks for the quick reply. Not really disappointed, just mostly trying to understand how it works since there aren't maybe tutorials on it, but now I see that more tutorials aren't really needed since it's easy enough.

    I do have another question though. There are often times where I accidentally draw a path by clicking. Like I want to draw a path through a town and then create branches off that path to the houses, but it seems I can't do that in a single edit mode session because when I click to where I want a branch to start, it draws a path from the end of where I drew the main path to where I clicked to start the branch. So would I just have to draw the branches as separate paths and then touch up the transitions where the embankment overlaps the main path?
     
  44. docsavage

    docsavage

    Joined:
    Jun 20, 2014
    Posts:
    996
    .


    I don't normally point to other devs tools on these threads but as I don't think it conflicts with any Procedural worlds products I'd recommend you look at this tool - https://www.assetstore.unity3d.com/en/?stay#!/content/111524

    It will definitely cover points 1 and 3 and with the stamper and some tweaking even some of the other points. If you not happy with any paths you paint you can just revert to another layer.

    Really useful for anyone doing terrain work. Not sure where unity going with their new terrain system but Mad Maps is really useful. I've not tested extensively with 2018.3 but hit a couple of bugs but the devs are good at fixing problems and said they'd sort them. It was rock solid on 2018.2 last time I tried it.

    At the least it can be a real project saving tool at best with the stamper and layering system it will integrate really well with path painter etc and allow some real productivity.
     
  45. PWPeter

    PWPeter

    Joined:
    Dec 16, 2018
    Posts:
    435
    Yes, that would be the way to go here.
     
  46. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,311
    I bought Path Painter a day ago.
    Every time I enter run time in the editor i get hit with this error.
    I haven't used the asset yet though so im not sure if it effects using the asset.
    I will in about a week though.

    Code (csharp):
    1.  
    2. NullReferenceException: Object reference not set to an instance of an object
    3. UnityEditor.GameObjectInspector.ClearPreviewCache () (at C:/buildslave/unity/build/Editor/Mono/Inspector/GameObjectInspector.cs:201)
    4. UnityEditor.GameObjectInspector.OnDisable () (at C:/buildslave/unity/build/Editor/Mono/Inspector/GameObjectInspector.cs:189)
    5. UnityEditor.AssetDatabase:Refresh()
    6. PathPainter.CompMgr:.cctor() (at Assets/Path Painter/Editor/CompMgr.cs:38)
    7. UnityEditor.EditorAssemblies:ProcessInitializeOnLoadAttributes()
    8.  
    9.  
     
  47. PWPeter

    PWPeter

    Joined:
    Dec 16, 2018
    Posts:
    435
    Two other users reported this issue to us as well. For one user the issue went away by itself before we could investigate further, for the other one we still await feedback.

    Can you please try the following:

    Check the Assets\Path Painter\Editor folder. In it you should see 3 "Path Painter" files. One of those should have a small triangle in front of it, indicating that you can unfold this file further. Can you please check if the file with the triangle matches your unity version number, e.g. if you run Unity 2018, the 2018 file should be the one with the triangle.

    Screenshot for reference:
    ppdll.JPG

    If the file check turns out to be ok, you can do the following to get rid off the error:

    1. Open the File
    Assets/Path Painter/Editor/CompMgr.cs
    2. Locate line 38 in the file, it should read:
    AssetDatabase.Refresh();
    3. Comment the line out by adding two leading slashes at the beginning, the line should read now:
    // AssetDatabase.Refresh();
    4. Save the file. After unity recompiles the code (press Ctrl + R to force), the error should be gone.

    We are going to change this process in the next version of Path Painter, so you would only need to repeat those steps when you are completely removing and reinstalling path painter for some reason.
     
  48. frankslater

    frankslater

    Joined:
    May 9, 2016
    Posts:
    107
    Thanks for reporting that @Shadowing,

    Yeah, that's a really odd one we were scratching our head about a few days ago. Especially because it only happens to 0.2% of the users, and PP does not seem to be doing anything when it happens.

    One idea I have is that you may have another asset that (or perhaps PP itself) does something when you enter play mode that causes something in the AssetDB to disappear, get a new identity, or change scope, and the AssetDB is still looking for it. So essentially causes your env to become sensitive to AssetDatabase refreshes at those moments (so Peter's workaround should work and you probably won't miss the AssetDB.Refresh anyway).

    That PP script actually went through major changes and improvements already in the update that's been coming down the pike, but regardless it would be nice to figure out what causes this.

    What other assets do you have in that project?
     
  49. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,311
    Ya the arrow was on the 2018 version. the error went away after making the change you said.

    Unity 2018.3.4
    Scripting Runtime version .NET 4
    Scripting backend Mono
    Api compatibility Level Net 4.x


    Assets I use are

    • Best HTTP PRO
    • Complete Terrain Shader
    • Gaia
    • Easy Roads pro
    • Vegetation Studio Pro
    • Hyper Text (Depreciated)
    • Simple Patch Tool
    • Photon Chat
    • More Effective Coroutines Pro
    • Final IK
    • Odin
    • Third Person Controller by Opsive (depreciated)
    • Magic Markers
    • Behavior Designer
    • Exploder
    • TextMesh Pro
    • Simple Fence Builder
     
  50. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,311
    Can you guys please make it so that I can move PathPainter anywhere I want.
    I have a large project. I have to put assets in folders to keep things organized.

    Code (csharp):
    1.  
    2. The assembly search path `C:/Users/26horses/Documents/Unity Game Projects/Ancient Rings/Assets/Path Painter/Editor` does not exist
    3.  
     
    frankslater likes this.