157 Commits

Author SHA1 Message Date
Marc Gilleron
2b610f83e3 Fix GCC warning 2022-02-05 17:12:31 +00:00
Marc Gilleron
f1694b08ec Remove a few unnecessary usages of the wrapper version of VoxelBuffer 2022-02-03 00:02:10 +00:00
Marc Gilleron
437540da0b Moved VoxelRefCount to utils 2022-01-31 21:29:08 +00:00
Marc Gilleron
d1250ef0ad Added support functions to help setting up basic multiplayer with VoxelTerrain.
These might change in the future. Will have to test that later,
when Godot 4 gets more stable.
2022-01-31 21:23:39 +00:00
Marc Gilleron
08f3786ff6 Use typed code instead of strings in property hints 2022-01-16 16:04:25 +00:00
Marc Gilleron
f8b8b27ff2 Renamed Voxel => VoxelBlockyModel, VoxelLibrary => VoxelBlockyLibrary 2022-01-09 23:27:38 +00:00
Marc Gilleron
b67ca3d903 Namespaced every registered class 2022-01-09 22:16:44 +00:00
Marc Gilleron
774adfca3c VoxelServer no longer inherits Object.
The Godot-facing singleton is now a different class in gd:: namespace.
Moved the updater to its own file.
2022-01-09 04:53:33 +00:00
Marc Gilleron
e53dcf7c84 Re-namespaced VoxelConstants 2022-01-09 03:06:58 +00:00
Marc Gilleron
38baeae2d9 Namespaced VoxelBufferInternal 2022-01-08 22:49:59 +00:00
Marc Gilleron
e20684ce69 Namespaced math funcs 2022-01-03 23:14:18 +00:00
Marc Gilleron
0ff835d7ec Namespace ProfilingClock 2022-01-03 01:40:13 +00:00
Marc Gilleron
0f67513a29 Move TimeSpreadTaskRunner to its own file and namespace 2021-12-29 15:12:28 +00:00
Marc Gilleron
ea74c1f05f Fix wrong class name specified in VoxelTerrain material properties 2021-12-28 04:09:47 +00:00
Marc Gilleron
0bf72badbd Fix dangling mesh block position upon removal from map, when such block had a pending update 2021-12-16 22:59:31 +00:00
Marc Gilleron
0bea05824a Formatting 2021-12-16 22:17:52 +00:00
Marc Gilleron
f67077b698 Fix wrong condition for unloading mesh blocks 2021-12-16 22:17:20 +00:00
Marc Gilleron
03d3016ecf Remove some pre-set resource properties to fix a Godot4 warning (sorry) 2021-12-16 01:30:31 +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
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
ca7ac42cde Merge branch 'master' into full_load_mode
# Conflicts:
#	edition/voxel_tool_lod_terrain.cpp
#	generators/graph/voxel_generator_graph.cpp
#	terrain/voxel_lod_terrain.cpp
2021-10-31 16:17:27 +00:00
Marc Gilleron
6441d1b864 Deprecate Vector3i(Vector3) constructor, make conversions explicit
Some conversions were wrong/unintented.
This is also in prevision of using Godot 4 Vector3i,
which default behavior differs from this module.
2021-10-31 16:01:47 +00:00
Marc Gilleron
3133834a17 Check AABB size before using it 2021-10-27 19:49:37 +01:00
Marc Gilleron
a226111818 Run edits after preloads without a sync point on the main thread
- Still room for improvement, more parallelism is possible
- Started moving the data into its own structure
- Added locks to secure access to the data map (not truly used yet)
- Tasks with a tracker can schedule next ones when they complete
- Data loading responses also come with a callback, no buffer anymore
- Use new data grid to cache map access
2021-10-13 20:28:20 +01:00
Marc Gilleron
16b7445d1d Changing data block size is not supported at the moment 2021-10-03 01:28:29 +01:00
Marc Gilleron
30db0c5193 Split VoxelBuffer in two, script-facing wrapper and internal.
The internal is the main use within the voxel engine,
and does not inherit Reference.
2021-09-26 04:14:50 +01:00
Marc Gilleron
3197eaba35 Move main thread tasks into one runner in VoxelServer
So the timing budget is better respected even if there are multiple
voxel nodes in the scene
2021-09-25 00:02:41 +01:00
Marc Gilleron
64646d06ed Split VoxelTerrain process into functions 2021-09-09 18:54:15 +01:00
Marc Gilleron
7cb1e4008e Use accessor 2021-08-15 17:27:55 +01:00
Marc Gilleron
bab5436de7 Fix materials shown under wrong category 2021-08-01 15:40:41 +01:00
Marc Gilleron
8c17a1cf20 Added property to configure collision margin 2021-07-10 22:14:17 +01: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
233e2c7267 Exposed data block size 2021-06-16 23:30:09 +01:00
Marc Gilleron
0c13bd4b2d Fix mismatch in signal arguments 2021-06-16 23:29:59 +01:00
Marc Gilleron
d436ed430f Fix world edge issue, mesh block area was not clipped 2021-06-13 19:00:47 +01:00
Marc Gilleron
9e76eec951 Another one 2021-06-13 18:13:11 +01:00
Marc Gilleron
1ee5bcb80d Renamed Rect3i -> Box3i 2021-05-31 17:12:04 +01:00
Marc Gilleron
fa48523073 Added collision layer and mask properties 2021-05-09 20:49:45 +01:00
Marc Gilleron
650089de8f Don't try to save if there is no stream attached 2021-05-08 17:56:43 +01:00
Marc Gilleron
b846194bea Fix some GCC warnings 2021-04-18 01:29:26 +01:00
Marc Gilleron
2467471de2 Remove old code 2021-04-15 20:30:00 +01:00
Marc Gilleron
96bcc44d00 Removed VoxelMap and VoxelBlock, superseded by their specialized versions 2021-04-15 20:25:55 +01:00
Marc Gilleron
63d9361a87 Split refcounts 2021-04-15 20:25:03 +01:00
Marc Gilleron
f7d0039811 Added mesh block size setter to VoxelTerrain 2021-04-15 20:00:41 +01:00
Marc Gilleron
1449560f29 Implemented decoupling on VoxelTerrain (no setter yet) 2021-04-13 23:48:35 +01:00
Marc Gilleron
758e3bd227 Allow to use block size 32 for mesh blocks while using 16 for data blocks
Still hardcoded but a config should be added
2021-04-03 20:39:37 +01:00
Marc Gilleron
05c35caa92 Added categories to terrain properties 2021-03-27 16:38:52 +00:00
Marc Gilleron
31c02ad6ee Fix VoxelTerrain being left invisible due to new defaults 2021-03-12 23:35:59 +00:00
Marc Gilleron
76ec90fe34 Moved constants and tables under a folder 2021-02-21 23:58:00 +00:00
Marc Gilleron
d1207bdd96 Reorganized some utility files 2021-02-17 20:34:35 +00:00