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
325406ede1
Decrease MAX_LOD to avoid potential integer overflows
...
I preferred doing this instead of using 64-bit integers,
because I tink there are no use cases for LOD blocks that big
2021-10-28 23:55:46 +01:00
Marc Gilleron
b2315a6cc4
Check earlier for invalid extents
2021-10-28 23:51:30 +01:00
Marc Gilleron
3133834a17
Check AABB size before using it
2021-10-27 19:49:37 +01:00
Marc Gilleron
6cd143d392
Enable collisions by default on VoxelViewer
2021-10-15 22:51:53 +01:00
Marc Gilleron
fcca722d52
Fix signedness
2021-10-13 22:00:42 +01:00
Marc Gilleron
ceb8553e4a
Avoid crash if the argument is invalid (though it's not really a public function)
2021-10-04 20:15:32 +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
6faf5b29f3
Allow to configure main thread time limit
2021-09-25 02:13:03 +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
44f00176d3
Use std::unordered_set instead of Godot Set in VoxelLodTerrain
2021-09-23 23:49:18 +01:00
Marc Gilleron
0838cab251
Don't schedule loadings when streaming is disabled, don't crash when it still happens, log an error instead
2021-09-19 23:12:42 +01:00
Marc Gilleron
c18262d3f8
Added option to turn off random rotation
2021-09-19 21:41:16 +01:00
Marc Gilleron
fd8d107280
Fix is_area_editable
converting twice from voxels to blocks
2021-09-19 03:29:09 +01:00
Marc Gilleron
0c31f5a525
Show octree node gizmos with a color gradient based on LOD
2021-09-18 19:54:54 +01:00
Marc Gilleron
8e53fbaa47
Merge branch 'master' into octree_compression
2021-09-18 18:18:09 +01:00
Marc Gilleron
6a6682dfd5
Fixed crash occurring after a few edits when LOD count is set to 1
2021-09-18 01:36:44 +01:00
Marc Gilleron
2971334e85
Changed VoxelToolLodTerrain to use write_box
...
- Should be faster than get/set_voxel
- No longer expose internal data map
2021-09-17 20:01:15 +01:00
Marc Gilleron
ff4e7f9560
Added debug drawing of mesh octree using multimesh (not exposed for now)
2021-09-16 21:54:04 +01:00
Marc Gilleron
d901eb66b6
Added functions to LodOctree and use squared distances
2021-09-16 21:03:02 +01:00
Marc Gilleron
f68eeac22c
Switch to octree child position formula not involving access to an array
2021-09-16 20:56:56 +01:00
Marc Gilleron
0604a3492d
Comments and formatting
2021-09-16 20:46:55 +01:00
Marc Gilleron
32beb6f8a8
Stop printing in map destructors
2021-09-13 00:20:30 +01:00
Marc Gilleron
2fda5747c6
Comments
2021-09-13 00:19:51 +01:00
Marc Gilleron
3ee79ec068
Should have been min
2021-09-12 00:55:15 +01:00
Marc Gilleron
454d8b2c7f
Fix no instances generated when density is 1 in vertex emission mode
2021-09-11 18:12:55 +01:00
Marc Gilleron
64646d06ed
Split VoxelTerrain process into functions
2021-09-09 18:54:15 +01:00
Marc Gilleron
58d365d2bf
Profiling scopes
2021-09-09 18:53:22 +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
d6e4769f08
Don't run multimesh LOD updates when blocks have item types not supporting that feature
2021-07-28 19:26:14 +01:00
Marc Gilleron
20c6b790bf
Formatting and comments
2021-07-28 19:24:22 +01:00
Marc Gilleron
6d09e181bf
Added menu to update an instancer multimesh item from a scene
2021-07-26 01:39:44 +01:00
Marc Gilleron
27d54a0d5c
Add initial support for instancing scenes with VoxelInstancer
2021-07-25 20:37:30 +01:00
Marc Gilleron
e7e8e72507
Quick fix to avoid error when trying to edit across loaded border.
...
There should be a better solution in the future, it's not optimal
2021-07-25 19:48:51 +01:00
Marc Gilleron
8ae03490fd
Fix VoxelInstancer error when changing visibility
2021-07-25 19:01:32 +01:00
Marc Gilleron
002452cb54
Fix warning (2)
2021-07-19 20:03:08 +01:00
Marc Gilleron
52aa4963ea
Fixed some crashes occurring when giving invalid arguments to functions
2021-07-19 19:04:52 +01:00
Marc Gilleron
619bd977c1
Added extra mode to instance generator for more precise emission from faces
2021-07-11 16:23:54 +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
144affe42d
Fix errors/crashes when trying to edit voxels on loading borders
...
- Replaced fatal asserts with soft asserts
- No longer require existence of a mesh when lodding on loaded border.
As far as voxel data is concerned, it should work just fine.
- Fixed wrong list used when scheduling mesh updates on higher LOD indexes
2021-07-10 20:17:28 +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
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
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
411be94559
Renamed ArraySlice -> Span
2021-05-31 16:48:49 +01:00