Search Unity

Landscape Builder - Procedural Terrains, Advanced Prefab System, spline tool, and more

Discussion in 'Assets and Asset Store' started by sstrong, Feb 24, 2016.

  1. eaque

    eaque

    Joined:
    Aug 20, 2014
    Posts:
    763
    Another question, I own CTS shader, it has the possibility to detect surface for footsteps but in order to do that the author says we need to check an option that will make us loose the 1pass shader thing. So worse framerate...

    If i use LB to choose my 8 textures and texture the terrain with Vegetation Stud, can i use this API feature in LB to detect surface without touching my FPS rate??

    :)
     
  2. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    2,251
    Hmm, not sure. Have you tried the scripts\behaviours\LBCheckGroundTexture.cs in the LB folder? You can take a copy of this sample class and customise it (with a new class name) to suit your purposes. It has TakeAction() and PerformAction() methods which you can customise.

    It's been a while since we performance tested it but you're welcome to give it a go as a quick and simple test. The reason we suggest creating a new class in your own namespace is so that it doesn't get overwritten when applying new LB updates.

    Basically, nothing is for "free" in terms of FPS. But obviously finding the method with the least overhead and greatest features is the key. It's always a compromise.
     
    eaque likes this.
  3. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    2,251
    It might be possible. We'll take a look.
     
    eaque likes this.
  4. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    2,251
    Landscape Builder vNext

    We will soon be releasing LB 2.0.6. This will include the items listed here plus any last minute fixes for anything reported in the beta forum.

    Currently under consideration for the next release are the following items. Please tell us about anything you'd like to see included which would help you with a current project or game.
    1. Group Zones as polygons
    2. Walking tracks, paths, creeks, streams within manually or procedurally placed Groups
    3. More GPU acceleration updates
    4. Override Manual Group rotation per location in landscape
    5. Groups Object Path - new Layout Method of prefab extent
    6. Convex / concave rules
    7. Improved support for 2018.3 and 2019.1
    8. Improved Groups support for Vegetation Studio Pro
    9. Export partial terrain mesh for navmesh creation (using our Stencil painting tool)
    Please also tell us what's important to you so we can start settings priorities for beta releases.
     
    Last edited: Oct 14, 2018
    eaque, StevenPicard and camta005 like this.
  5. camta005

    camta005

    Joined:
    Dec 16, 2016
    Posts:
    320
    Would these be procedurally generated spline based paths?
     
  6. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    2,251
    You might have already seen the video tutorial on Object Path Basics, which is the foundation for these spline-based paths. We already have a feature called MapPaths which can be used to build tracks, river beds, rivers, meshes etc but it doesn't work in Groups. The reason being that manually or procedurally placed Groups can be rotated in 2D space on a 3D landscape.

    The next step is for us to carry over what we like about MapPaths and add that to the new Object Paths within Groups (we also have some new features for Object Paths that we're not ready to announce yet).

    So in summary, in the Group Designer, you'll be able to create 1 or more Object Paths within a Group (which you can already do), and then give it variable width and optionally add a mesh surface. Currently Object Path splines have no width.
     
    camta005 likes this.
  7. eaque

    eaque

    Joined:
    Aug 20, 2014
    Posts:
    763
    Not yet, but i will definitely!! Many thanks ;)
     
  8. eaque

    eaque

    Joined:
    Aug 20, 2014
    Posts:
    763
    :) Thank you so much! I feel quite proud i didn't have a stupid idea (for once:p) I'm sure it's an Amazing feature for any navigation on big terrain scene! SHould be useful to a lot of people!
     
  9. Willbkool_FPCS

    Willbkool_FPCS

    Joined:
    Jun 13, 2018
    Posts:
    169
    I'm having problems with using Celestials. Whenever I use it I get this.

    I'm using the First Person Camera only, but for some reason it's showing double on my arms. I've read through the manual and watched the video on Lighting several times, but so far no luck. Maybe it's a problem with UFPS although it only does this when I use Celestials.

    Also is there a way to flatten/smooth just the terrain under a Map Path? I'm having bits of terrain pop through.
     
  10. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Without seeing your setup, my guess is that you have 2 cameras rendering your scene and that both have the first person arms in their culling mask. Just a guess though.
     
    eaque likes this.
  11. Willbkool_FPCS

    Willbkool_FPCS

    Joined:
    Jun 13, 2018
    Posts:
    169
    It can't be that, I only have one camera in the scene.:D
     
  12. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Doesn't seem like there would be any other reason why something would be rendered twice though. Can you check your celestials settings and see what camera it's referencing?
     
    eaque likes this.
  13. Willbkool_FPCS

    Willbkool_FPCS

    Joined:
    Jun 13, 2018
    Posts:
    169
    It's my First Person Camera, but there IS a second camera called Weapon Camera in the FP camera hierarchy. But it's not used anywhere except when you use Iron sights I believe.
     
  14. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Check it's culling layers and make sure LBCelestials is not selected. The weapon camera is used all the time.

    [EDIT]
    I would check what layers your weapons are on and make sure they are correct. Maybe they are on the wrong layer and getting rendered incorrectly on 2 cameras. But I wouldn't think LBCelestials should be rendered on the weapons camera either so that should probably still be checked.
     
    Last edited: Oct 16, 2018
    eaque, Willbkool_FPCS and sstrong like this.
  15. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    2,251
    What are your MapPath settings? Also, do you have a Topography MapPath Layer with the Type Mode set to "Flatten"?
     
  16. Willbkool_FPCS

    Willbkool_FPCS

    Joined:
    Jun 13, 2018
    Posts:
    169
    I pretty much left the default settings for the MapPath. I tried making a Topo Layer and using the MapPath but when I set flatten, it flattened my ENTIRE terrain below the water line. I probably need to try a few more times, and I'll watch the Topo videos again and see if there are any hints.
     
  17. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    2,251
    Hmm, that's odd. If you post a screenshot of the Topography Layer settings we can probably work it out.
     
  18. Willbkool_FPCS

    Willbkool_FPCS

    Joined:
    Jun 13, 2018
    Posts:
    169
    Just deleted it because I reimported my HM, will work on it tomorrow.
     
  19. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    2,251
    Ok. For future, if you want to reimport a heightmap, you can just delete that Topography Layer and re-import. Most other things should still work as before.
     
  20. Acissathar

    Acissathar

    Joined:
    Jun 24, 2011
    Posts:
    677
    Hi,

    I was wondering if there was a specific value I could tweak to stop this hard core plateau-ing, or at at the very least get some detail/variety in it.


    My topography consists of 2 layers, a rugged hills base preset and a gentle valleys base preset. Other than this, everything looks almost exactly as I want it. I tried lower the height scale but then I started getting a lot of ponds/lakes everywhere, while still having the same plateau areas.

    Here is my Distance to Centre mask curve as well:



    It's not the end of the world, and I can certainly manually tweak it, but I figured I'd check.
     
  21. Dave_2000

    Dave_2000

    Joined:
    Oct 17, 2015
    Posts:
    52
    If you simply want to allow the terrain to continue on as it is below upwards (removing the plateau altogether) but without changing the heights of everything, you could try the following:
    - First, scale UP the height of your terrain in the terrain settings (can be found in the landscape tab, under terrain settings --> terrain height). To start with, just double it i.e. if it was 2000 change it to 4000.
    - Then scale DOWN each of your topography layers the inverse amount i.e. if you doubled your terrain height, you want to halve your topography layers. You can do this by changing the height scale. So if you doubled your terrain height from 2000 to 4000 and your height scale for your first layer was 1.23 you would change it to half that: 0.615.
     
    Acissathar likes this.
  22. Acissathar

    Acissathar

    Joined:
    Jun 24, 2011
    Posts:
    677
    I'll give that a shot, i appreciate it!
     
  23. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    @sstrong I'm sure this must exist, but I can't find it in the documentation or in any of the Landscape setting sin the inspector. How do I tell LB not to place trees or grass on specific textures? I want to populate my landscape with trees and foliage, but don't want them on certain textures like paths and cliffs. Also, can I specify certain height restrictions so that they only spawn above sea level and not on steep angles?

    [EDIT]
    I found the settings for filtering textures for grass and height/inclination. Not sure about trees yet though. I'm still looking.

    [EDIT 2]
    Nevermind. I found them.
     
    Last edited: Oct 21, 2018
  24. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    2,251
    For anyone else looking.
    Tree Placement Mode: Height and Inclination.
    Add Filter, Texture AND or NOT
     
  25. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    The reason I couldn't find it was that I had imported my foliage from an existing terrain and all the foliage had placement mode as Imported so none of those options appeared. When I changed them from Imported to height and Inclination then I saw the options appear.
     
  26. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    2,251
    That makes sense. The Imported mode is a special setting which keeps a copy of all the placement data. It doesn't use rules to place the items in the terrains. It is useful when you want to retain the exact position / settings of existing items in a terrain. For example, when you have manually placed things in a terrain or when you want to keep everything created outside Landscape Builder. You can then get LB to add additional items using the LB rules.
     
    magique likes this.
  27. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    @sstrong I tried using the Path creator tool in LB the other day, but I couldn't figure out how to make it work completely. I was able to lay down the path points and it creating a mesh path, but the path did not conform to the terrain or carve the terrain or anything like that. Is there some way for it to work like that?
     
  28. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    2,251
    Here are some examples for rivers.
    Here, here, and here.

    For a walking path or roadway, you can set the Type Mode to Flatten.

    upload_2018-10-24_8-18-15.png

    If you have any feature requests for paths, we're adding enhanced functionality to Object Paths which are created in the Groups tab. Object Paths will be able to directly affect the topography (as well as place objects/prefabs along them). They will also support GPU acceleration for Topography changes.
     
    Last edited: Oct 24, 2018
    Willbkool_FPCS likes this.
  29. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Thanks for the help. I'll give this a try tonight and see how it works.
     
  30. Acissathar

    Acissathar

    Joined:
    Jun 24, 2011
    Posts:
    677
    Is there a way to redefine the texture presets or a pseduo work around? I like the islands preset, but I have different textures I want to use but otherwise keep the values for the preset. I plan on having multiple landscapes, so being able to just redo the preset once and then apply it to each new landscape would be sweet.
     
  31. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    2,251
    You could save a Template of the existing Landscape, then selectively import just the Textures (tab) settings. Note: that this will also update some Terrain Settings too. If this is a problem, we could probably add an option in Templates to override this behaviour.

    upload_2018-10-24_11-35-5.png
     
  32. Acissathar

    Acissathar

    Joined:
    Jun 24, 2011
    Posts:
    677
    No worries! Currently only using a handful of textures anyways so it was more of a is it possible than anything that I'm after.
     
  33. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    @sstrong What is the recommended procedure for updating to the 2.06 version? Can I just download from the store and overwrite the current version or should I remove the previous version first?
     
  34. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    2,251
    Yes, you can just download from the store. Our updates are cumulative, which means you should always be able to upgrade (even from beta versions to the current release version). If there are any changes to make, LBSetup should automatically take care of those - no user-action required).
     
    Willbkool_FPCS and magique like this.
  35. Acissathar

    Acissathar

    Joined:
    Jun 24, 2011
    Posts:
    677
    Using the newest version, I'm getting these seams with two stitched Landscapes:



    Both landscapes are using the same texture set and values, and I did set them as neighbors + stitched in the Advance tab. It only seems to be certain spots as the stitching and texturing is almost identical except right at the seam.
     
  36. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    2,251
    A few questions:
    1. Are you using the experimental GPU acceleration?
    2. Is there a particular reason why you're joining 2 landscapes together and not making a single landscape with multiple terrains? (it would be nice to understand your scenario for using stitching)
    3. Can you give us the terrain settings for both landscapes so we can re-pro the issue in-house?
    4. Are you using 2.0.6 from the store or one of the 2.0.6 Beta's?
     
  37. Acissathar

    Acissathar

    Joined:
    Jun 24, 2011
    Posts:
    677
    1. Currently, I am not.
    2. Mostly for experimentation. The idea is to create all the landscapes here, then break them out into their own scenes for async loading/streaming instead of serializing it all in one scene. Also, it seems like I can more fine tune specific areas without having to mask off or risk changes to the greater landscape.

    If this is an incorrect use case I can switch to just a big ol' landscape too.

    3. 4k by 4k made up of 2k terrains for both landscapes. Terrain settings are just Quality 1 preset.
    4. From the store, upgraded from 2.0.5 also from store.

    It looks like the seam issue is only with one of the landscapes as the other is texturing to the edge as expected. The one that is not seems to have a section on the edge that is going off some other criteria.
     
  38. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    2,251
    Your workflow isn't necessarily wrong (we try to cater for many different game dev workflows), however, there are a few things to consider.

    Topography perlin noise layers are seeded based on world space coordinates (with a fixed offset). This means that if you say created the same landscape in a different scene with a different Landscape Start Position, the shape of those topography layers would be different.

    However, what this means, is that if you place two landscapes side by side in the same scene, with the same topography settings, they (should) seamlessly join with no height differences along the seam (no need to stitch them together). This is by design.

    When using Groups for prefab placement (which, BTW, we recommend), areas flattened under prefabs (if required) may change when moving those landscapes to another scene with a different Landscape Start Position. Similar things could happen with MapPaths or Camera Paths (if you are using those).

    It would be really useful if you could send us a copy of a Template for each of the affected Landscapes. They should be really small meta-data files so you could private message or email me. Or you can send me the files on Discord.

    Also, did this problem just start after upgrading from 2.0.5 to 2.0.6, or was it there in 2.0.5 too?
     
  39. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    2,251
    We have started prototyping this feature. You will be able to paint an area of the landscape using a Stencil Layer. We will let you know when it gets into the next Beta.
     
    eaque likes this.
  40. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    2,251
    FEATURE ANNOUNCEMENT

    Coming in LB 2.0.7, is the ability to create and bake a NavMesh from a MapPath and/or painted Stencil Layer in your landscape.

    upload_2018-10-27_9-9-6.png

    You can already create a mesh from a MapPath. In LB 2.0.7 you will be able to begin a background NavMesh build, or cancel one that is already running.

    What's more interesting, is the ability to create transparent meshes from your Unity terrains that can act as part of the pathfinding Unity Navigation (NavMesh) system. In LB, you'll do that by painting a Stencil Layer. Yes, that's right, you can now essentially paint your navmesh.

    upload_2018-10-27_9-14-46.png

    Shortly we'll be releasing a tutorial video that demonstrates this new feature. Included is a demo NPC low poly animated sheep to get you started.

    This feature is currently in beta for existing LB customers.
     
    eaque likes this.
  41. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    2,251
    Upgrading LWRP and HDRP projects

    When applying Landscape Builder updates to LWRP or HDRP projects, don't forget to re-apply either the LB_LWRP or LB_HDRP packages located in the LandscapeBuilder SRP folder. You do this by double-clicking on the appropriate package from within the Unity Editor.

    If you don't do this, the first indication will (probably) be a pink terrain. ;)

    We'd also recommend taking a backup of your project first, and opening a new scene when applying the LB update.
     
    Last edited: Oct 27, 2018
    Willbkool_FPCS likes this.
  42. digitalzombie

    digitalzombie

    Joined:
    Dec 10, 2007
    Posts:
    86
    I like the idea of Acissathar's workflow and was hoping to do similar.

    I'm talking without a strong understanding of the code, but it seems like these usages of the scene coordinates / positions could be modified to allow for the use of, as an example, the landscape to be located in my larger world space coordinates while being located in a different location in the scene. Basically if game world coordinates are in use, use them, else use scene world coordinates. What do you think?
     
  43. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    2,251
    How are you thinking of moving the landscapes to another scene in a different location in worldspace? Do you already have a workflow to do this or are you using something like the built-in LBTemplate system?
     
  44. digitalzombie

    digitalzombie

    Joined:
    Dec 10, 2007
    Posts:
    86
    It's all theory at this point but my idea is to use a single scene and maintain a loaded 3x3 grid of landscapes from a larger world grid, unloading and loading as the player object moves around. Let me put something together so I can discuss it in more concrete terms ... give me a week.
     
    sstrong likes this.
  45. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    2,251
    Landscape Builder 2 NavMesh Basics Tutorial

    Coming in LB 2.0.7 is the ability to bake a Unity NavMesh from a path or terrains in your Landscape. Like other features in LB, the meshes can cross terrain boundaries.

     
    StevenPicard, eaque and Acissathar like this.
  46. eaque

    eaque

    Joined:
    Aug 20, 2014
    Posts:
    763
    Makes me wanna dive into it this week end! Animating a city, a village or a camp is gonna be so easy !!
    Thanks you so much !!:)
     
    sstrong likes this.
  47. eaque

    eaque

    Joined:
    Aug 20, 2014
    Posts:
    763
    HI,
    can i create some biomes in LB using stencil and VS integration for instancing? I suppose yes...But never tried stencil till now :oops:

    Painting a zone where i can select wich textures and objects are spawned seems pretty obvious from what i know of LB..But not sure...
    BTW Group spawner is Fantastic!!
    Thx
     
    sstrong likes this.
  48. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    2,251
    Are you using VS or VS Pro? Where possible we convert Group Zones to Polygons. Currently this only works in VS Pro with square LB Group Zones although the VS author is considering adding circular vegetation masks too.

    On the LB roadmap is support for Group (polygon) Zones which could be directly converted (automatically) to vegetation masks in VS Pro. However, we haven't implemented polygon Group Zones yet.

    Stencil Layers would be more difficult as neither VS or VS Pro have a corresponding mask type.
     
    eaque likes this.
  49. eaque

    eaque

    Joined:
    Aug 20, 2014
    Posts:
    763
    i use vs not pro. Wanted to know before updating...Many thanks :)
     
  50. Acissathar

    Acissathar

    Joined:
    Jun 24, 2011
    Posts:
    677
    One issue I've run into that I think is related to the GPU Acceleration is that I run into a Fatal GC Error when running the populate command after a few times.

    The error is just a small window that says Fatal GC Error: Too many heap sections, and then Unity closes without any specific information.

    The reason why I say I think it's related to the GPU Acceleration, is because I have always hit after running Populate Grass around the 5th or so time. This isn't 5 times right after each other, but a few times here, a few times there without closing Unity over a few hours. Without GPU Acceleration on for the Grass, I haven't hit it, which is what makes me think they might be related.

    Some other maybe useful info:

    32k Landscape, 64 4k terrains. VS Pro off (at the time). Quality 1 Terrain Settings Preset, 3 grasses and no trees.


    Edit: Just hit without GPU Accel on, so I take it back. On the plus side, I can go back to the fast GPU Accel.
     
    Last edited: Nov 4, 2018