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
1fbe9c4731
Rename VoxelBuffer.optimize() => compress_uniform_channels()
2022-01-09 23:40:07 +00:00
Marc Gilleron
b67ca3d903
Namespaced every registered class
2022-01-09 22:16:44 +00:00
Marc Gilleron
38baeae2d9
Namespaced VoxelBufferInternal
2022-01-08 22:49:59 +00:00
Marc Gilleron
0fee995c0f
Namespaced godot utility funcs
2022-01-03 23:52:54 +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
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
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
176f46440f
Merge meshing and generation thread pools, expecting better usage of available threads
2021-09-21 19:32:29 +01:00
Marc Gilleron
58d365d2bf
Profiling scopes
2021-09-09 18:53:22 +01:00
Marc Gilleron
026c14fcb5
Added importer to import vox files into a single mesh
...
- New importer, needs restart to switch but it's a limitation of Godot
- Might blow up if the scene spans a really big area, may be optimized in the future.
- The scene importer remains the default choice
- Promoted some ints to 64-bit to avoid oveflowing with large volumes or distances
- Handle a few cases of malloc failure
2021-08-14 16:49:46 +01:00
Marc Gilleron
f74d29280a
Fix channel enum names
2021-06-16 23:35:05 +01:00
Marc Gilleron
19f440527e
Implemented VoxelToolTerrain.for_each_voxel_metadata_in_area
2021-06-16 23:31:00 +01:00
Marc Gilleron
dc4569408d
Fix wrong conditional
2021-06-11 18:43:57 +01:00
Marc Gilleron
1ee5bcb80d
Renamed Rect3i -> Box3i
2021-05-31 17:12:04 +01:00
Marc Gilleron
411be94559
Renamed ArraySlice -> Span
2021-05-31 16:48:49 +01:00
Marc Gilleron
74e89b882e
Implemented texture painting on all VoxelTools using faster access to voxels
2021-05-29 23:28:11 +01:00
Marc Gilleron
c0955bb317
Use storage func, remove redundant one
2021-05-29 23:24:36 +01:00
Marc Gilleron
a4f01b096e
Moved some storage functions out of VoxelBuffer
2021-05-29 23:23:18 +01:00
Marc Gilleron
4cc47b9036
Extracted some functions from VoxelBuffer, optimized copy/paste a little
2021-05-24 23:23:50 +01:00
Marc Gilleron
983b7bd83d
Merge branch 'master' into smooth_texturing
...
# Conflicts:
# util/godot/funcs.h
2021-05-22 19:43:39 +01:00
Marc Gilleron
9b3263d68b
Fix copy
2021-05-15 16:31:36 +01:00
Marc Gilleron
40452c6d31
Getting a voxel out of bounds from a buffer is now an error
2021-05-08 20:36:58 +01:00
Marc Gilleron
d5bd6c794b
Merge branch 'master' into smooth_texturing
2021-05-07 21:48:11 +01:00
Marc Gilleron
d53e7dd530
Fixed several bugs related to VoxelTool::paste()
...
- One of the Rect3i constructors was wrong
- Rewrite clipping logic of VoxelBuffer::copy_from
- Fix VoxelDataMap::paste to provide correct offsets
- Fix meshing data copy to account for clipping adjustments
2021-05-07 18:38:02 +01:00
Marc Gilleron
ef448263c0
Merge branch 'master' into smooth_texturing
...
# Conflicts:
# storage/voxel_buffer.cpp
2021-05-02 23:11:57 +01:00
Marc Gilleron
73aed51ea2
Optimized 16-bit voxel box copies (used when meshing)
2021-05-02 19:23:07 +01:00
Marc Gilleron
b33a432b3d
Optimized is_uniform
for the case a buffer has not been compressed yet
2021-04-24 21:23:40 +01:00
Marc Gilleron
dc2f853b50
First version of texturing for Transvoxel. Needs optimization and tooling.
2021-04-21 18:26:40 +01:00
Marc Gilleron
5766bc8b94
Merge branch 'master' into lod_fade_v2
...
# Conflicts:
# README.md
# editor/about_window.cpp
2021-03-27 01:48:36 +00:00
Marc Gilleron
c90dc1b056
Formatting
2021-03-14 18:46:15 +00:00
Marc Gilleron
e52df732bb
Fix wrong default value when uniform channels are compressed
2021-03-12 23:41:57 +00:00
Marc Gilleron
ea1d617371
Implemented "chunking" of requested blocks in graph generator
...
so range analysis can remain precise enough even with larger blocks
2021-03-12 23:40:38 +00:00
Marc Gilleron
8adbe86da6
Formatting
2021-03-12 23:37:37 +00:00
great90
94755ae420
Fix dead loop in 'VoxelBuffer::for_each_voxel_metadata_in_area' and 'VoxelBuffer::clear_voxel_metadata_in_area'
2021-03-05 18:08:39 +08:00
Marc Gilleron
31e5130708
Remove unreachable return
2021-02-21 18:21:05 +00:00
Marc Gilleron
f1e2ea9ad4
Update to latest Godot's threading primitives
2021-02-19 01:30:22 +00:00
Marc Gilleron
158715922d
Fix retrieving from cache
...
It should have made a copy and the input should have been populated
instead of being replaced (because it wouldn't hold the ref)
2021-01-30 01:33:55 +00:00
Marc Gilleron
414f6cc305
Fix sdf_scale not defaulting according to the real default channel depth
2021-01-24 14:48:25 +00:00
Marc Gilleron
55a38957b5
Added SDF scale to VoxelTool. Default value should work best with default bit depth.
2021-01-24 13:54:38 +00:00
Marc Gilleron
5fdc4b6485
Debug check and some formatting
2020-12-29 22:14:49 +00:00
Marc Gilleron
c8c3886c6f
Voxels now use 16-bit by default on the SDF and TYPE channels
2020-12-24 23:12:36 +00:00
Marc Gilleron
a12144304f
Optimized Transvoxel (nearly twice as fast), also allowing 16, 32 and 64 bit precision
2020-12-23 02:27:54 +00:00
Marc Gilleron
89abb37e0f
consts
2020-12-18 20:52:09 +00:00
Marc Gilleron
dec9b31801
Rename index() to get_index() to make it less like a variable name
2020-12-18 20:48:08 +00:00
Marc Gilleron
87e575e504
Use reinterpret_cast instead of ambiguous C-style cast
2020-12-18 20:46:54 +00:00
Marc Gilleron
6c80da0425
Moved VoxelBuffer and VoxelMemoryPool under storage/ directory
2020-09-14 19:33:02 +01:00