Code Monkey home page Code Monkey logo

scatter's Introduction

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.

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.

How does it work?

The basic setup is as follows:

setup

  • A ProtonScatter (1) node holds the positionning 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.

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.

scatter_v4_mushroom.mp4

FAQ

How to install this addon?

Using the asset lib

  • 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.

Manually

  • 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.

Does it work on Godot 3.x ?

  • 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.

Where's the documentation?

  • Click on any ProtonScatter node and look at the Modifier Stack in the inspector.
  • You will see a Doc button in the top right corner. Click it to access the built-in documentation.

image

License

  • 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.

scatter's People

Contributors

hungryproton avatar addmix avatar norodix avatar yurisizov avatar tokisangames avatar deakcor avatar dillonsteyl avatar runkli avatar jegber avatar florianvazelle avatar realgdman avatar solitaryurt avatar zodywoolsey avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.