Danae Environment Painter

What is it?

Supercharged objects placement using physics directly inside the PlayCanvas editor. Speed up your scene creation!

Create natural looking scenes without effort, paint anything on top of anything. A must have tool for environment artists.

../_images/nature-painter.jpg

Features

  • Easy to use rules for painting a collection of objects.
  • Paint decals on top of surfaces without worrying about manual placement.
  • Drop feature to create natural looking scenes.
  • Athena Terrain Creator support for painting on terrain models.

Where to find?

After you enable the extension in the PIC browser extension, reload your PlayCanvas editor and head to Settings -> Danae Environment Painter.

How it works?

  1. You select a single or multiple entities (by referencing their parent) to use as brushes.
  2. You select a target entity where the entities created will be placed.
  3. You select a single or multiple entities (by referencing their parent) that will act as colliders.

Danae boots up the PlayCanvas physics engine to be able to raycast and find the collision contacts to place the objects.

For that to happen Danae needs to be aware of which objects to test against. That is the reason you need to pass a list of colliders. Those entities enter the physics simulation and you can click/paint objects and/or drop them (if an entity doesn’t provide those components it is just ignored).

Now you are ready to press Start and paint on any surface. You will see entities spawned in place, based on your current settings.

At any time you can press Add and have the painted entities added to your scene hierarchy. If for any reason you aren’t happy with the entities created by pressing Clear you can remove them and try again.

When you are finished and would like to exit the painting mode press Stop.

Note

Potentially this process could be automated to avoid the need to manually add collision entities. But that won’t scale well with big open worlds and may introduce performance issues in the editor.

In addition, by allowing the artist to select what kind of collision shape and rigid body material each entity has he can control how the drop feature is executed each time.

Note

If you are using the Athena Terrain Creator in your scene you don’t need to add a collision/rigid body component to paint on a terrain. The extension automatically takes care of that and adds them to the physics simulation.

Settings

../_images/settings.jpg

What to draw?

Drag and drop an entity from the Hierarchy. Its children will be the entities used as painting brushes.

Where to add?

The entity on which every added entity will be appended as child. If non is selected it defaults to Root.

Colliders

Drag and drop an entity from the Hierarchy. Its children will be added as colliders to paint on them. Make sure that each entity provides a Collision and RigidBody component so it can enter the Physics Simulation.

Step

The distance on which a new entity will be spawned.

Scale min

The minimum scale used to genenerate entities of various sizes.

Scale max

The maximum scale used to genenerate entities of various sizes.

Rotate on

Add a random rotation on the selected axis.

Align?

If selected the entity will be rotated to vertically align on the hit point of the surface. Useful when placing decals on surfaces.

Drop?

If selected the entities instead of being placed in place, will be dropped from a height of 10 units. Useful when generating natural looking scenes.

Drop type

The Collision component that will be used when dropping the entities. Notice: mesh to mesh collision isn’t supported in PlayCanvas, so be careful when dropping Mesh colliders.