Commit Graph

409 Commits (0bf72badbd3f129e6472c81f0ec5a4c0f5f19835)

Author SHA1 Message Date
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
Marc Gilleron 2e9d817246 Moved VoxelDataMap to storage/ folder 2021-05-31 16:27:08 +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 0de2b1b9d0 Comments 2021-05-24 23:16:04 +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 efe8bcf9c0 Show a configuration warning when a mesher does not support LOD 2021-05-15 23:41:19 +01:00
Marc Gilleron 5f7c0cc668 `VoxelBoxMover` should now support scaled/translated terrains and `VoxelMesherCubes` (limited to non-zero color voxels) 2021-05-15 19:45:40 +01:00
Marc Gilleron 9b3263d68b Fix copy 2021-05-15 16:31:36 +01:00
Marc Gilleron fa48523073 Added collision layer and mask properties 2021-05-09 20:49:45 +01:00
Marc Gilleron c19b60647c Fix paste() with mask 2021-05-08 20:37:54 +01:00
Marc Gilleron 650089de8f Don't try to save if there is no stream attached 2021-05-08 17:56:43 +01:00
Marc Gilleron ba78f67394 Fixed another property inconsistency to fix C# bindings 2021-05-08 17:15:15 +01:00
Marc Gilleron b6c89f5088 Merge branch 'master' into smooth_texturing 2021-05-08 01:02:54 +01:00
Marc Gilleron 14cc77eb7c Make getter and setter types match to fix an issue with C# bindings 2021-05-07 22:39:06 +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 4e67a1530d Code to debug vertex sharing issues 2021-05-03 00:13:36 +01:00
Marc Gilleron 0cef70a3c0 Fix backward iteration infinite loop when there is only one LOD 2021-04-21 18:29:23 +01:00
Marc Gilleron a36604ebf2 Fix more GCC warnings (3) 2021-04-18 02:13:26 +01:00
Marc Gilleron a00e9928d8 Fix more GCC warnings 2021-04-18 01:59:51 +01:00
Marc Gilleron 7d93a4646d Fix more GCC warnings 2021-04-18 01:48:53 +01:00
Marc Gilleron b846194bea Fix some GCC warnings 2021-04-18 01:29:26 +01:00
Marc Gilleron ab139ba44c Match filename 2021-04-15 20:35:10 +01:00
Marc Gilleron 2467471de2 Remove old code 2021-04-15 20:30:00 +01:00
Marc Gilleron 96bcc44d00 Removed VoxelMap and VoxelBlock, superseded by their specialized versions 2021-04-15 20:25:55 +01:00
Marc Gilleron 63d9361a87 Split refcounts 2021-04-15 20:25:03 +01:00
Marc Gilleron f7d0039811 Added mesh block size setter to VoxelTerrain 2021-04-15 20:00:41 +01:00
Marc Gilleron 1449560f29 Implemented decoupling on VoxelTerrain (no setter yet) 2021-04-13 23:48:35 +01:00
Marc Gilleron 310386bde8 Merge branch 'master' into block_size_decoupling 2021-04-11 01:09:51 +01:00
Marc Gilleron 42a8d0e35f Fix shadow setting not initialized when setting up from template scene 2021-04-11 00:58:12 +01:00
Marc Gilleron 9a131ed4ff Merge branch 'master' into block_size_decoupling
# Conflicts:
#	server/voxel_server.cpp
2021-04-06 22:00:55 +01:00
jacobcoughenour 13346b3495 Remove unnecessary enum bind and add shadow setting to doc 2021-04-05 22:50:03 -04:00
jacobcoughenour 279e23fa3d Fix shadow setting not updating in the editor 2021-04-05 22:48:29 -04:00
jacobcoughenour c0721a7404 Added shadow mode setting to VoxelInstanceLibraryItems 2021-04-05 00:24:46 -04:00
Marc Gilleron db8074c940 Merge branch 'master' into block_size_decoupling 2021-04-05 03:50:12 +01:00
Marc Gilleron 14fcddcee8 Fix meshes not loading in certain configurations where voxel bounds were not rounded correctly 2021-04-05 03:47:25 +01:00
Marc Gilleron e0f2f706aa Added debug_get_data_block_info and fix/improve debug_get_mesh_block_info 2021-04-05 03:46:15 +01:00
Marc Gilleron 19af22fb2b Added voxel_to_mesh_block_position 2021-04-05 03:44:52 +01:00
Marc Gilleron befe0cc7e1 Added debug method to get instance counts 2021-04-04 23:44:22 +01:00
jacobcoughenour e66a49ca74 Fix instance generator using wrong height for filtering 2021-04-04 15:18:13 -04:00
Marc Gilleron 5f18276b8d Expose setter for mesh block size 2021-04-03 23:51:11 +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
Roberto Benfatto eef1d076a0
Add missing bindings for constants
Without those bindings, exported api.json generates the class without the enum despite having a method with a return value of that type. This fixes compilation with generated headers in godot-cpp
2021-04-01 17:45:07 +02:00
Marc Gilleron 225f332e1f Fix signedness warning 2021-03-27 22:27:55 +00:00
Marc Gilleron 05c35caa92 Added categories to terrain properties 2021-03-27 16:38:52 +00:00
Marc Gilleron c86feda259 Replace lod_split_scale with lod_distance for better clarity 2021-03-27 16:38:20 +00:00
Marc Gilleron 03bfc09e99 Implemented execution map to optimize out nodes locally
- Added optional optimization of execution map
- Added visualization of skipped nodes in the editor debug tool
2021-03-21 18:48:00 +00:00
Marc Gilleron e8d54e88ef Fix instancer error in some rare cases where a block has an empty multimesh 2021-03-12 23:38:13 +00:00
Marc Gilleron 8adbe86da6 Formatting 2021-03-12 23:37:37 +00:00
Marc Gilleron c46d5e973d Fix coordinates 2021-03-12 23:36:11 +00:00
Marc Gilleron 31c02ad6ee Fix VoxelTerrain being left invisible due to new defaults 2021-03-12 23:35:59 +00:00
Marc Gilleron 944791d5ce Fixes to LOD fading 2021-03-12 23:35:51 +00:00
Marc Gilleron 5a8eee7d4b Added debug function to get octree state 2021-03-11 22:55:52 +00:00
Marc Gilleron cf81f83382 Re-implemented lod fade 2021-03-02 22:49:42 +00:00
Marc Gilleron 76ec90fe34 Moved constants and tables under a folder 2021-02-21 23:58:00 +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 cb2fcdce1b Fix signedness warning 2021-02-19 01:51:06 +00:00
Marc Gilleron fa2efcf75a Fix missing bindings 2021-02-18 21:17:52 +00:00
Marc Gilleron 4d033a2bb4 Added collision update delay to accelerate edit spam a little.
Not easy to use yet, might need the user to use voxel raycast instead of
physics because the hit points will not update often as they sculpt
2021-02-18 19:50:47 +00:00
Marc Gilleron d1207bdd96 Reorganized some utility files 2021-02-17 20:34:35 +00:00
Marc Gilleron d08c911579 Fix GCC warning 2021-02-16 23:52:56 +00:00
Marc Gilleron a3018e84e6 Fix missing header and signedness 2021-02-16 23:36:37 +00:00
Marc Gilleron 4bdadb2ffd Fix GCC warning 2021-02-16 23:07:59 +00:00
Marc Gilleron c5a4dd8f72 Fix release compilation 2021-02-16 22:38:09 +00:00
Marc Gilleron 5bef3b6cc6 Added scale distribution and noise 2021-02-16 01:14:04 +00:00
Marc Gilleron a94a8da157 Fixed Add Item not working after first item 2021-02-16 01:13:16 +00:00
Marc Gilleron 0a347ebf70 Fix configuration warning not updating after adding an item to the library 2021-02-16 01:04:21 +00:00
Marc Gilleron 41177f1c73 Fixed error when setting a library on an instancer not in the tree yet 2021-02-15 22:27:18 +00:00
Marc Gilleron 511bfd2a7a Added node configuration warnings 2021-02-15 21:55:31 +00:00
Marc Gilleron c5eb599798 Make the editor preview update in some uncovered scenarios 2021-02-15 21:45:12 +00:00
Marc Gilleron 02972641ea Add option to emit instances from faces 2021-02-15 18:25:48 +00:00
Marc Gilleron 9e25ef3198 Fix slope limiter angles 2021-02-15 18:24:48 +00:00
Marc Gilleron 094bbc1fe1 Refactored API to allow editor inspection and preview 2021-02-14 21:55:31 +00:00
Marc Gilleron 11dd3488fb Added optional mesh lods 2021-02-10 18:29:28 +00:00
Marc Gilleron c6fdbb675b Instancing persistence is now opt-in 2021-02-08 22:20:18 +00:00