Mattiny / yamms

Yet Another MultiMesh Scatter for Godot
MIT License
31 stars 3 forks source link

Yamms logo

YAMMS - Yet Another MultiMesh Scatter

Table of Contents

What is it?

Yamms (Yet another multimesh scatter) is a plugin for Godot to place MultiMesh meshes into the game world.

Author: Mattiny Youtube: https://youtu.be/k5mwwakNHU4

Note: This plugin is only compatible with Godot 4.0 and following Godot versions. Screenshot_01

Features

Installation

Usage

MultiScatter

The MultiScatter is the main node of the whole MultiMesh scatter set up.

MultiScatterItem

The MultiScatterItem keeps information about one type of meshes in the MultiMesh set up. It needs to be a child node underneath the MultiScatter node. There can be multiple MultiScatterItems in one MultiScatter.

Set up a MultiMeshInstance3D

Set up parameters

MultiScatterExclude

The MultiScatterExclude defines a sub area which is left empty without any mesh generated in it. It is expected to be a child node of MultiScatter. There can be more than one MultiScatterExclude in one MultiScatter.

As done for MultiScatter: set up points of the area polygon. It only makes sense to place the polygon inside (or at least overlap) the area of the MultiScatter.

Generate

Once the MultiScatter set up has been completed, select the MultiScatter node again. Right next to the buttons which let you draw the polygon there is a "Generate" button. Hit the generate button and all meshes are generated and placed into your scene.

You still can edit your set up (move polygons, add/remove points to polygons, add MultiScatterItems, etc). But remember: to make these changes effective you need to hit the "Generate" button again. 04-Generate

Common use cases

Different types of MultiScatterItems

You can set up multiple MultiScatterItems for one MultiScatter. Each MultiScatterItem can have a different configuration (Proportion, Random scale and rotation, etc) which gives you a maximum control how these items will be placed into your scene. Rename the items in the scene tree to get a better overview of you scene. 05-MultipleScatterItems

Exclude areas for specific MultiScatterItems only

You have set up a complex scene with several MultiScatterItems (e.g.: grass, flowers and some trees) and you have set up multiple exclude areas (e.g.: pathways and some houses). Now you have some areas where you want to have some of the MultiScatterItems, but not all of them (e.g.: no trees between the houses, but there shall be grass).

To get this done add another MultiScatterExclude and set up the polygon for the area in which shall be excluded for some MultiScatterItems.

After that edit the MultiScatterItems:

06-Exclude01 06-Exclude02

Collision objects

You can assign an additional scene (containing a collision object) to a MultiScatterItem. This additional scene will be placed at the same position as the MultiScatterItem.

07-Collision Object 08-TargetNode 09-Reference-TargetNode 10-AssignScene 11-Generate