Voxel plugin for the Godot game engine!

Voxel-Core

Version AssetLibrary Godot-Awesome License

Voxel plugin for the Godot game engine!


About

Voxel-Core is a voxel plugin for the Godot game engine made with GDScript, created as the ‘core’ for my other project Voxly, offering various voxel features, utilities and fully fledged in-engine editors.

Why Voxel-Core?

  • Create, import and edit voxel content in-engine and in-game
  • Runs anywhere Godot does (e.g. desktop, web, mobile, etc.)
  • Great for voxel objects (e.g. characters, creatures, props, etc.)
  • Designed to be easily extended, modify and expand Voxel-Core to meet your needs

Features (Video)

  • VoxelObject, is a new MeshInstance type that is used to visualize voxel content
    • Easily embed self-maintaining StaticBodies
    • Fully automatic UV Mapping, creating textured voxel content has never been easier
    • Meshing modes: naive meshing, for creating quick culled meshes; greedy meshing, for creating optimized meshes
  • VoxelSet, a Resource, much like a TileSet, that stores voxels, textures and materials used by VoxelObjects
    • Create an almost infinite variety of voxels
    • Define SpatialMaterials and Shaders for one or more voxels
    • Set colors, textures, materials and more on a voxel or per face basis
  • In-Engine Editors, making the creation and modification of voxel content a simple matter
    • Integrated keyboard shortcuts and undo/redo support throughout
    • VoxelObjectEditor, create and modify voxel content in-scene
      • Offers many operations, such as: adding, removing, swapping, filling and more
      • Apply operations individually, by area or by face / extrusion
      • Mirror operations over x, y and z axis
      • Import files, apply effects and more...
    • VoxelSetEditor, create, modify and manage your VoxelSets
      • Add, remove, duplicate voxels
      • Live interactive 3D and 2D voxel preview
      • Many options to get the specific look you want from your voxel
  • Readers, used to import files as both static and dynamic voxel content
    • Fully integrated with the editor, automatically recognizes and imports files as voxel content
    • Image files (jpg, png, and any other supported raster format), quickly create 3D prototypes from 2D content
    • Vox files (MagicaVoxel), making it easy and simple to work back and forward between programs
    • Color palette files (images, vox, gpl, etc.), allows you to work with the same color palettes across platforms

Wiki / Usage

Getting Voxel-Core

Godot Asset Library (Godot Doc)

Preferably, Voxel-Core is available in the Godot Asset Library, allowing you to add it directly to your project from within Godot. Create or open an existing project and press on the 'AssetLib' tab found at the top of the editor. Once the asset library has loaded, search for 'Voxel-Core'. The top result should be this plugin, press on it and you'll be given the option to download Voxel-Core. Press to download and once it's completed Godot will ask you to select what you'd like to install. If you only want the plugin then only select the addons folder, but you can also choose to install anything else in this repository such as the examples folder.

Clone / Download

If for whatever reason you don't want to or can't download Voxel-Core via the in-engine Godot asset library, then you can always clone or download this repository directly. Once you've cloned or downloaded this repository, you can import it directly into Godot as a project to view the various examples and edit them directly. You may as well move the plugin's folder directly into your own project’s addons folder.

NOTE: After adding Voxel-Core to your project you'll need to activate it in your project's Plugins configuration!


Asset Library MIT LICENSE

Owner
Christian Cuevas
Full-stack developer with a burning passion for game development
Christian Cuevas
Comments
  • VoxelObject Editor closes when selecting

    VoxelObject Editor closes when selecting "Edit"

    Creating a VoxelObject and drawing works,

    After that I can't edit a VoxelObject see here:

    https://user-images.githubusercontent.com/1045946/147395282-15d9951b-6b35-40dd-b04f-f92833a8f186.mp4

    Using Godot 3.4.2

  • Migrate to GDScript 2

    Migrate to GDScript 2

    Begin migration to Godot 4.0. All gdscript has been (naively) translated to gdscript 2. Plugin currently crashes the editor with a stack overflow on startup, so this should probably be merged into a temporary branch.

  • VoxelObject Menu closing after modfiying voxels in VoxelSet

    VoxelObject Menu closing after modfiying voxels in VoxelSet

    Hello i have a rather annoying issue. After modifying things in the VoxelSet menu of an VoxelMesh such as adding/removing/modifying voxels, if i go to the VoxelObject and click on edit mode, voxel raycast or update button the voxel menu disapears. Here is a video showing the problem.

    https://user-images.githubusercontent.com/56770939/121010013-233a2600-c795-11eb-82fd-2b5fba433aa3.mp4

  • Color picker, isn't working

    Color picker, isn't working

    Screen Shot 2021-04-18 at 5 58 24 PM

    When ever I click outside of that grey box, the window closes so I can't choose a color or add to voxel set.

    I have a Mac so maybe the formatting is different.

  • VoxelWorldSize does not exist

    VoxelWorldSize does not exist

    In your examples you refer to Voxel.VoxelWorldSize. But this does not exist. (Invalid get index.)

    Adding this to voxel.gd fixes it. Should be maybe variable.

    const VoxelWorldSize = 0.5
    

    Great project btw. 👍

  • Vox importer rewrite. New features and fixes

    Vox importer rewrite. New features and fixes

    A rewrite on the vox file importer, with minor additions, tweaks and fixes to the other importers, and voxel objects. Importer partially based on: https://github.com/jpaver/opengametools/blob/master/src/ogt_vox.h

    The main new feature is the ability to fully import Magica Voxel files as scenes, while keeping all groups and objects separate. This allows for a faster workflow with Magica Voxel, skipping previously required import steps, when importing complex vox files.

    This PR also fixes a missing sRGB flag on the default material, wrong forward orientation for imported voxel models, and incompatibility with newer vox files. It also introduces a new option for a per-model voxel size, and allows for more control over centering on import.

    sRGB Color, and Vox compatibility example:

    | Old | New | | ---------- | ---------- | | ColorAndFacingOld | ColorAndFacingNew | | CharOld | CharNew |

    As seen in the pictures, the forward direction is also changed. Previously the vox importer kept Magica Voxels x axis direction, but as a result models faced backwards by default. The new importer flips the x-axis, keeping the forward direction from Magica Voxel aligned to Godots -z forward direction.

    New import options, and importer:

    | import options | new importer | imported vox file, with new importer | | ---------- | ---------- | ---------- | | OptionsNew | SceneImporter | ImportedScene |

    The "Voxel Size" is now no longer global, and can be set per object. This works with voxel meshes, as well as voxel objects, and the voxel editor. A new editor option has been added, to re-scale the voxels while editing.

    The new Magica Voxel Scene importer imports a vox file as seperate objects, keeping all included groups, shapes, and their respective transforms and names. Shapes are imported as Mesh Instances, and Groups as Spatials. This feature was the key reason for starting this PR, as it drastically speeds up the workflow in my current project.

    Note: In it's current form this PR is a WIP. While all features I set out to add are present, it has not yet been tested thoroughly enough to be considered production ready. I would appreciate testing and feedback.

  • Unable to load addon script from path with Zylann's godot_voxel module build

    Unable to load addon script from path with Zylann's godot_voxel module build

    Hello,

    When I build godot with this module https://github.com/Zylann/godot_voxel I get the error,

    Unable to load addon script from path: 'res://addons/voxel-core/voxel-core.gd' There seems to be an error in the code, please check the syntax.

    With the output being: - res://addons/voxel-core/classes/voxel_set.gd:52 - Parse Error: Non-static function "set_name" can only be called from an instance. - modules/gdscript/gdscript.cpp:583 - Method failed. Returning: ERR_PARSE_ERROR - res://addons/voxel-core/classes/voxel_object.gd:502 - Parse Error: The class "VoxelSet" couldn't be fully loaded (script error or cyclic dependency). - modules/gdscript/gdscript.cpp:583 - Method failed. Returning: ERR_PARSE_ERROR - res://addons/voxel-core/voxel-core.gd:17 - Parse Error: Couldn't fully preload the script, possible cyclic reference or compilation error. Use "load()" instead if a cyclic reference is intended. - modules/gdscript/gdscript.cpp:583 - Method failed. Returning: ERR_PARSE_ERROR

    Is there any way I could fix this?

  • Voxel Materials

    Voxel Materials

    Add the ability for Voxels to define their own material attributes per face, such as metallic, roughness, emission among others

    • [x] metallic
    • [x] specular
    • [x] roughness
    • [x] emission
      • [x] energy
      • [x] color
  • Mac 2.0 update broke mesh and material editing on voxel objects.

    Mac 2.0 update broke mesh and material editing on voxel objects.

    As title says. im on a Mac on godot version 3.2.1 and voxelcore 2.0.0. I can confirm that updating a voxelcore's shader material won't save persistently however it applies it perfectly (?). And whenever I try to manually see mesh options the entire node deselects on the editor tree indicating a thread crash.

  • docs?

    docs?

    Just started learning godot (today) so maybe it'll be more obvious once I learn it, but maybe add some docs or a tutorial guide?

    Doesn't need to be fancy, just a quick guide on how to do what you did in your intro video might be enough.

  • VoxelLayeredMesh

    VoxelLayeredMesh

    VoxelObject which is composed of n layers.

    • Layers : Array
    • Layer
      • name : String = 'layer_' + n
      • type : VoxleObject = VoxelMesh
      • data : Dictionary<Vector3, Dictionary> = {}
  • Voxel-Set: support for costum voxel meshes

    Voxel-Set: support for costum voxel meshes

    I would like to see support for custom meshes within voxel sets. Similar to chests/Grindstones or other special blooks in minecraft. If adding fully-custom meshes is a bit too much, I'd also find a "billboard-mode" for objects like flowers, grass, chains and so on pretty helpful.

    (see demonstration below) image

  • Static Body Voxel Mesh is not Threadsafe

    Static Body Voxel Mesh is not Threadsafe

    VoxelMesh accesses the scene tree and can cause errors while multithreading (if, for example, you want to use it for world generation).

    This only happens when it's marked as static_body, and - from what I can tell - functions to make the generated StaticBody and CollisionShape save with the scene. Having a property to disable that would be nice and should be pretty simple.

  • Godot-mono (3.4) crashes on using VoxelObject

    Godot-mono (3.4) crashes on using VoxelObject

    I get a full crash whenever I try using VoxelObjects in my main scene. I can't seem to find any error output, so unfortunately I haven't the slightest idea why it's crashing as VoxelMesh seems to be working just fine. I will provide any logs or such on request!

  • Raw color/HDR color support

    Raw color/HDR color support

    First of all, love the tool, is amazing to work with.

    I'm not sure if this is a bug or a technical limitation, but if you set your voxels color attribute into HDR space, when placed the color value seems to be clamped back into linear range (see screenshot below, left is voxel placed, right is the voxel placement preview rendering correctly). I haven't looked into the source code but am hoping to later this week to see if I can figure it out. Can use material emission to resolve this, but I think the raw color value workflow should also be valid, so that multiple emission levels can be used while keeping material count to a minimum, and just for convenience.

    image

    EDIT: I feel like I've made some progress, but am still bamboozled. It seems like both the placement preview cube and the voxelmesh are assembled using voxel_tool.gd using SurfaceTool, and are both setting the vertex colors correctly as far as I can tell from debugging, so I can't tell why only the preview mesh is displaying the colors properly. I was thinking it might have to do with how the material on the preview is displayed, but as far as I can tell it's setup in voxel_cursor.gd setup, and doesn't seem to do anything out of the ordinary. For now I feel like I'm at a bit of a dead end, but I'm gonna look at it some more again some other time

  • Improve error handling

    Improve error handling

    Voxel-Core has little to no error handling and what little there is isn't well defined. Corrections and improvements to the error handling throughout the code base are necessary.

Powered by Matterbridge, MatterAMXX is a plugin for AMXX that allows simple bridging between your game servers, Mattermost, IRC, XMPP, Gitter, Slack, Discord, Telegram, and more.
Powered by Matterbridge, MatterAMXX is a plugin for AMXX that allows simple bridging between your game servers, Mattermost, IRC, XMPP, Gitter, Slack, Discord, Telegram, and more.

Powered by Matterbridge, MatterAMXX is a plugin for AMXX that allows simple bridging between your game servers, Mattermost, IRC, XMPP, Gitter, Slack, Discord, Telegram, and more.

Dec 27, 2022
The plugin serves as a starting point for writing a Mattermost plugin

Plugin Starter Template This plugin serves as a starting point for writing a Mattermost plugin. Feel free to base your own plugin off this repository.

Dec 10, 2021
Feb 10, 2022
Cf-cli-find-app-plugin - CF CLI plugin to find applications containing a search string

Overview This cf cli plugin allows users to search for application names that co

Jan 3, 2022
Twitter-plugin - Falco Plugin for Twitter Stream

Twitter Plugin This repository contains the twittter plugin for Falco, which fol

Mar 17, 2022
Tool for extract NSP file from fitgirl-repacks switch emulated game

FITGIRL-REPACKS-NSP This is a tool/executable for Windows to extract Fitgirl Repack switch emulated package game into its own NSP. You may need to get

Dec 25, 2022
a go mini version TCP top on UDP for game connections or others.

sanhua sanhua(三花猫) is kind of cat with black, red and white color. This is a mini version TCP top on UDP, but with out resend lost packet. As we know.

May 31, 2022
A Go library for connecting to HandlerSocket (github.com/ahiguti/HandlerSocket-Plugin-for-MySQL)

handlersocket-go Go library for connecting to HandlerSocket Mysql plugin. See github.com/ahiguti/HandlerSocket-Plugin-for-MySQL/ Installation $ go get

Jan 19, 2021
Yet another SIP003 plugin for shadowsocks, based on Xray-core

Yet another SIP003 plugin for shadowsocks, based on Xray-core Build go build Usage See command line args for advanced usages.

Jan 8, 2023
DipDup plugin for selective metadata indexing

DipDup metadata indexer DipDup service for indexing contract and token metadata. Based on TzKT indexer. For start synchronization of DipDup state TzKT

Nov 25, 2022
Tool for monitoring network devices (mainly using SNMP) - monitoring check plugin
Tool for monitoring network devices (mainly using SNMP) - monitoring check plugin

Thola Description A tool for monitoring network devices written in Go. It features a check mode which complies with the monitoring plugins development

Dec 29, 2022
Protoc plugin to generate contract tests for gRPC in Go

Deal - Go Introduction WE DO NOT SUPPORT THE SERVER SIDE YET This plugin allows us to write Consumer-Driver Contracts tests! Usage example Proto servi

Sep 3, 2022
This plugin allows you to start a local server with hot reloading with Esbuild

esbuild-dev-server This plugin allows you to start a local server with hot reloading with Esbuild Installation npm npm i esbuild-dev-server -D yarn y

Nov 4, 2022
A Caddy v2 plugin to track requests in Pirsch analytics

caddy-pirsch-plugin A Caddy v2 plugin to track requests in Pirsch Analytics. Usage pirsch [<matcher>] { client_id <pirsch-client-id> client_se

Sep 15, 2022
Yet another SIP003 plugin for shadowsocks, based on v2ray

Yet another SIP003 plugin for shadowsocks, based on v2ray Build go build Alternatively, you can grab the latest nightly from Circle CI by logging into

Oct 20, 2021
Naive LEGO helper for SberCloud DNS to be used with the EXEC plugin

Naive LEGO helper for SberCloud DNS Very basic, no any checks performed To be used with the exec plugin as described here Environment variables SBC_AC

Nov 3, 2021
Coredns plugin for relaying .local domains

CoreDNS Local_Query This is a plugin for coredns that was developed to allow for the use of naked hosts in place of .local domains i.e example.local b

Nov 4, 2021
Developing a Traefik plugin using golang

Developing a Traefik plugin Traefik plugins are developed using the Go language. A Traefik middleware plugin is just a Go package that provides an htt

Nov 21, 2021
A plugin of protoc that for using a service of Protocol Buffers as http.Handler definition

protoc-gen-gohttp protoc-gen-gohttp is a plugin of protoc that for using a service of Protocol Buffers as http.Handler definition. The generated inter

Dec 9, 2021