Search Unity

[Released] Terrain Smith (alpha 0.1) - Terrain stamping system.

Discussion in 'Assets and Asset Store' started by neon_teebar, Oct 11, 2017.

  1. neon_teebar

    neon_teebar

    Joined:
    Jun 1, 2017
    Posts:
    46

    The built in painting system can be slow and tedious while random terrain generators can be hard to control and tweak. Terrain Smith is a terrain creation solution that aims to be as simple and fast to work with as I can get it. Place height maps like GameObjects, using the built in Transform system to position, scale, and rotate. Height maps, alpha layers (textures), detail layers (grass), and trees are all controlled by "stamps" with many tweakable settings.

    video plays at 2x-3x speed.


    Features
    • Place heightmaps similar to how you would place a GameObject with transform control over position, scale, and rotation.
    • Path system for creating roads, mountain paths, rivers, and more.
    • Detail and Tree stamps.
    Get it here.
     
    Last edited: Oct 11, 2017
    chingwa likes this.
  2. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    This looks like the start of a very promising system... I can't believe noone has commented here yet. being able to adjust terrain in realtime with splines is awesome :D
     
  3. neon_teebar

    neon_teebar

    Joined:
    Jun 1, 2017
    Posts:
    46
    Thank you!

    I'm currently rewriting it from the ground up (as I have a better understanding on Unity terrain system now.) so if any one has any feature requests go ahead and post them.

    Upcoming features:
    1) Custom data storage system for making infinite terrain easier to work on, and to more easily save changes made in play mode.

    2) Faster overall. Stuff will stay on the GPU until you are done modifying it. Passing data from GPU -> CPU was the majority of the slow down.

    3) Path system will be 100x - 1000x+ faster.

    4) Wave Function Collapse tools for generating & placing objects with rulesets.

    5) Better tools for blending terrain features (height, textures, grasses) with objects. So you can prevent grass from growing directly below objects but can increase the amount of grass grown directly around/beside objects.

    Development is slow so this wont be ready very soon.
     
  4. BigDill

    BigDill

    Joined:
    Jan 1, 2013
    Posts:
    31
    This is the sort of asset I have been looking for. I know it is in alpha but will the tool support mesh terrains or will it have an exprt to mesh option? Unity terrains are great but somtimes the best option is to go with a mesh terrain and having both options would make me buy this in a heart beat.

    Please keep up the good work
     
  5. BigDill

    BigDill

    Joined:
    Jan 1, 2013
    Posts:
    31
    Just noticed that your Texture Smith asset has a terrain stamping tool. Is this the same asset as Terrain Smith and are you planning to combine both assets? What is your road map?
     
  6. neon_teebar

    neon_teebar

    Joined:
    Jun 1, 2017
    Posts:
    46
    I could add an export option eventually. I was experimenting with creating slanted mountains that can basically overhang terrain, and created a custom terrain collider for it which could be refactored for a mesh export.

    No the Texture Smith terrain system will be removed later. This started as a Texture Smith feature, but it's evolved to be it's own asset.

    My current roadmap is to do a full rewrite because I understand Unitys terrain better, and Terrain Smith isn't optimized enough. The next version will be faster and hopefully include a runtime level editing + save system. But I'm slow to develop atm.
     
  7. Gray_Master

    Gray_Master

    Joined:
    Jun 20, 2010
    Posts:
    152
    if possible this must be whith support microsplat/megasplat (as i think)
     
    RoyS likes this.
  8. neon_teebar

    neon_teebar

    Joined:
    Jun 1, 2017
    Posts:
    46
    Yes this works fine with Megasplat and Microsplat as those are shaders and this is a terrain system. I think I was using Microsplat while creating the demo video.
     
  9. nirvanajie

    nirvanajie

    Joined:
    Jan 7, 2016
    Posts:
    42
    Very promising terrain system! I just purchase your asset to support you. Please keep up your good work.

    BTW, when will you plan to release your next version?
     
  10. neon_teebar

    neon_teebar

    Joined:
    Jun 1, 2017
    Posts:
    46
    Thank you for the support. I'm working on a number of things at once so I'm not sure when the next version will be ready. Maybe I'll try to post more development progress in this thread.
     
  11. Gray_Master

    Gray_Master

    Joined:
    Jun 20, 2010
    Posts:
    152
    This is very perspective plugin as i think - i purshared it for my projects
     
  12. Twoonebe

    Twoonebe

    Joined:
    Mar 30, 2013
    Posts:
    174
    Something news about this asset ?
     
  13. neon_teebar

    neon_teebar

    Joined:
    Jun 1, 2017
    Posts:
    46
    Making slow and steady progress on the rewrite. If I could afford to I'd work on it everyday.

    Here's some of what I'm working on:

    1) New path system. Used for painting features (height, alphas...), road/path generation, and placing objects along splines. Imagine mass placing trees and prefabs with splines that can have rule-sets (larger trees in center, bushes at edges...).



    2) Culling system, so only modified areas of the world are updated. The aim is to make things fast enough for runtime development.

    In the old version if you had a height map of 2048x2048, it would draw every single stamp to a 2048x2048 texture, and then read + update the entire terrain. Now it will only update specific cells and draw the stamps in that cell.
     
    Last edited: Feb 2, 2018
    nirvanajie likes this.
  14. neon_teebar

    neon_teebar

    Joined:
    Jun 1, 2017
    Posts:
    46
    Ugly image alert. Just trying to show a quick update.

    I'm shifting away from using textures for everything (too much work for users), and instead users can just design with splines and shader based noise.

    Features coming soon:

    1) Mountain sculpting with splines.
    (Still need to add noise and blending with terrain.)


    2) New path system.
    Rapidly design mountains, rivers, and roads with splines. Everything live updates in editor. I'm trying to make it all as fast as possible, so it's chunk based and somewhat multithreaded.


    3) Mass object placement.
    For planting trees along highways, or farms. There are a number of tweakable options like noise offset.


    Behind the scenes:

    1) There is a system that allows you work "on top" of a previous terrain, which means you could generate your terrain with any other terrain system, and then place these "stamps" over it.

    2) Multi-terrain support nearly complete.

    3) I also have a way of saving + loading terrains as compressed files which are smaller than the built in Unity terrain .asset.
     
    Last edited: Feb 13, 2018
    chingwa likes this.
  15. neon_teebar

    neon_teebar

    Joined:
    Jun 1, 2017
    Posts:
    46
    Another thing is that stamping is material based instead of texture based. So you can do stuff with shader based noise, and or textures.

    Here I splined out an area that was then stylized with a voroni * turbulence noise shader. Since the noise is calculated with world space coords other stamps will be able to blend with it if they have the same setup + seed.
     
    chingwa likes this.
  16. neon_teebar

    neon_teebar

    Joined:
    Jun 1, 2017
    Posts:
    46
    I really hope I can upload a new version to the asset store before the end of the month.

    Here's a quick overview of some new things.

    1) Robust chunk system.
    - Can load and unload chunks quite quickly. (Depends on tile resolutions.)
    - Stamps automatically work across all chunks they cover.
    - Chunks are saved in a custom format that is almost 5x smaller than Unity terrain. (A 56.6 mb Unity terrain saves as a 12.3 mb file.)
    I accomplished the small file size by first converting all height + alpha + detail layers to textures, and encoding these as PNGs, and then compressing the combined byte array. This method might be slightly lossy. Unity detail map data is in the range of 0-14 for some reason. I convert that to 0.0f-1.0f and place them in the RGBA of a texture, then encode to PNG + compress. I did a quick test of the average difference between a saved maps detail and a loaded maps and got: 0.0006134547. There was no visible difference so it's a worthwhile trade off (imo) for ~5x smaller files.

    The green and red nibs are buttons for loading + unloading terrains.
    I also began on a GUI, which will have common tools + maybe a minimap for more easily moving around + orienting yourself. The minimap looks noisy because I use encoding on the height maps values to store them across all 4 texture channels.

    2) Mountain sculpting video.
    With a few splines to define height limits, and a noise generating material you can quickly sculpt mountains, craters, lakes or whatever else wherever you want.
    Note that this is runtime speed. I want you to see results as quickly as possible.

    3) Path placement video.
    Notice the blend function slider, which is how much to blend the path with the surrounding terrain.
    Not shown is that paths can use a noise filter and define how strong the noise is per control point.
    This tool is also great for creating rivers, or canyons.

    4) Point area system.
    This is a general purpose system for mass placing objects within a defined area.
    It could be for placing farms with neatly ordered rows trees/plants, or for clustered forests that can have smaller trees at the edges.
    It will have filters for responding to terrain (height, slope, normal, splats, details...), GameObjects, game layers... other point area systems?
     
    Last edited: Feb 22, 2018
    Flurgle and chingwa like this.
  17. neon_teebar

    neon_teebar

    Joined:
    Jun 1, 2017
    Posts:
    46
    Almost ready with an update, just need a few million more years.

    Features upcoming:
    1) Terrain Import

    Use terrain from any other system by simply exporting it as a World Smith "stack". The following images and videos show me building on top of a Gaia generated terrain.

    2) Height map path

    It's nearly possible to make an entire level with a single height map path.
    - Path jitter for quick rivers and canyons.
    - Edge jitter. Good for cliffs.
    - Edge blending distance. Left and right edges can blend over different distances, so one side can be cliff-like, while the other is more of a slope.
    - Noise and blending are per control point, and blend into each other. So you can limit it in some areas, or use different noise types in others.
    - Much better terracing method and options.
    - Pattern/noise textures can blend differently for slope and non slopes.


    3) Mesh to terrain feature
    Any mesh can be converted into height map, splat map, or detail map features. Pro Builder is now free and an official Unity Asset so it's good fun to quickly map areas out. World Smith will let you add noise to your blocky models, and update the editor as you make changes.


    4) Tree paths
    Finally place nice ordered (or disordered) rows of trees!
    - Path jitter.
    - Position jitter.
    - Number of trees planted "horizontally" and "vertically" along the spline on a per node basis.
    - Control which tree prefabs are planted on a per node basis. (With weighted random.)
    - Filter to prevent placement on splats, objects, or slopes.


    5) Holes
    2 methods available. You can paint them as a splat, or use a mesh + special material. There are pros and cons to both methods. (Also includes a basic script to handle collision ignoring.)


    6) Chunk System
    Screen shot shows:
    - Flipping terrains. (I used a single "stack" generated in Gaia, and flipped it along different axis for different chunks.)
    - Chunk menu for saving, loading, unloading and exporting to .asset.
    - Blue ghost chunks: Chunks on disk but not currently loaded.
    - Gray nib: Buttons for creating new chunks.

    (For some reason the Linux editor displays ui elements with the pro color scheme intermittently. I didn't hack it.)


    There are some more things I can't remember.
     
    Last edited: Mar 25, 2018
    Teosis likes this.
  18. Teosis

    Teosis

    Joined:
    Jan 24, 2018
    Posts:
    22
    Goddammit, this looks wonderful! I've been keeping an eye on this asset for some time and I can see it gradually shaping into a very robust solution for working with unity terrain.
    Quick question:
    Is it possible to brush-paint height across multiple terrains or otherwise somehow stitch those together?
     
  19. neon_teebar

    neon_teebar

    Joined:
    Jun 1, 2017
    Posts:
    46
    The stamp system will set the height, splat, detail of any terrains that are under them, and then automatically stitch the seams.

    The built in Unity brushes don't really work in my system as whenever you modify a stamp it clears any changes to the terrain in that area. The goal of my system was to never have to use the brushes because I find them tedious. I do have plans for a splat painting feature that should let you do multiple splats at once, and be more rule based (fade on slopes...) but I'm not sure how I will do that yet.
     
  20. neon_teebar

    neon_teebar

    Joined:
    Jun 1, 2017
    Posts:
    46
    Unity released their C# source code, so it was easy to copy their brush tool.



    It's not as fast as the built in tool, but it will allow you to:
    -"Paint" features that won't be erased when stamps are adjusted.
    -Scale and rotate based on stroke. (Optional.)
    -Filter based on height, normal, curvature, or slope.
    -Paint multiple layers at once. (Including details and trees.)
    -Use Photoshop and Gimp brush sets.
     
    nirvanajie, Teosis and chingwa like this.
  21. babasuter

    babasuter

    Joined:
    Feb 18, 2014
    Posts:
    10
    Would this be able mass place trees in a defined grid while not placing them on a particular color, texture, or height? I saw in your demo video the trees both staying within the path, and staying off the path, but they were not in grid formation.
    It would resemble and evenly planted farm crop, except there's a path winding through it where there shouldn't be any crop. Thanks, and it looks fantastic!
     
  22. neon_teebar

    neon_teebar

    Joined:
    Jun 1, 2017
    Posts:
    46
    This is a rough video of the area placement tool, but maybe this is what you want? It creates trees in a grid like pattern in a polygon area. You can then tweak noise options to give it more randomness, and filter options to prevent it from placing on certain splat layers, or heights, slopes, game objects...


    I could add some kind of path subtraction option, so you could define an area full of trees, then create a spline that cuts through them where you want.
     
    babasuter likes this.
  23. babasuter

    babasuter

    Joined:
    Feb 18, 2014
    Posts:
    10
    Yup, this seems to be exactly what I need. Purchased. Review pending implementation, but I'm hopeful! Thanks for your time.
     
  24. runningbird

    runningbird

    Joined:
    Sep 3, 2009
    Posts:
    382
    just purchased!
     
  25. RoyS

    RoyS

    Joined:
    Jan 12, 2009
    Posts:
    664
    Getting Started:

    1) Create a Terrain. (GameObject > 3D Object > Terrain)
    2) Add the TerrainStamper component.
    3) Create stamps by either:
    3a) GameObject > Terrain Smith > Brush
    3b) Create new GameObject and add a TS_Stamp

    3a - There is no Brush. How do you get this set up with the different shapes? I can't seem to get any thing but a plane vertical from the terrain. I've tried everything and can't get anything to work.
     
    Last edited: Jul 22, 2018
  26. neon_teebar

    neon_teebar

    Joined:
    Jun 1, 2017
    Posts:
    46
    There is a demo that shows the setup of various features. The brushes shown in this thread aren't available yet.

    The new terrain system I am working on is coming and almost done but I need to work on paying some bills irl. It will be much easier to create stamps and everything. But it's not ready for the Asset Store yet.
     
    RoyS likes this.
  27. StaggartCreations

    StaggartCreations

    Joined:
    Feb 18, 2015
    Posts:
    2,266
    Hey there! I came across this thread while looking for a terrain stamping toolkit. This asset probably has more features than I'm looking for as I'm currently using World Creator in my workflow.

    But I have little control over small terrain sections, essentially I want to flatten out small areas for buildings to sit on, such as here:



    Which brings me to ask a few questions about your asset:
    • Will I be able to use it as a post processor, to alter existing terrains at any given time?
    • Can a stamp span across multiple terrains?
    • Does a stamp have blending modes such as Additive, Subtractive, Min and Max?
    • Has this been tested with Unity 2018.2?
    Everything looks very promising so far! Hopefully this can help me with this minor nuisance :)
     
  28. Ziplock9000

    Ziplock9000

    Joined:
    Jan 26, 2016
    Posts:
    360
    Avoid this asset, it was seemingly abandoned in a buggy state. Read some of the comments about it in the asset store.
     
  29. unity_1isenok1111111

    unity_1isenok1111111

    Joined:
    May 6, 2020
    Posts:
    1
    good afternoon, could you please post more documentation on using the tool