Landscaper - A tool for procedural foliage placement


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

Buy Landscaper on the Asset Store

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
Version Changes

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)
2 Likes

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.

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.

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.

1 Like

Thanks! :slight_smile:

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?

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. :slight_smile: For a variety of reasons, trees do not always grow straight up.

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.

  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.
2 Likes

Does this work on meshes and not just unity terrain?

Yes, it’ll work with any collider, not just terrain

4 Likes

Can the generation be done at runtime as well?

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.

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?

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?

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?

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.

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.

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

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.