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

Landscaper - A tool for procedural foliage placement

Discussion in 'Assets and Asset Store' started by Aegon-Games, May 1, 2015.

  1. Aegon-Games

    Aegon-Games

    Joined:
    Mar 7, 2014
    Posts:
    621
    Logo_Colour.png
    Current Version (Asset Store): 1.4.2
    Current Version (Beta): ---

    What is it?

    Landscaper is a tool to procedurally place foliage onto a Unity terrain or any other surface. Designed to place convincing foliage over a large area quickly, Landscaper simulates foliage growth by planting an initial set of foliage instances, which then spawn children of their own, allowing forested areas to expand in a more natural fashion.

    Landscaper allows you to create multiple species of foliage, from trees to bushes, and have full control over how each individual species grows and spreads. It can even be used to place non-foliage objects such as rocks.



    Screenshots
    Overview.png Generations.png





    Features
    • Procedurally place foliage over a large area
    • Forested areas appear natural as the simulation expands from an initial set of foliage instances
    • Foliage is kept the correct distance apart based on collision & shade distance
    • Each species can optionally be allowed to grow in the shade of other foliage to differentiate between trees and undergrowth/rocks
    • Multiple configurable species with many settings including:
      • Initial seed density
      • Max seed travel distance
      • Min/max children
      • Collision & shade range
      • Random scale variation
      • Slope angle (min & max)
      • Altitude (min & max)
      • Terrain texture mask
      • Optional per-generation override settings for scale & prefab used

    Links
    Asset Store
    Email Support (please include your invoice number unless you're asking pre-purchase questions)
    Video Quick-Start Guide
    Readme
    FAQ

    Changelog
    1.3.4
    - Masks can now be specified using a splatmap index instead of referencing a texture directly
    - GameObject trees are now placed as prefab instances in the editor

    1.3.3
    - Fixed an issue preventing projects from being built

    1.3.2

    - The current scene will now correctly be marked as dirty after generating foliage
    - There is now a "Simulate All" button which will simulate every Foliage Area to allow for multiple areas to affect the same terrain without being cleared

    1.3.1
    - [BREAKING CHANGE] The "Layer" property of the FoliageArea was previously being incorrectly saved as a LayerMask. Your layer value may have changed after the update
    - Creating a new FoliageArea from the menu bar and changing properties on a FoliageArea should now correctly mark the scene as dirty, prompting you to save the scene when it is closed
    - All properties of the FoliageArea component now correctly support undo/redo and all have tooltips

    1.3.0
    - FoliageArea now has an option to exclude specific layers. Excluded layers will block raycasts, preventing foliage from growing on or under objects in any of these layers
    - Fixed an issue causing shade distance to sometimes not be taken into account
    - Added options for handling Unity's cap of 65,535 correctly-LODed terrain trees per-terrain
    - Added a slider to control global density scale from the FoliageArea component
    - Added a progress bar for generation inside the editor (NOTE: Editor simulation currently can't run in the background any more)
    - Runtime-placed terrain trees should now properly have their colliders applied
    - Children of GameObjects placed by Landscaper should now have their layer set properly

    1.2.0
    - There is now an option to place a Foliage Area in the scene from the menu, under "GameObject > Landscaper > Foliage Area"
    - Prefabs have been replaced with "Archetypes", which group certain options
    - Placement mode can now be chosen on a per-archetype basis, rather than for an entire species
    - Archetypes have a scale range which is used to adjust the scale of foliage instances based on their generation. It's no longer necessary to specify generation overrides to control scale
    - Added a colour variation option to archetypes, allowing for foliage instances to be randomly darkened to add variation
    - Generations now also use archetypes for increased control
    - Generation overrides can be individually disabled. For example, if you wanted to override generation 1, but not generation 0
    - Greatly improved usability when editing foliage species
    - Each species can now consist of multiple prefabs which will be selected from at random

    1.1.0
    - Tree creator trees no longer appear black when placed as Terrain Trees
    - Generation times are greatly reduced for larger terrains; FoliageAreas have a "MaxTileSize" which splits the area into multiple generation chunks for further improved performance.
    - The FoliageArea inspector now has options for auto-fitting to the scene: All Geometry, Terrain, and Selection
    - Foliage instances placed using the GameObject method are no longer hidden in the hierarchy and are instead parented to a new empty GameObject named "Landscaper Foliage"
    - Placed foliage is no longer automatically cleared when the FoliageArea component is removed
    - FoliageArea now has an optional layer mask to filter which surfaces instances can be planted on
    - Species now have a list of terrain textures that they are allowed to grow on. If the list is empty, instances can grow anywhere. Has no effect when planting on non-terrain GameObjects
    - Landscaper is now compatible with Unity 4.6.x, and possibly older versions as well

    1.0.2
    - Added instance count & generation time information to the FoliageArea inspector as well as an estimate for the maximum number of foliage instances that will be generated with the given settings
    - Foliage placed using the GameObject placement mode can now optionally not conform to the normal of the surface they are planted on

    1.0.1
    - Foliage simulates ~50% faster. Very large areas will still take a while to generate foliage for
    - Each species now has a PlacementMethod that can be switched between "GameObject" and "Terrain Tree". Terrain trees slightly outperform GameObjects & consume less memory; GameObjects can have scripts applied (to allow for interactable foliage, for example)
     
    Last edited: Feb 17, 2023
    Rick- and blueivy like this.
  2. Aegon-Games

    Aegon-Games

    Joined:
    Mar 7, 2014
    Posts:
    621
    Small update:

    Version 1.0.1
    - Foliage simulates ~50% faster. Very large areas will still take a while to generate foliage for
    - Each species now has a PlacementMethod that can be switched between "GameObject" and "Terrain Tree". Terrain trees slightly outperform GameObjects & consume less memory; GameObjects can have scripts (to allow for interactable foliage, for example). Terrain trees also cannot conform to the normal of the surface they are on, unfortunately.
     
  3. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    I like this! Can it use any sort of prefab, even Speedtrees? I have been unable with my tree placement asset and would like one that allows me to place trees without a bunch of curves and whatnot. This looks simple and intuitive. And the results look natural.
     
  4. Aegon-Games

    Aegon-Games

    Joined:
    Mar 7, 2014
    Posts:
    621
    Yes, Speedtrees work fine; that's actually what I'm using in the video. I didn't use a Wind Zone in that video, but I've just checked now and wind works as expected too.
     
    hopeful likes this.
  5. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Thanks! :)
     
  6. DivergenceOnline

    DivergenceOnline

    Joined:
    Apr 19, 2015
    Posts:
    244
    Looks good but:
    1) The not always pointing straight up in the air is a killer for trees
    2) Does it work on multi (tiled) terrains?
     
  7. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Much more natural that way. I spent one entire day pointing out trees that are not pointing straight up in the air to my son after finding this asset. He was rather surprised. :) For a variety of reasons, trees do not always grow straight up.
     
  8. DivergenceOnline

    DivergenceOnline

    Joined:
    Apr 19, 2015
    Posts:
    244
    Trees don't always grow straight up.
    But in the instances where they don't, they at least bend upwards toward the light. A tree that points straight outwards like that looks silly.
     
  9. Aegon-Games

    Aegon-Games

    Joined:
    Mar 7, 2014
    Posts:
    621
    1) If you use the "Terrain Trees" placement mode then they will always point upwards. I'll add the option for choosing whether GameObject trees should conform to the surface normal or not.
    2) It works on any colliders included in the placement volume.
     
    Rick- and Teila like this.
  10. Brendonm17

    Brendonm17

    Joined:
    Dec 9, 2013
    Posts:
    43
    Does this work on meshes and not just unity terrain?
     
  11. Aegon-Games

    Aegon-Games

    Joined:
    Mar 7, 2014
    Posts:
    621
    Yes, it'll work with any collider, not just terrain
     
  12. Jacob-Williams

    Jacob-Williams

    Joined:
    Jan 30, 2009
    Posts:
    267
    Can the generation be done at runtime as well?
     
  13. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,526
    This does look very helpful. I have terrain composer which works great but not easy when I am constantly making changes to my project. I really like the sound of this generation system. I just watched UE4 making of the open world video. First time I saw the generations tree placement. It sounded amazing. The next day I see this! I do have a few questions though.

    Does this work well with tree creator trees? Also do they still have generations when placed in the terrain system?

    Does this or will this in the future work with detail plants?

    I have tried another landscape placement extension and it would place the trees of the same type right next to each other all over the place. Without tree rotation with the tree creator trees this looks horrible. Does your extension protect from the same tree being placed in "doubles"?

    Thanks.
     
  14. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,526
    Sorry. A few more.

    So rocks are placed as gameobjects not as terrain trees? Cool. Was going to ask about a check box to enable/disable gameobject aligning to terrain but just noticed you mentioned you are going to put it in.

    Also rocks have generations too? I can have a cliff and set smaller rocks, which will be like broken off parts of the cliff, be placed around it?
     
  15. FractalCore

    FractalCore

    Joined:
    May 15, 2009
    Posts:
    151
    I'm having an issue with where the trees are planted within the volume. Apart from a few, they seem to only appear in the top half of the green volume.

    I've got -100 and 100 for the min and max altitude range. And 45 for the max slope. So I'm pretty sure it's nothing to do with those.

    Hopefully the picture demonstrates this. I simply moved the green box down and hit simulate again. And as you can see it's not putting them in the lower half, is this intentional? Untitled-1.jpg
     
  16. Aegon-Games

    Aegon-Games

    Joined:
    Mar 7, 2014
    Posts:
    621
    Yeah, I actually got the idea from Epic's videos about the system coming to Unreal Engine - they always make the best tools. It's such a simple method but it works really well.

    Can the generation be done at runtime as well?

    Yes, although it wasn't designed to be a lightning-fast algorithm for runtime use. If you have a large area to cover, it could take several seconds to generate. The generation time increases exponentially with the number of instances that need to be placed so large terrains could take a long time to generate.


    Does this work well with tree creator trees? Also do they still have generations when placed in the terrain system?
    I'm not familiar with tree creator, but after messing around with it for a little while, I can say that they work properly if placed using the "GameObject" placement mode. If placed as terrain trees, they don't have a random yaw (painting them on the terrain seems to have the same issue, so I guess it's a Unity thing), and are oddly lit.

    Anything placed in Landscaper has generations which work regardless of which PlacementMode is used or what type of object you're placing.


    Does this or will this in the future work with detail plants?
    I'm not sure if this is what you're asking but I do want to offer the option to use runtime generated detail objects like grass and small rocks in a similar way that Unreal Engine is going to do it - in an area around the player (not seeded, so it'd be different each time you come back to an area). I don't have any concrete ideas for when/if this is going to make it into Landscaper though; I'd need to figure out how to do it first and then free up some time to get it implemented.


    I have tried another landscape placement extension and it would place the trees of the same type right next to each other all over the place. Without tree rotation with the tree creator trees this looks horrible. Does your extension protect from the same tree being placed in "doubles"?
    There's nothing to stop duplicate trees being placed next to each. As mentioned above, if you use tree creator trees with the "GameObject" placement mode, they'll have a random rotation. SpeedTree trees and standard prefabs will have a random rotation regardless of placement mode.


    So rocks are placed as gameobjects not as terrain trees? Also rocks have generations too? I can have a cliff and set smaller rocks, which will be like broken off parts of the cliff, be placed around it?
    Everything in Landscaper is placed in the same way. A rock would just be another "Species" asset, so they have access to all of the same settings and support both placement modes. You absolutely could use the generations prefab override to have smaller rocks around a cliff.


    It's not intended that foliage is only placed in the upper half of the bounding box, but I'm not seeing the same issue on my end. How are you changing the size of the bounding box? By scaling or by using the bounds extents variable in the inspector? I'm seeing some odd results if I set the bounds in the inspector (not like what you're seeing but it could be related).

    If you're setting the bounds extents in the inspector, could you try setting them back to the default values (10 for each axis) and scale the foliage area GameObject to encompass the area instead?
     
  17. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,526
    Thanks for the response. It is a awesome idea. Thanks for working on a system for us to use it.

    What I was meaning was with the terrain detail plants option. The way you would place grass planes and detail plants using the terrain detail/grass tool and not the tree tool. I like your plan. I did not completely understand the plant part of Epics' video. Also the part about the matching of the terrain color to the plants. It looked amazing though.

    Thanks again for the answers.
     
  18. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,526
    I Imported Landscaper and set everything up but then I got this error repeating over and over again:


    There is also no Simulate or Clear buttons in the Landscaper UI.


    Not sure if I did something wrong. Followed the videos instructions.
     
    Last edited: May 15, 2015
  19. Aegon-Games

    Aegon-Games

    Joined:
    Mar 7, 2014
    Posts:
    621
    That error message doesn't make any sense with the version I have. Can you please download the beta build below and see if that fixes the error?

    Version 1.0.2 (Beta)
    - Download
    - Added instance count & generation time information to the FoliageArea inspector as well as an estimate for the maximum number of foliage instances that will be generated with the given settings
    - Foliage placed using the GameObject placement mode can now optionally not conform to the normal of the surface they are planted on
     
  20. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,526
    Thanks. Downloaded it and tried it and it worked great placing them. Strange but now the trees placed are completely black. I am using tree creator trees and placing them as terrain trees.


    I had this problem with terrain composer too but he had a script to fix it. Not sure what would cause it.
     
  21. FractalCore

    FractalCore

    Joined:
    May 15, 2009
    Posts:
    151
    "If you're setting the bounds extents in the inspector, could you try setting them back to the default values (10 for each axis) and scale the foliage area GameObject to encompass the area instead?"

    This did it, thanks. I got the latest release and notice you've removed the bounds settings entirely, so I guess scaling was just the better way.

    Can I make one little suggestion, the default size of the bounding box seems to be 5 units in size. So if I have a terrain that's exactly 800x800, I have to do a little calculation to work out I can type in 160 x 160. It's not a big deal but if the default size was 1 then it would make more sense.

    After typing that I had a tinker myself in FoliageArea.cs and found that if I change this...

    /// <summary>
    /// The unscaled boundaries to place foliage in
    /// </summary>
    public Bounds Bounds = new Bounds(Vector3.zero, new Vector3(10, 10, 10));

    to be (2, 2, 2) it does what I was asking about.

    Great tool by the way, I've wanted something like this for years. And can I say, the conform to surface option is very, very much appreciated on my end.
     
  22. Aegon-Games

    Aegon-Games

    Joined:
    Mar 7, 2014
    Posts:
    621
    I have no idea why it does that with tree creator trees, I couldn't find any information anywhere - Unity must be doing something special when placing them with the painting tool to make them work properly. They work fine if placed as GameObjects, but that might not be an option if you want a lot of them.

    Thanks, I've made the change in the latest build and updated the beta download.
     
  23. Rick-

    Rick-

    Joined:
    Oct 13, 2014
    Posts:
    78
    Hi AegonGames,

    I'm very interested in your product and i have a few questions before buying:

    1: Can i use it with tiled terrain?
    2: Is it possible to place grass/rocks in the terrain instead of just trees?
    3: Is it possible to place the trees based on the terrain textures?Or making something like biomes?
     
  24. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    909
    before use Ecosystem Generator but is old and start bugging
    so add your's tool on wisp list if Collision & shade range working good
    it's can be amazing
     
  25. Aegon-Games

    Aegon-Games

    Joined:
    Mar 7, 2014
    Posts:
    621
    1. Landscaper will plant foliage on any collider inside the volume, so it will work just as well over multiple terrains

    2. Any prefab will work. The video and screenshots in the first post show Landscaper used to place trees, rocks and bushes on a terrain. For things like rocks, you'd need to make sure that "Can Grow in Shade?" is checked.

    3. Not at the moment. That's something I want to do, but I don't have a specific timeframe for when it'll be implemented.
     
    Rick- likes this.
  26. Rick-

    Rick-

    Joined:
    Oct 13, 2014
    Posts:
    78
    That's great!Exactly what i needed.
    Two more questions:

    Can i have several 'Foliage Area' in just one scene?
    Where is the trees/rocks stored?Can i move/rotate/delete them after placing?
     
  27. Aegon-Games

    Aegon-Games

    Joined:
    Mar 7, 2014
    Posts:
    621
    If you're placing instances as GameObjects, you can have as many Foliage Areas in a scene as you like. Terrain trees are cleared from terrain when simulating, so in that case, you could only have one area per terrain.

    If you use the "Game Object" PlacementMode, they're placed as standard GameObjects; they're hidden in the inspector to reduce clutter but you can still select them in the scene and move/rotate/delete them if you want.

    If you use the "Terrain Tree" PlacementMode, they'll be applied to terrain as tree instances and you can use the painting tools to add/remove them. Using this mode, any foliage instances that are planted on anything other than terrain automatically become GameObjects instead and work as described above.
     
    Rick- likes this.
  28. boysenberry

    boysenberry

    Joined:
    Jul 28, 2014
    Posts:
    365
    Hi, really impressive looking product. I am using a volumetric terrain generation system that has an edit mode and runtime mode for the terrain. That is, it can build the terrain while in edit mode, for editing, etc. But the terrain gets saved then destroyed in the scene one save. then, at runtime the saved information recreates the terrain. The terrain itself is composed of 2 parent GameObjects, 1 that is permanent, the root container, and 1 that is generated to contain the child chunks of terrain. There are 100s if not 1000s of chunks generated, each with its own mesh colliders, materials, etc.
    My question, do you think I could get Landscaper to work with my situation?
     
  29. Andrew_atl

    Andrew_atl

    Joined:
    Sep 21, 2010
    Posts:
    103
    Nice, I was kinda envious of the UE4 procedural foliage they showed but this looks pretty close to it.
     
  30. DivergenceOnline

    DivergenceOnline

    Joined:
    Apr 19, 2015
    Posts:
    244
    That's a pretty big issue. So are you saying that you basically don't have a fix for that, and if you use unity trees like a lot of people do that there's no point in using landscaper?
     
  31. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Hey, he fixed it above. ;) Well, thought he did...hmmm...

    Yeah, this is sort of a deal breaker for me too. :(
     
  32. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,526
    Yeah. I could place them as gameobjects but then since I am creating a scene for the Unity Asset Store I need to be able to delete the landscaper script. Do that and the gameobjects are deleted. So unfortunately I bought this and cannot use it at all.

    It is a really cool tool but I would need the ability to place tree creator trees as terrain trees without them turning black and have gameobjects placed in a folder in the hierarchy and not hidden in the script. Then I would be in business.
     
  33. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Thanks for that info, Baldinoboy. I guess I am back to looking for something else. I need the performance of placing them as terrain objects. TC lets you do that and they are not black so not sure what the issue might be with this asset.
     
  34. Aegon-Games

    Aegon-Games

    Joined:
    Mar 7, 2014
    Posts:
    621
    It should work. Although it sounds like that could be a huge area, so I should mention that the placement algorithm increases in time exponentially the larger the area that you're covering. As an example, using the setup seen in the video and screenshots in the first post, here are the placement times for varying terrain size:

    500^2 units - 0.5 seconds
    1000^2 units - 6.8 seconds
    2000^2 units - 105 seconds


    They still work properly when placed as GameObjects. I haven't noticed much difference in runtime performance from using GameObjects instead, but I imagine they consume more memory.

    I'm still looking into the issue with unity trees placed as instances on a terrain, but I haven't came up with anything yet. If anyone knows anything about this particular issue, please let me know and I'll get it fixed immediately.


    I could change the way Landscaper works so it puts GameObjects in a visible parent object rather than hiding them from the inspector. Deleting the foliage instances when the FoliageArea is destroyed was just a result of the GameObjects not being visible in the hierarchy for users to manually clean up, so I can remove that too.
     
    Baldinoboy likes this.
  35. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,526
    That would help. At least enable me to use it. I understand why you did it that way. I like a clean hierarchy too;). Though if you could have the objects placed in a separate folder it would help a lot. Personally I hate the terrain tree placement system. I would prefer to place the tree creator trees as gameobjects. Have to setup billboards but that is not the end of the world.

    For the black terrain trees contact @eagle555 . Had a problem like this in terrain composer(think it was just the billboards though) and he fixed it. Hopefully he would be okay with sharing some info.

    This is a awesome tool. If you are worried about the tree creator issues I recommend you keep this watched. Hopefully that will be fixed soon. Even just using Landscaper for rocks it does a fine job.
     
  36. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,526
    Cannot do this with terrain trees:


    A couple of my trees placed as gameobjects. Placed even on the cliff meshes. Pretty awesome. The lack of rotation is what makes me truly hate the terrain system. Looks so much better using this script.
     
    jason-fisher likes this.
  37. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    I agree...but for me, the performance tops. Besides, I don't have palm trees in my game and if I did, I could easily hand place them to look like that. :) Beautiful and wonderful idea, but you need to find a way to get terrain trees to work.

    I have placed terrain trees with Terrain Composer and they are in my game at the moment. They are not black and look fine. I wanted yours to allow me to get a much more natural look.

    Since the trees don't turn black in TC, I suspect this is not a Unity issue.

    Hope you do fine a way to fix it. Until then, you need to put this issue on the top of this thread and on the asset store product page. I almost bought this. :)
     
  38. Aegon-Games

    Aegon-Games

    Joined:
    Mar 7, 2014
    Posts:
    621
    No point, I usually fix issues well before Unity accepts the changes to the Asset Store description :p

    Version 1.0.2 (Beta) - Download
    - Added instance count & generation time information to the FoliageArea inspector as well as an estimate for the maximum number of foliage instances that will be generated with the given settings
    - Foliage placed using the GameObject placement mode can now optionally not conform to the normal of the surface they are planted on
    - [NEW] Tree creator trees no longer appear black when placed as Terrain Trees


    It's late here so I'll be working on the other changes I mentioned tomorrow (showing GameObject trees in the hierarchy, etc). I just wanted to make sure I got this fix published tonight, I should have a new build with the other changes within the next 24 hours.
     
    Rick-, Baldinoboy and hopeful like this.
  39. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Well, why didn't you tell us that in the first place!! :cool:
     
  40. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,526
    There is a problem. I can only like this post once;). Thank you for this update. Works great. Tree creator trees working amazing. The Conform to Mesh Surface box does its job. Looking forward to the gameobjects in the hierarchy update.

    I have to say you are an awesome dev. The beta download system you have setup is awesome and is very helpful with your quick fixes and new features instead of waiting the 1-2 weeks for the Asset Store to accept the update. So thanks. Really appreciate it.
     
    Rick-, John-G and Teila like this.
  41. DivergenceOnline

    DivergenceOnline

    Joined:
    Apr 19, 2015
    Posts:
    244
    Noticing the system choke in your videos for 5 seconds on simulation of a terrain that is a mere 100m in size, I really doubt it'd be useful for anything approaching large terrains. For instance, one continent in our game is 16kmx16km, 4x4 tiles 4km in size search at 2048 resolution.

    My math isn't great, but with the formula above that you posted, that tells me I'd be in a retirement home by the time it completed just one simulation. Is that incorrect and perhaps I've misunderstood?
     
  42. boysenberry

    boysenberry

    Joined:
    Jul 28, 2014
    Posts:
    365
    Would it be possible to use multiple foliage areas maybe to limit the scope of where its applied in a way to cut down on build time? I will be limiting the size of the voxel terrain (i.e. no infinite terrain), but it will still be rather large. Maybe a way to generate at runtime around the main camera via threads? I don't ask for much, right, hehe.
     
  43. Aegon-Games

    Aegon-Games

    Joined:
    Mar 7, 2014
    Posts:
    621
    That was before a major optimization, the same terrain takes a fraction of a second now.

    No, you're right - it would take a very long time to generate foliage for a terrain that big. I have a few ideas for some heavy optimization that I'll be trying out today. If you haven't already bought it, I would hold off for now but I should have a conrete answer within the next few days if Landscaper could be used for huge terrains.

    If you're using the GameObject PlacementMode (which you'll need to if you're not using Unity terrain), then multiple FoliageAreas should work to dramatically reduce generation times. I'm planning to have Landscaper internally do this even when using a single FoliageArea. There will be seams between the two areas but I'm thinking foliage placement should be chaotic enough for it not to be noticeable at all.

    Multi-threading is another optimization I'd like to go for, but I have to work around the fact that most of the Unity API isn't thread-safe (and I'm heavily using things like linecasting).
     
    Last edited: May 20, 2015
    boysenberry likes this.
  44. DivergenceOnline

    DivergenceOnline

    Joined:
    Apr 19, 2015
    Posts:
    244
    Thanks for your response and I can't wait to hear about how things went with your ideas today! I haven't bought it yet but if it works, you can bet I will.
     
  45. Charkes

    Charkes

    Joined:
    Apr 17, 2013
    Posts:
    228
    Hi,

    I've bought Landscaper recently, and I have to say that it is a very powerfull tool.

    However while it was working just good yersterday, I've got some trouble with it since I updated Unity 5 to the 5.0.2f version today :

    1 - If my tree use terrain placement method and if I enter in play mode they just vanished, but in gameObject placement method no problem.

    2 - If I use gameObject placement method and if I want to delete some unwanted placement like on roads I need to delete manually all LOD but the billboard remain.

    3 - Not a problem but more a feature request, can you add the ability to use layer as mask placement until you add texture masking support ?

    Thank you
     
  46. Aegon-Games

    Aegon-Games

    Joined:
    Mar 7, 2014
    Posts:
    621
    1. This should hopefully be fixed in the newest build
    2. In the new build, GameObject foliage is no longer hidden in the hierarchy, so you should be able to select them from there now.
    3. Thanks for the suggestion, I've added it to the new version


    Version 1.1.0 (Beta) - Download
    - Tree creator trees no longer appear black when placed as Terrain Trees
    - [NEW] Generation times are greatly reduced for larger terrains; FoliageAreas have a "MaxTileSize" which splits the area into multiple generation chunks for further improved performance.
    - [NEW] The FoliageArea inspector now has options for auto-fitting to the scene: All Geometry, Terrain, and Selection
    - [NEW] Foliage instances placed using the GameObject method are no longer hidden in the hierarchy and are instead parented to a new empty GameObject named "Landscaper Foliage"
    - [NEW] Placed foliage is no longer automatically cleared when the FoliageArea component is removed
    - [NEW] FoliageArea now has an optional layer mask to filter which surfaces instances can be planted on
    - [NEW] Species now have a list of terrain textures that they are allowed to grow on. If the list is empty, instances can grow anywhere. Has no effect when planting on non-terrain GameObjects

    1.0.2 hasn't made it to the Asset Store yet but there are some major changes here so I'm skipping to version 1.1
    The species inspector window could do with some usability improvements still, but I think I've included all of the features/improvements from this thread. Please let me know if I missed anything.

    New Performance:
    500uu²: 0.5s => 0.2s (1.5x faster)
    1k uu²: 3.7s => 0.9s (3.1x faster)
    2k uu²: 1m 45s => 3.8s (26.6x faster)
    4k uu²: N/A => 14.9s
    8k uu²: N/A => 2m 23s

    LandscaperPerformanceGraph.png
     
    Last edited: May 20, 2015
    Rick-, SAOTA, Charkes and 3 others like this.
  47. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,526
    Do not know how you did that so fast. That is a lot of new features and they all work. Thank you for the layer placement option and fit to bounds tool. Saves even more time. The terrain tree disappearing bug is fixed too. Placement is a good deal faster too.

    Thank you for the update.
     
  48. DivergenceOnline

    DivergenceOnline

    Joined:
    Apr 19, 2015
    Posts:
    244
    Assets/Landscaper/FoliageVolume.cs(390,51): error CS0308: The non-generic method `UnityEngine.Object.Instantiate(UnityEngine.Object)' cannot be used with the type arguments

    Assets/Landscaper/FoliageVolume.cs(444,17): error CS0117: `UnityEngine.TreeInstance' does not contain a definition for `rotation'
     
  49. Charkes

    Charkes

    Joined:
    Apr 17, 2013
    Posts:
    228
    Thank you for the fast update !
     
  50. Aegon-Games

    Aegon-Games

    Joined:
    Mar 7, 2014
    Posts:
    621
    Which version of Unity are you using?