13 Commits

Author SHA1 Message Date
Marc Gilleron
b9c9b2bcee Schedule tasks more directly, remove VoxelServer data copies 2022-05-22 00:18:58 +01:00
Marc Gilleron
19a69b059e VoxelInstancer supports VoxelTerrain, although Godot 4 multimeshes are buggy
See https://github.com/godotengine/godot/issues/56357
2022-04-09 20:40:03 +01:00
Marc Gilleron
f631d8880c Added configuration warnings to resources 2022-03-06 01:10:47 +00:00
Marc Gilleron
08f3786ff6 Use typed code instead of strings in property hints 2022-01-16 16:04:25 +00:00
Marc Gilleron
b67ca3d903 Namespaced every registered class 2022-01-09 22:16:44 +00:00
Marc Gilleron
267bde13fb Added gi_mode property to VoxelNode to specify GI behavior 2021-12-16 00:11:11 +00:00
Marc Gilleron
35f09b7f72 Fix stack overflow when instancing a terrain node in editor 2021-12-14 01:28:10 +00:00
Marc Gilleron
922f361cb0 Made it compile in Godot 4
- Made a bunch of changes to comply with Godot 4 API
- Use Godot's Vector3i and add the missing stuff with helper functions
- Transvoxel uses custom attributes API, the old way would not work
- Wrap MeshOptimizer in a unique namespace (see build script why)
- Added clang-format file for the module as some rules now differ
- Prevent thirdparty code and lookup tables from being clang-formatted
- Very likely full of runtime bugs that need fixing
2021-12-13 21:38:10 +00:00
Marc Gilleron
966c2c9fef Change default channel attribution when using get_voxel_tool()
- It now depends first on the mesher
- If no mesher is assigned, it depends on the generator
- If no generator is assigned, it depends on the stream
- If no stream is assigned, it defaults to 0
- If multiple channels are found, pick the first one instead of last
- The reason is, some streams can support all channels so they dont
  represent well what the user intends to use.
2021-07-10 20:27:55 +01:00
Marc Gilleron
614fc8b9dd Don't warn if the generator is a non-tool script
Scripts without `tool` don't run in the editor. This should be
considered user choice rather than a mistake. The fact other checks
cannot run is an expected consequence.
2021-06-14 19:06:30 +01:00
Marc Gilleron
6075476fd8 Fix wrong variable, caused null access 2021-01-17 18:27:38 +00:00
Marc Gilleron
4ec60074bb Refactor generators and streams
- VoxelGenerator no longer inherit VoxelStream
- VoxelStream is now more focused on files
- Nodes have separate stream and generator properties
- Generators use 2 dedicated threads instead of sharing a single one with streams
- TODO Image.lock() is problematic for multithreading
- TODO Voxel graph can cause RWLock contention if edited while it runs
- TODO Saving generator output no longer works, need to put it back
2021-01-17 17:18:05 +00:00
Marc Gilleron
6d9fd2f8a0 Voxel terrain nodes now have a common abstract base class. Also explicitely made a few other classes abstract 2020-12-18 22:58:41 +00:00