HungryProton / scatter

Godot engine addon to randomly fill an area with props or other scenes
MIT License
2.08k stars 94 forks source link

ProtonScatter

Banner

Place anything you want in your scenes, in a procedural, non-destructive way.

What is it?

This is an add-on for Godot 4, which automates the positioning of assets in a scene. If you have a lot of props to place, and you would rather not do it by hand, ProtonScatter may be useful to you.

Placing grass on arbitrary geometry Editing the showcase scene

The showcase scene composition was entirely done using ProtonScatter. First, large rocks are randomly placed within an area, then trees, grass and other details are projected onto the rocks' colliders surface.

How does it work?

The basic setup is as follows:

setup

Creating points

grid random along_edge
Placing items aligned on a grid Placing items randomly Placing items along an edge

Defining the domain

Scatter currently ships with three shape types: Box, Sphere and Path. They can be combined to create more complex shapes. Notice how in the last example, the box is shown in red. This means the shape is marked as 'negative' and new items won't appear inside.

box sphere path combined_shapes

Other uses

Most of the examples above placed items on the floor or on a flat plane, but nothing stops you from using the full 3D space. The mushrooms are placed in the space, then projected in a random direction until they hit a tree. The tower in the background is done by stacking individual bricks using two array modifiers.

https://user-images.githubusercontent.com/52043844/232786762-330314a9-bc8a-49f4-86f7-1cfe99437d7c.mp4

FAQ

How to install this addon?

Using the asset lib

Manually

Does it work on Godot 3.x ?

Where's the documentation?

image

License