Landscape Object Scatterer Script V 1.32 | Sansar Store
Landscape Object Scatterer Script V 1.32

Landscape Object Scatterer Script V 1.32

 199

You need to own this item to leave a rating.

0 ratings

This script automatically places landscape objects such as trees, plants, mushrooms and rocks in any scene.

We made an instructional video which you can find here:
https://youtu.be/SofuFiEAImc

Version 1.32 Changed scan height to scan start and scan end. The beacons are now placed at the height of the object that contains the script. You can now grow plants below the ground level.
Version 1.31 Added a terrain label property. Only place plants on objects/ground marked with this label to avoid stacking, leave empty to not limit placement. No plants will be placed if the terrain is not marked once this label is specified. This allows the use of objects with collisions as they will be ignored if the name does not match.
Version 1.30 Added an optional ninth parameter that allows to select the distribution algorithm. Default is now the most natural random distribution, yet. Set to 1 if you want to play with linear distribution, which often ends up creating rows of trees, but can also provide the most even coverage.
Version 1.27 Better random seeding when parameters are nearly identical, added a problem solving segment to this listing for more tips. Fixed parsing error where sometimes float parameters would be ignored in chat.
Version 1.25 Improved object distribution
Version 1.2o /showconfig command added, optimized the distribution of objects so they always cover the whole grid, minor bug fixes
Version 1.1o /lshelp chat helper when in verbose, chat commands so that the config can be changed in-world without round trips, easier to read config
Version 1.o1 now supports seeds to keep randomization repeatable.

Features:
20 Slots for 20 different plant groups (objects not included).
Placement based on height ranges and slope angle.
Plants are randomly rotated.
All random parameters are frozen, so that the scene gets recreated the way it was. To switch it up you can set a random seed per group.
Plants can adhere to the slope of the landscape, e.g. grass can grow on a hill or landscape objects stay upright.
Script is best placed in a trigger volume, the size of the scan area can be set in units (x and y).
Verbose mode will rezz corner beacons (available for free in the fullspectrum acount).
Verbose mode will give feedback on auto placement and what distribution algorithm was chosen by the code.
Multiple scripts can be chained. That way the user can control what gets rezzed first and the throttles are never overwhelming the scene.
Shielding objects to protect areas can be placed at scan height.

Parameters:
Name: Helps to understand verbose script feedback in chat
-> Start: Simple Script command that can start the script (for chaining) use "auto" for immediate launch (but chain additional rezzers).

On Completion -> : Simple Script command that gets sent when the sccipt placed all landscape objects. Use for for chaining.

Landscape Object: Allows you to choose up to 20 objects from your inventory.

Config String: 8 Numbers that specify how the script places your object
Use a semicolon or comma as separator!

Example config string:
height:0.01; range:3; minSlope:0; maxSlope:5; maxObjects:15; zOffset-0.5; adhereToSlope:0; SEED:999; algorithm:0
(note: the words are just comment strings, only the numbers are extracted)

1: Base height
2: Height range added to base height
3: Slope range minimum in degress. You will use 0 in most cases.
4: Slope range maximum in degrees. E.g. 45 means that your plant will not placed if a slope is steeper than 45 degrees.
5: Maximum number of plants for that group
6: Height offset, e.g. -0.5 is good for trees so they are always completely in the ground, if you do configure ground plants this value should be very very small e.g. 0.005 (5mm if a unit was one meter), please experiment
7: Follow slope, use 0 for upright (much faster), 1.0 for completely following the slope
8: Specify seed to fix random positions, objects will be placed in the same spot everytime. Use different seed values to mix it up.
9: Default is 0 for random distribution which creates natural clusters of objects. You can try the less natural linear distribution by setting this to 1. It depends largely on the amount of slots available. If there are way too many slots this will create rows of trees. If the amount of available placements slots are close to the amount of objects this can create the most even coverage, still somewhat randomized.

Corner Markers: Object to be rezzed in the four corners of scan matrix
Scan Height: Default 45, sets the height were the ray casts to find the ground level begin, objects that protect an area need to be placed at that exact height.

X Scan Area: X dimension of Scan Area
Y Scan Area: Y dimension of Scan Area

Grid Spacing Distance: Density of the grid used for placement.

Verbose: Turns on feedback in chat and the corner marker.

WARNING!
Be careful with the size and density of your scan area!!

100x100 with density one means there will be 10000 rays cast to find spots for your plants.
Do not plant more than about 1000 landscape objects in a scene.
Use the draw distance flag on your plants.
AVOID using high polygon trees and plants etc. try to find objects with ~ 300 triangles for small ground objects and not more than perhaps 3000 for your trees.
Start small with few groups, small areas and always have an eye on your framerate.

Trouble Shooting & General Tips

If you are unhappy with the plant distribution, try to change many parameters even if the changes are subtle. Try not to use identical height and slope parameters in two groups, otherwise the plants will compete for the same spots. They are still going to be randomized, but if there only 77 spots for 40 plants some plants will merge into new species.
Always use different seeds for each group.
If plants stack on top of each other it means that they have collision enabled.
Share your landscape results with Bagnaria she loves to see what you created.

FREE Updates for the life of the script.

Contact Bagnaria for questions.

Item name
LandscapeObjectScatterer_1.32
Min. resale price
999