219 Commits

Author SHA1 Message Date
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
2f2ab384a6 Better trilinear interpolation 2022-05-02 15:47:31 +01: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
f8198baa2f Fix alpha check 2022-04-22 22:45:15 +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
e9af708c3b Moved some utility functions
- sort goes to math funcs
- math funcs specializations for vector types go to vector files
- use ZN macros in a few more places
2022-04-14 21:22:22 +01:00
Marc Gilleron
9c33eb17d4 Use custom error macros in transvoxel 2022-04-13 23:15:32 +01:00
Marc Gilleron
87d98e9162 Engine-agnostic error macros 2022-04-11 02:10:44 +01:00
Marc Gilleron
219c7bfda3 Changed prefix of profiling macros 2022-04-09 15:33:08 +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
090d3485e5 Use unique pointers in ExpressionParser 2022-04-06 22:00:32 +01:00
Marc Gilleron
ce4224dce8 Fix VoxelMesherCubes color mode in inspector 2022-04-03 22:58:51 +01:00
Marc Gilleron
61b27491f9 Initial implementation of binary search in Transvoxel.
It is very slow but seems to be working. It affines vertex positions,
but normals are not improved. Maybe more work will be done in the future
if that technique becomes more relevant.

Partly based on a prior experiment:
11f716f79d0ade59c0e9547a2333183e96b17b43
2022-03-27 21:36:30 +01:00
Marc Gilleron
d4b1178d61 Fix Transvoxel when the surface lines up with integer coordinates 2022-03-19 22:45:12 +00: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
74ac820846 Remove zero-samples workaround for now.
It created gaps/unshared vertices in the mesh if the isosurface really has
to cross zero because it was done after the early cell rejection.
If we need it again, it will have to be done before the whole
algorithm, but could need more investigation.
2022-02-27 16:54:14 +00:00
Marc Gilleron
284c763a57 Use signed integers when decoding SDF 2022-02-27 04:08:01 +00:00
Marc Gilleron
493b93a051 SDF is now encoded with inorm8 and inorm16 2022-02-26 22:51:29 +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
50555bdedc Use a typed array of materials for build_mesh() API 2022-02-13 17:30:12 +00:00
Marc Gilleron
1b03e799ae Fix comparison signedness warning 2022-02-13 17:29:33 +00:00
Marc Gilleron
f1c59d452a Removed more Vector<T> usages.
Remaining uses are necessary to communicate with Godot APIs.
2022-02-06 22:26:30 +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
20c85e65a7 Re-namespaced OctreeTables and moved to dmc/, it's only used there 2022-01-09 03:34:02 +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
38baeae2d9 Namespaced VoxelBufferInternal 2022-01-08 22:49:59 +00:00
Marc Gilleron
09899eef97 Namespaced Color8 2022-01-04 22:30:46 +00:00
Marc Gilleron
1f579cf860 Namespaced blocky and cubes internal functions 2022-01-04 00:17:56 +00:00
Marc Gilleron
c672e21ff3 Re-namespaced Transvoxel 2022-01-04 00:12:42 +00:00
Marc Gilleron
0fee995c0f Namespaced godot utility funcs 2022-01-03 23:52:54 +00:00
Marc Gilleron
b66861eb0e Re-namespaced dmc 2022-01-03 23:38:47 +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
35018adbf2 Namespace ObjectPool 2022-01-03 01:19:18 +00:00
Marc Gilleron
2f71b79904 More uses of Time singleton 2021-12-29 17:18:49 +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