Godot: Quick brush tool

Created on 14 Jun 2018  路  13Comments  路  Source: godotengine/godot

Hi there,

When making 3D games, quick brush tool is what tilemap are to 2D, it's a en essential tool for 3D.

Please bring a brush tool to quickly place objects on a level, with options like random rotation, random offsets min max, or random scale min and max values.

https://www.youtube.com/watch?v=B1aR7x7zhJM

archived feature proposal editor

Most helpful comment

This feature can be very nice for work with CSG primitives. Upvoted. Is tedious duplicate continually with Ctrl + D and move with the arrows.

All 13 comments

Quick brush doesn't look anything like what tilemaps are used for, it looks more like a way to place multiple entities/nodes down as the mouse is dragged in a non-uniform manner. A 3D version of tilemaps is already built in to Godot as gridmaps. In addition there is CSG for non-grid-based creations, and of course just instancing nodes as normal for entirely freeform design (which is what quick brush looks like, you could even make a godot editor tool automate that).

It looks really nice and all, but what if you decide to move the objects on which you painted? Implementing that sounds a bit more complex than just placing objects based on a raycast (curious how such queries would be done as well in the editor, it needs to be decently fast and polygon-perfect).
Also, if you place that many objects, you should have choice to either use regular meshes or hardware instancing (for grass for example, techniques can change radically for high density placements).

I'll second this feature. Having the ability to quickly place objects with a brush that properly aligns with world-space objects would be extremely useful. Integrating it with the MultiMesh feature would also be excellent.

This would likely need to be written as part of the editor, to take advantage of the editor's existing picking code for the placement. Placement itself is fairly simple:

  1. do a raycast and orient a circle to the underlying normal (with some smoothing for best results).
  2. for each item placed, do a raycast (with a configurable distance) from the placement position, normal to the placement circle, in either direction.

    • if it hits, place an object at the contact point, optionally orienting to the contact normal.

This would allow placed objects to follow the curvature of a surface (ground, hulls, etc.) If this is not desired (probably a tool option), placement can just happen on the circle, with no secondary raycasts.

Objects are simple - either attach the painted objects to the node they're painted on, or ignore that completely and move them manually (would need some improvements to the editor's box selection code).

This would likely need to be written as part of the editor, to take advantage of the editor's existing picking code for the placement.

Or, you expose these few functions to the scripting API and you can now do it as a plugin :)

do a raycast and orient a circle to the underlying normal (with some smoothing for best results).

That's one of the biggest needs for such a feature: a way to query the scene fast enough without requiring the Bullet collision engine.

Objects are simple - either attach the painted objects to the node they're painted on, or ignore that completely and move them manually

That sounds good, but can quickly result in a mess because once you painted such objects they could end up being attached everywhere to nodes at various parenting levels, it can become a problem if you need to do further actions on them later on. I wonder how that works in other engines, in terms of scene organization... because if you want to erase them for example, how do you tell them apart from regularly placed objects?

Raycast on world scene should work, the brush will place objects only when you move the mouse and will check distance moved before placing a new objects, let's say you place one object each 0.2 second.
That's the way some plugins do and it works, you don't need to do raycast each millisecond.

In Godot, the user would have to create a new scene node named for example "layer_detail_object_type_tree1"
Using the brush , each object painted on the level would go to the select node, here all objects painted would be child of node "layer_detail_object_type_tree1" .

When deleting with the brush, user select the brush object to delete and the node, here he sould select a "tree1" slot in the brush options and select the node scene "layer_detail_object_type_tree1" to start deleting objects.

A plugin is lot more than coding a small gameplay GDscript, getting a brush paint in the editor and native instead of plugin would make sense for 3D , like Godot 2D native tools.


99% of people making 3D games will use an object paint brush.


99% of people making 3D games will use an object paint brush.

I never have however?

This does seem like it could be a useful node, perhaps a subclass of MultiMesh, but pretending that it is so extremely used is a bit disingenuous....

Perhaps because you only made small arcade games, and never had to quickly duplicate and place detail game objects on a 3D level.
For example grass, rocks, trees , houses, fences or any game object details.

Like 2D you can paint tiles anywhere, in 3D this is a object quick brush tool.

@DevMagicLord in 2D you can paint tiles anywhere... on a TileMap ;)

Such plugins are over complicated in Godot and there is no tutorials, otherwise i could had made a quick brush plugin.

This feature can be very nice for work with CSG primitives. Upvoted. Is tedious duplicate continually with Ctrl + D and move with the arrows.

Meanwhile, I worked on this addon: https://github.com/Zylann/godot_scatter_plugin

@Zylann This looks great! It looks like it is working well as a plugin, but I think we should try to get something like this merged into the core engine.

But thats just my opinion. I also think something like your terrain system should be built-in too...

Feature and improvement proposals for the Godot Engine are now being discussed and reviewed in a dedicated Godot Improvement Proposals (GIP) (godotengine/godot-proposals) issue tracker. The GIP tracker has a detailed issue template designed so that proposals include all the relevant information to start a productive discussion and help the community assess the validity of the proposal for the engine.

The main (godotengine/godot) tracker is now solely dedicated to bug reports and Pull Requests, enabling contributors to have a better focus on bug fixing work. Therefore, we are now closing all older feature proposals on the main issue tracker.

If you are interested in this feature proposal, please open a new proposal on the GIP tracker following the given issue template (after checking that it doesn't exist already). Be sure to reference this closed issue if it includes any relevant discussion (which you are also encouraged to summarize in the new proposal). Thanks in advance!

Was this page helpful?
0 / 5 - 0 ratings