65 Commits

Author SHA1 Message Date
Marc Gilleron
bd696b4caa Functions that should be const 2021-09-09 18:52:00 +01:00
Marc Gilleron
df33a77f72 Unnecessary includes 2021-09-05 22:48:50 +01:00
Marc Gilleron
7cb1e4008e Use accessor 2021-08-15 17:27:55 +01:00
Marc Gilleron
5fcd7f7363 Added mesh optimization option to Transvoxel, using MeshOptimizer 2021-07-11 16:19:49 +01:00
Marc Gilleron
3ffd07af47 Added copy to VoxelToolLodTerrain 2021-07-10 20:19:44 +01:00
Marc Gilleron
e05fb7a045 Does not need to be a non-const reference 2021-07-01 23:14:23 +01:00
Marc Gilleron
5fdf9e700f Exposed interpolated float voxel query 2021-07-01 22:44:27 +01:00
Marc Gilleron
c2248f9254 I don't remember why this was padded 2021-06-16 23:33:58 +01:00
Marc Gilleron
19f440527e Implemented VoxelToolTerrain.for_each_voxel_metadata_in_area 2021-06-16 23:31:00 +01:00
Marc Gilleron
1ee5bcb80d Renamed Rect3i -> Box3i 2021-05-31 17:12:04 +01:00
Marc Gilleron
2e9d817246 Moved VoxelDataMap to storage/ folder 2021-05-31 16:27:08 +01:00
Marc Gilleron
fbb39f6fcc Added falloff property to control sharpness of texture painting 2021-05-30 16:28:10 +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
d2d07904b8 Moved VoxelRaycastResult to its own file 2021-05-29 15:09:10 +01:00
Marc Gilleron
f943339f31 Researching tri-channel weights storage
- No changes made for now, but the code is there if we want to switch
- Renamed functions to be more explicit
2021-05-23 20:28:06 +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
0dc6702308 VoxelToolTerrain.raycast now accounts for scale and rotation, and supports VoxelMesherCubes with non-zero values 2021-05-16 04:29:08 +01:00
Marc Gilleron
9b3263d68b Fix copy 2021-05-15 16:31:36 +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
1a9750194b Added same basic painting function to VoxelToolLodTerrain (untested) 2021-04-25 22:20:05 +01:00
Marc Gilleron
8b017f460f Basic VoxelTool function to paint textures on buffers 2021-04-25 20:23:14 +01:00
Marc Gilleron
1449560f29 Implemented decoupling on VoxelTerrain (no setter yet) 2021-04-13 23:48:35 +01:00
Marc Gilleron
2c6eb114b2 Fix order of SDF arguments 2021-04-07 00:05:38 +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
30e33849fe Use SDF union and subtract in VoxelTool 2021-03-17 18:11:29 +00:00
Marc Gilleron
09c815e253 Implemented copy and paste for VoxelToolTerrain (untested) 2021-02-21 18:23:56 +00:00
Marc Gilleron
b51897b8df Added voxel raycast to VoxelToolLodTerrain
- Made more precise with an option to use binary search (unoptimized)
- Distance along ray is now available in blocky terrains as well
2021-02-21 03:08:47 +00:00
Marc Gilleron
d1207bdd96 Reorganized some utility files 2021-02-17 20:34:35 +00:00
Marc Gilleron
22471aafd0 Merge branch 'master' into instancing 2021-02-02 00:00:01 +00:00
Marc Gilleron
7682e8fbcc Comments 2021-01-30 01:39:28 +00:00
Marc Gilleron
99723cc006 Merge branch 'master' into instancing 2021-01-25 22:17:46 +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
629b79fc3d Fix subtract operation 2021-01-23 22:59:44 +00:00
Marc Gilleron
0816d1fc09 Merge branch 'master' into instancing 2021-01-23 01:33:11 +00:00
Marc Gilleron
a3bad1af64 Register VoxelToolBuffer because otherwise it gets initialized lazily, causing crashes in threads 2021-01-17 22:18:41 +00:00
Marc Gilleron
3e510d2e93 get_voxel may be const 2020-12-30 20:09:31 +00:00
Marc Gilleron
791bdafff1 Meshers are now resources assigned on terrain nodes 2020-12-18 21:01:50 +00:00
Marc Gilleron
d52f882ae1 VoxelMap is no longer bound, it had no use in the API 2020-11-21 18:31:11 +00:00
Marc Gilleron
85bb3d7b28 VoxelTerrain can be transformed 2020-10-25 00:55:57 +01:00
Marc Gilleron
6c80da0425 Moved VoxelBuffer and VoxelMemoryPool under storage/ directory 2020-09-14 19:33:02 +01:00
Marc Gilleron
b16d8ff00d Update XML API docs, add a few more descriptions and fix some functions 2020-09-14 01:58:35 +01:00
Marc Gilleron
7a37770e84 Merge branch 'master' into threading_refactor
# Conflicts:
#	edition/voxel_tool_terrain.cpp
#	terrain/voxel_lod_terrain.cpp
2020-08-30 21:56:44 +01:00
Marc Gilleron
b26fd944a8 Added VoxelTool.copy declaration, gonna need this in the future 2020-08-30 18:51:20 +01:00
Marc Gilleron
d81ffb95f4 Detect usage of Tracy, add some profiler scopes 2020-08-30 04:00:01 +01:00
Marc Gilleron
88e6d83652 Comments and formatting 2020-08-29 22:58:33 +01:00
Marc Gilleron
d4d2b6fd9e No longer copy voxels before scheduling threaded tasks. VoxelBuffers now have a lock. 2020-08-29 22:09:54 +01:00
Marc Gilleron
e30a3f51d6 Expose VoxelTool.is_area_editable() 2020-08-24 13:51:08 +01:00
Marc Gilleron
d848da3a6f Formatting 2020-08-24 13:49:44 +01:00