VoxelOctree

An asset by BraindeadBZH
The page banner background of a mountain and forest
VoxelOctree hero image

Quick Information

0 ratings
VoxelOctree icon image
BraindeadBZH
VoxelOctree

A plugin for the Godot Engine to create voxel based meshes using an octree for optimization and a JSON based language for procedural shape creation.

Supported Engine Version
3.0
Version String
1.3
License Version
MIT
Support Level
community
Modified Date
6 years ago
Git URL
Issue URL

Voxel Octree

Voxel Octree is an easy to use Godot Engine plugin to create voxel based meshes. The plugin use an octree to optimize the rendering and a procedural language, based on JSON, to quickly create shapes.

How to use

After installing the plugin, through the AssetLib or manually, just search for the 'VoxelOctree' node under Spatial/VisualInstance/GeometryInstance/MeshInstance. Once the node is added to your scene, you can select your shape file with the source parameter and the shape will appear in the editor. The second parameter called 'Resolution' is to give the size of a voxel in Godot's 3D unit.

How to write shape

Here is an example of shape to draw a chair:

{
  "size" : 16,
  "shapes": [
    {"type": "cube", "position": [0,  0, 0], "extent": [1, 16, 1]},
    {"type": "cube", "position": [7,  0, 0], "extent": [1, 16, 1]},
    {"type": "cube", "position": [7,  0, 7], "extent": [1,  6, 1]},
    {"type": "cube", "position": [0,  0, 7], "extent": [1,  6, 1]},
    {"type": "cube", "position": [0,  6, 0], "extent": [8,  1, 8]},
    {"type": "cube", "position": [0, 15, 0], "extent": [8,  1, 1]},
    {"type": "cube", "position": [0, 11, 0], "extent": [8,  1, 1]},
  ]
}

Here is another example of shape to draw a sphere:

{
  "size" : 32,
  "shapes": [
    {"type": "sphere", "position": [0, 0, 0], "radius": 16}
  ]
}

Here is another example of shape to draw a cylindre:

{
  "size" : 32,
  "shapes": [
    {"type": "cylindre", "position": [0, 0, 0], "radius": 16, "length": 32, "orientation": "z"},
  ]
}

Here is another example of shape to make cylindrical holes in a cube:

{
  "size" : 32,
  "shapes": [
    {"type": "cube", "position": [0, 0, 0], "extent": [32, 32, 32]},
    {"type": "cylindre", "position": [0, 8, 8], "radius": 8, "length": 32, "orientation": "x", "invert": true},
    {"type": "cylindre", "position": [8, 0, 8], "radius": 8, "length": 32, "orientation": "y", "invert": true},
    {"type": "cylindre", "position": [8, 8, 0], "radius": 8, "length": 32, "orientation": "z", "invert": true},
  ]
}

As said the format is based on JSON, and the root is an object containing the following properties:

  • size: this is the size of your voxel canvas in number of voxel on the three axis. Due to using Octree, the canvas has to be a cube and the size has to be a power of 2.
  • shapes: this is an array of shapes describing how to build your final shape.
    • type: can be "cube", "cylindre" or "sphere".
    • position: three dimensional position of the shape's origin in the canvas.
    • extent (cube only): dimension of the cube in all three dimensions.
    • radius (sphere or cylindre): dimension of the radius.
    • length (cylindre only): dimension of the cylindre along the orientation axis.
    • orientation (cylindre only): axis along which the cylindre will be extended.
    • invert (optional, default: false): if true, voxels inside the shape will be removed, otherwise voxels are added.

License

MIT

A plugin for the Godot Engine to create voxel based meshes using an octree for optimization and a JSON based language for procedural shape creation.

Reviews

0 ratings

Your Rating

Headline must be at least 3 characters but not more than 50
Review must be at least 5 characters but not more than 500
Please sign in to add a review

Quick Information

0 ratings
VoxelOctree icon image
BraindeadBZH
VoxelOctree

A plugin for the Godot Engine to create voxel based meshes using an octree for optimization and a JSON based language for procedural shape creation.

Supported Engine Version
3.0
Version String
1.3
License Version
MIT
Support Level
community
Modified Date
6 years ago
Git URL
Issue URL

Open Source

Released under the AGPLv3 license

Plug and Play

Browse assets directly from Godot

Community Driven

Created by developers for developers