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.
scatter_project.mp4 |
scatter_showcase.mp4 |
---|---|
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.
The basic setup is as follows:
-
A
ProtonScatter
(1) node holds thepositionning rules
(2) that can be edited in the inspector. This panel is very similar to Blender's modifier stack panel. Some modifiers create points, others change their transforms. You mix different modifiers in order to obtain the result you need. -
One or more
ScatterItem
nodes to select which asset you want to place. -
One or more
ScatterShape
items to define the area where the scattering happens.
Placing items aligned on a grid | Placing items randomly | Placing items along an edge |
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.
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.
scatter_v4_mushroom.mp4
- Using the asset lib, look for ProtonScatter and click on Install.
- If nothing appears, that means the add-on was not accepted yet, so use the manual method.
- Download or clone this repository.
- Copy the proton_scatter folder into your project's add-on folder.
- DO NOT rename the proton_scatter folder, or it won't work.
- Go to your Projects settings > Plugins > and enable ProtonScatter.
- Go to the
v3
branch and install it from there. - Keep in mind that ProtonScatter was completely rewritten and overhauled for Godot 4, there will be significant differences.
- If you're upgrading your project from Godot 3 to Godot 4, the previous Scatter objects will NOT be compatible anymore.
- Click on any
ProtonScatter
node and look at theModifier Stack
in the inspector. - You will see a
Doc
button in the top right corner. Click it to access the built-in documentation.
- This add-on is published under the MIT license.
- About the game assets under the
demo
folder:- 3D assets are under the MIT license.
- Most textures bundled with this project have been created with images from Textures.com. You cannot redistribute them on their own, but they're free to use as part of a bigger project. Please visit www.textures.com for more information.