View on Asset Store (opens in new tab)
Package details
- Latest version
- 1.0
- Last updated
- First released
- Unity version
- 6000.3.10 or later
- Package size
- 42.0 MB
- Files
- 57
- Favorites
- 1
- Views in the past week
- 5
Price tracking
- Last checked
- Tracked since
- Lowest recorded
- $4.99 on
Keywords
Infinite Scatter
Scatter hundreads of thousands elements in one draw call budget, on any mesh, with zero GameObjects. Paint density with a black & white texture. Built for WebGL and mobile
Affiliate link · Purchases support this site
Price history
Last 6 months
USDAsset preview
1 / 7
Infinite Scatter screenshot 1
About this asset
Infinite Scatter fills any surface with grass, flowers, rocks, debris, etc and lets you decide how much control you want over it.
Drop the component on an empty GameObject, point it at a mesh and a prefab, and it scatters thousands of instances across the surface, respecting the density you painted in your mask, and skipping slopes that are too steep. Nothing is instantiated: every blade is a transform matrix rendered through GPU instancing, so your hierarchy stays empty, your draw calls stay in the dozens, and your frame allocates nothing.
That makes it a fit for the platforms where traditional vegetation systems fall over: WebGL builds, mobile, and lightweight web-based experiences where a compute-shader solution simply isn't an option.
It works on any MeshCollider, terrain meshes, hand-modelled hills, floating islands, cave floors, sloped rooftops and on any prefab with a mesh and a material, so it scatters rocks, flowers, debris and props just as happily as grass.
Highlights
- Greyscale density mask: paint where the grass grows, and how thick
- Slope filter: keep blades off cliffs with a single angle value
- Per-instance random rotation and scale, aligned to the surface normal
- Zero GameObjects, zero per-frame allocations, zero GC spikes
- One component, five fields, no setup wizard
- Full C# source included, clean and commented
In this package are also included nature assets and shaders to jumpstart thist tool right away.
The shader is ShaderGraph-based and it reacts to wind folding the blades and changes their color according to the wind direction, giving life and vibrance to your scene.
Press play on the Sample Scene and take a look!
Remember that everything is hand-made and no AI was involved in creating these Prefabs, shaders and textures
From the publisher's Asset Store listing.
Technical details
Infinite Scatter precomputes a list of Matrix4x4 transforms at startup and submits them to Graphics.DrawMeshInstanced in batches of 1023 instances per call from LateUpdate(). The batch array is allocated once and reused every frame, so steady-state rendering produces no managed allocations and no GC pressure.
Placement runs once in Start(). For each attempt, a point is sampled inside the target collider's bounds and raycast straight down onto the surface. A hit is accepted only if the surface normal is within the configured angle tolerance of world up, and if a random draw falls below the greyscale value of the density mask sampled at the hit point's UV. Accepted hits are given a rotation aligned to the surface normal plus a random yaw, a random uniform scale within the configured range, and a 0.01 unit offset along the normal to prevent z-fighting.
Requirements
- Target surface: a MeshCollider with valid UV coordinates (UVs are required only if a density mask is used)
- Source prefab: MeshFilter + MeshRenderer; only submesh 0 and the shared material are used
- Material with GPU Instancing enabled (the component enables it at runtime and warns if it was off)
- Density mask: Texture2D imported with Read/Write Enabled ON and Compression set to None (Crunch compression must be off - the pixels are read on the CPU via GetPixel)
Specifications
- Instance budget: 5 to 100,000, capped by the inspector range
- Draw calls: ceil(instanceCount / 1023) - 20,000 instances render in 20 draw calls
- Generation cost: up to instanceCount × 10 raycasts, paid once on scene load
- Namespace: XaosInfiniteScatter; a single MonoBehaviour, no editor dependencies
- Render pipeline agnostic: pipeline support comes from the material you supply (Built-in, URP, HDRP)
- Full, documented C# source. No third-party dependencies, no compute shaders
Known limitations
- Instances are generated at runtime, in Play Mode only - there is no Edit Mode preview
- Transforms are baked in world space: moving the spawner after generation does not move the instances
- No frustum culling and no LOD; every instance is submitted every frame. Split large areas across multiple spawners and disable the distant ones
- Instances are static once generated, sa the can be edited only through a shader (that I provide)
Compatibility
| Unity version | Built-in | URP | HDRP |
|---|---|---|---|
| 6000.3.10f1 | Not listed | Compatible | Not listed |
As listed on the Asset Store.