116 Commits

Author SHA1 Message Date
Marc Gilleron
602ae1ea95 Don't crash if no materials are specified 2022-05-17 23:10:11 +01:00
Marc Gilleron
fa027cbe4e Allow to specify which surfaces have collision 2022-05-17 22:12:54 +01:00
Marc Gilleron
12862a46d0 Changes to blocky materials
- They are now defined in each model
- VoxelTerrain no longer has material slots, except for a global override
- Models can have up to 2 materials instead of only one
2022-05-16 22:55:06 +01:00
Marc Gilleron
09d0be21e2 Remove remaining usages of HashMap 2022-05-14 19:38:39 +01:00
Trey M
96916814de Fixed issues caused by changes to HashMap in godot 2022-05-13 00:14:03 -05:00
Marc Gilleron
adbfd3b584 floor_to_int to emphasize the return value converts to int 2022-05-02 14:49:40 +01:00
Marc Gilleron
4e3d4d4ed8 Threading classes wrappers 2022-04-19 00:32:37 +01:00
Marc Gilleron
bfa24402ac Renamed util/funcs.h => container_funcs.h 2022-04-14 21:43:45 +01:00
Marc Gilleron
87d98e9162 Engine-agnostic error macros 2022-04-11 02:10:44 +01:00
Marc Gilleron
ab5d3a22d3 Abstract logging for verbose print 2022-04-09 15:00:34 +01:00
Marc Gilleron
5519054c01 Unify macro prefixes 2022-04-06 23:26:54 +01:00
Marc Gilleron
4c68e7b298 Comments 2022-03-15 00:18:44 +00:00
Marc Gilleron
750fbeda53 Fix signedness warning 2022-03-06 01:16:25 +00:00
Marc Gilleron
f631d8880c Added configuration warnings to resources 2022-03-06 01:10:47 +00:00
Marc Gilleron
0137ca3036 Namespaced VoxelBuffer in gd:: because it is actually a wrapper 2022-02-15 21:49:20 +00:00
Marc Gilleron
48081faf03 Use real_t in most utils, use 32-bit floats in meshers.
This is a first step to supporting double-precision floats in Godot.
Meshers don't need doubles because vertices, normals and UVs should
never span large enough areas while needing such amount of precision.
Besides, it costs a lot more memory and processing.
2022-02-14 00:11:41 +00:00
Marc Gilleron
08f3786ff6 Use typed code instead of strings in property hints 2022-01-16 16:04:25 +00:00
Marc Gilleron
2a36f3fd1c Make guards match 2022-01-10 22:56:45 +00:00
Marc Gilleron
1fbe9c4731 Rename VoxelBuffer.optimize() => compress_uniform_channels() 2022-01-09 23:40:07 +00:00
Marc Gilleron
f8b8b27ff2 Renamed Voxel => VoxelBlockyModel, VoxelLibrary => VoxelBlockyLibrary 2022-01-09 23:27:38 +00:00
Marc Gilleron
f859ec1922 Share array length macro 2022-01-09 22:50:15 +00:00
Marc Gilleron
b67ca3d903 Namespaced every registered class 2022-01-09 22:16:44 +00:00
Marc Gilleron
5aa64f464e Re-namespaced Cube 2022-01-09 03:27:30 +00:00
Marc Gilleron
9c653b8a9f Namespaced FixedArray 2022-01-09 02:53:21 +00:00
Marc Gilleron
1f579cf860 Namespaced blocky and cubes internal functions 2022-01-04 00:17:56 +00:00
Marc Gilleron
e20684ce69 Namespaced math funcs 2022-01-03 23:14:18 +00:00
Marc Gilleron
2bab7c39bd Namespace DynamicBitset 2022-01-03 01:23:54 +00:00
Marc Gilleron
4d2fe30661 Use Time singleton 2021-12-29 17:06:24 +00:00
Marc Gilleron
c5edb8368a Fix library property not shown in inspector 2021-12-28 04:09:18 +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
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
688b8b9a7b Fix inspector properties not refreshed when changing the geometry type of a Voxel resource 2021-12-11 21:37:09 +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
2fda5747c6 Comments 2021-09-13 00:19:51 +01:00
Marc Gilleron
466bc41ab8 Comments 2021-07-25 20:37:47 +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
411be94559 Renamed ArraySlice -> Span 2021-05-31 16:48:49 +01:00
Marc Gilleron
251d92d9c6 Fix ambiguous calls after upstream change in Godot 3.x 2021-05-22 20:33:56 +01:00
Marc Gilleron
efe8bcf9c0 Show a configuration warning when a mesher does not support LOD 2021-05-15 23:41:19 +01:00
Marc Gilleron
76ec90fe34 Moved constants and tables under a folder 2021-02-21 23:58:00 +00:00
Marc Gilleron
f1e2ea9ad4 Update to latest Godot's threading primitives 2021-02-19 01:30:22 +00:00
Marc Gilleron
d1207bdd96 Reorganized some utility files 2021-02-17 20:34:35 +00:00
Marc Gilleron
1a8cc4380f Fix normalmaps in blocky mesher 2021-01-22 19:18:26 +00:00
Marc
f61758b476
Merge branch 'master' into master 2021-01-21 23:50:59 +00:00
Marc Gilleron
791bdafff1 Meshers are now resources assigned on terrain nodes 2020-12-18 21:01:50 +00:00
Rathma
8d42c84e1a Added 3x the number of tangents we actually needed 2020-12-14 03:25:28 -05:00
Rathma
fdc14fcd87 Switched tangents to on by default & changed to a passed value to the
bake method rather than being a property of the voxel
2020-11-11 21:58:50 -05:00
Rathma
c9c85ec7cd Tangent baking now optional by toggling in editor under VoxelLibrary 2020-11-09 20:45:56 -05:00
Rathma
c068ad7455 Forgot to clear some tangents in the BakedData class. 2020-11-09 19:51:21 -05:00
Rathma
fd07f76586 Changed real_t => float for all tangent related variables(for real this time) 2020-11-09 01:07:59 -05:00