SlugFiller / godot-vector2d

2D vector graphics plugin for Godot
The Unlicense
2 stars 1 forks source link
godot-engine godot3 plugin vector vector-graphics

Vector graphics plugin for Godot

This is a prototype vector graphics and SVG import plugin written for the Godot game engine. This version relies on Godot PR 75278 being merged. For a version implemented using a shader instead see the Godot 3 or Godot 4.0 branches.

Both SVG import and an internal vector shape editor are available as options for creating the shape. Strokes are available using a runtime stroke to fill filter node, and basic linear and radial gradients are implemented in the fill shader.

Usage

Copy the addons folder to your project. Then go to Project->Project Settings...->Plugins and check the checkbox in the Enable column in the Vector 2D Graphics row.

Then either import an SVG normally (e.g. via drag and drop), or create a new shape using the Vector2DShape and Vector2DFill nodes. Note: It is better to first use an SVG as an example for how these nodes work.

Limitations

The vector shape editor is extremely bare bones, and lacks many quality of life features, like automatic smooth handles, box/lasso selection, or scale/rotate for multiple selected points. It also lacks a few necessary basic features.

There are two options to animate a shape:

Due to limitations of Godot's editor, it's not possible to edit multiple shapes at once, even though aligning points between different shapes can be useful.

SVG import limitations

License

Released to the public domain. See UNLICENSE. This only applies to this addon, and not to Godot itself (Obviously).

TODO