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
Marc Gilleron
7f47b07e0c
Fix data reception buffer not cleared after consumption
2021-02-08 01:22:09 +00:00
Marc Gilleron
221cb5839f
Fix error when setting empty multimesh data
2021-02-07 23:43:58 +00:00
Marc Gilleron
6856f4b491
Moved instancing stuff under a folder
2021-02-07 21:40:55 +00:00
Marc Gilleron
4daf6718f8
Moved instance generation to its own class
2021-02-07 21:30:07 +00:00
Marc Gilleron
b65b0b8045
Implemented saving and loading of modified instances in SQLite
2021-02-07 17:22:50 +00:00
Marc Gilleron
dce6ddc3f5
No longer save terrain automatically when it gets destroyed.
...
If the user wants to save, save_modified_blocks() must be called explicitely.
2021-02-07 17:12:30 +00:00
Marc Gilleron
8e0241ed16
Don't let streams override LOD count for now
2021-02-07 17:04:22 +00:00
Marc Gilleron
22471aafd0
Merge branch 'master' into instancing
2021-02-02 00:00:01 +00:00
Marc Gilleron
b66b9a01a9
Removed VoxelStreamFile
2021-02-01 22:25:25 +00:00
Marc Gilleron
01e5e18922
Implemented VoxelStreamSQLite
2021-01-28 22:02:49 +00:00
Marc Gilleron
99723cc006
Merge branch 'master' into instancing
2021-01-25 22:17:46 +00:00
Marc Gilleron
137059f514
Use relationship=2 for block map
2021-01-24 15:24:07 +00:00
Marc Gilleron
5ec5136f5e
Don't try to save if the terrain has no stream assigned
2021-01-23 23:01:02 +00:00
Marc Gilleron
0816d1fc09
Merge branch 'master' into instancing
2021-01-23 01:33:11 +00:00
Marc Gilleron
25c033ce85
Fix huge stutters caused by materials not being pooled properly
2021-01-22 18:31:46 +00:00
Marc Gilleron
23765f7c20
Merge branch 'master' into multithreaded_generators
2021-01-18 18:55:18 +00:00
Marc Gilleron
6075476fd8
Fix wrong variable, caused null access
2021-01-17 18:27:38 +00:00
Marc Gilleron
4ec60074bb
Refactor generators and streams
...
- VoxelGenerator no longer inherit VoxelStream
- VoxelStream is now more focused on files
- Nodes have separate stream and generator properties
- Generators use 2 dedicated threads instead of sharing a single one with streams
- TODO Image.lock() is problematic for multithreading
- TODO Voxel graph can cause RWLock contention if edited while it runs
- TODO Saving generator output no longer works, need to put it back
2021-01-17 17:18:05 +00:00
Marc Gilleron
94810f4d04
Rename statistic property back to its old name, I think it didnt need to change
2021-01-16 13:05:50 +00:00
Marc Gilleron
70a1828720
Added static body collisions
2021-01-01 01:41:41 +00:00
Marc Gilleron
229caf739d
Fix parent not reset when unparented
2021-01-01 01:40:19 +00:00
Marc Gilleron
37a202a00b
Added material_override
2021-01-01 01:39:06 +00:00
Marc Gilleron
586b5bc0b8
Added height limiter
2020-12-31 20:33:19 +00:00
Marc Gilleron
a766e8aefb
Added slope limit
2020-12-30 23:24:30 +00:00
Marc Gilleron
2b292818c0
Instances now get removed when the user digs under them
2020-12-30 20:11:46 +00:00
Marc Gilleron
fd6125df67
Fix crash on exit
2020-12-29 22:53:58 +00:00
Marc Gilleron
0449eb53e3
Missing function
2020-12-29 22:33:30 +00:00
Marc Gilleron
e46c02d475
Merge branch 'master' into instancing
2020-12-29 22:26:57 +00:00
Marc Gilleron
a34710f74c
Added VoxelInstancer. First working API, script only.
2020-12-29 22:25:22 +00:00
Marc Gilleron
5fdc4b6485
Debug check and some formatting
2020-12-29 22:14:49 +00:00
Marc Gilleron
e6c44f9768
Don't recycle materials when we only save blocks
...
This should only happen if the block is actually about to get unloaded
2020-12-29 22:10:31 +00:00
Marc Gilleron
edfc96e4a5
Fixed crash when hiding terrain while selected in editor
2020-12-27 15:51:03 +00:00
Marc Gilleron
e988cb9124
Show main thread tasks
2020-12-25 17:08:40 +00:00
Marc Gilleron
418cf0e630
Streaming/LOD can be set to follow the editor camera instead of being centered on world origin
2020-12-19 23:16:10 +00:00
Marc Gilleron
6d9fd2f8a0
Voxel terrain nodes now have a common abstract base class. Also explicitely made a few other classes abstract
2020-12-18 22:58:41 +00:00
Marc Gilleron
4ca7a708d5
Fix warning about precedence clarity
2020-12-18 21:24:41 +00:00
Marc Gilleron
791bdafff1
Meshers are now resources assigned on terrain nodes
2020-12-18 21:01:50 +00:00
Marc Gilleron
117802c807
Unused variable
2020-11-21 19:51:41 +00:00
Marc Gilleron
25445f3f6c
Added debug function to dump a VoxelLodTerrain as nodes in a PackedScene
2020-11-21 18:31:28 +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
4c1e149aef
Optimized iteration over all blocks of a map (but likely, ECS approach may be better in the future)
2020-11-01 03:25:48 +00:00
Marc Gilleron
18e7792bd5
Added access to block local transform in custom shaders for VoxelLodTerrain
2020-10-31 01:15:50 +00:00
Marc Gilleron
09b32c9dd8
Allow to change process mode from script on VoxelLodTerrain
2020-10-30 19:02:00 +00:00
Marc Gilleron
23123fc920
GCC warning
2020-10-29 22:59:09 +00:00
Marc Gilleron
a31dcdd3bd
Don't clamp view distance for now, but should be done dynamically
2020-10-29 22:58:49 +00:00
Marc Gilleron
01776d2ee1
Don't load neighboring blocks across fixed boundaries
2020-10-29 22:58:19 +00:00
Marc Gilleron
90cc96d241
Update viewer position on transform changes instead of process
2020-10-29 00:55:04 +00:00
Marc Gilleron
40d299413f
Don't compute matrices if they aren't used when transforming blocks
2020-10-29 00:54:27 +00:00
Marc Gilleron
b5470fab2b
Fix big CPU due to blocks never getting unloaded
...
The unloading logic is supposed to run for all LOD levels except the biggest one,
but instead was running for all LODs except the smallest.
2020-10-29 00:53:04 +00:00
Marc Gilleron
bf8a4229a1
Added debug function to get how many blocks are currently in memory
2020-10-29 00:49:12 +00:00
Marc Gilleron
f3108de4f9
Removed old viewer API from VoxelLodTerrain, support 1 VoxelViewer at a time for now
2020-10-25 21:21:37 +00:00
Marc Gilleron
85bb3d7b28
VoxelTerrain can be transformed
2020-10-25 00:55:57 +01:00
Marc Gilleron
361f7d73ed
VoxelLodTerrain handles transform changes (VoxelTool still has to account for that)
2020-10-24 03:22:02 +01:00
Marc Gilleron
d158a92f57
Show bounds and octrees of VoxelLodTerrain with debug drawing
2020-10-24 00:08:14 +01:00
Marc Gilleron
e70f87e4a7
Fixed bounds being snapped too large
2020-10-24 00:06:09 +01:00
Marc Gilleron
4e65c8d937
Added bounds support to VoxelLodTerrain (rounded to octree size)
2020-10-22 22:43:31 +01:00
Marc Gilleron
2dfcc76600
Better fix for VoxelLodTerrain task drop
2020-10-20 23:58:55 +01:00
Marc Gilleron
54eb228444
Fix crash when increasing LOD count in editor while blocks are still loading
2020-10-19 23:22:23 +01:00
Marc Gilleron
30c6d7e436
Disabled task cancellation to make VoxelLodTerrain work, will need better option later.
...
VoxelLodTerrain's block requests were being cancelled constantly.
This commit also contains precision improvement for cancelling
block requests based on distance, which originally was an attempt to
"properly" fix the problem with VoxelLodTerrain, but it didnt fully
worked for that node.
I left it anyways, maybe it will change in the future once a
proper fix is figured out.
2020-10-19 23:21:14 +01:00
Marc Gilleron
5dd8475091
Fix GCC warning (4)
2020-09-20 20:28:45 +01:00
Marc Gilleron
6c80da0425
Moved VoxelBuffer and VoxelMemoryPool under storage/ directory
2020-09-14 19:33:02 +01:00
Marc Gilleron
64ee592a0e
Allow to specify bounds in VoxelTerrain
2020-09-13 22:36:28 +01:00
Marc Gilleron
4b6ae21ce9
Fix GCC warnings
2020-09-09 18:58:58 +01:00
Marc Gilleron
b12500ed34
Don't request or even calculate blocks to load when streaming is not possible
2020-09-08 21:34:35 +01:00
Marc Gilleron
7a235be108
Cancel block tasks if they are too far away
2020-09-06 23:57:41 +01:00
Marc Gilleron
fb8a1210e3
Comment and formatting
2020-09-06 19:59:08 +01:00
Marc Gilleron
0e16193f92
Removed old threading code
2020-09-06 19:35:35 +01:00
Marc Gilleron
a4611031e1
Fix viewer not being unpaired when destroyed
2020-09-06 19:29:56 +01:00
Marc Gilleron
81e1872f8b
Implemented viewers for VoxelTerrain
2020-09-06 19:01:12 +01:00
Marc Gilleron
b8c97ebc55
Switch VoxelLodTerrain to VoxelServer
2020-08-31 21:51:30 +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
758da9ca2f
Fix VoxelLodTerrain not loading blocks properly in editor
...
It assumed they were loading but the list of loading blocks is cleared
when the stream is set... which didn't reset the MAP of loading blocks.
2020-08-30 21:38:38 +01:00
Marc Gilleron
08e5770bd0
Fix crash when using VoxelLodTerrain without a stream
2020-08-30 21:36:43 +01:00
Marc Gilleron
17ff16aa48
Neighbors are optional when sending meshing requests
2020-08-30 04:00:45 +01:00
Marc Gilleron
d81ffb95f4
Detect usage of Tracy, add some profiler scopes
2020-08-30 04:00:01 +01:00
Marc Gilleron
107f29c5d3
Removed old profiler
2020-08-29 23:20:51 +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
d8a8936f34
Remove usage of VoxelDataLoader from VoxelTerrain
2020-08-26 19:49:30 +01:00
Marc Gilleron
56c2a0856a
Initial integration on VoxelTerrain with static camera, fixed a bunch of things
2020-08-25 23:00:38 +01:00
Marc Gilleron
23ce65d789
Show terrain in editor, with option to turn it off. A scripted stream will turn it off by default.
2020-08-14 20:33:09 +01:00
Marc Gilleron
6ed4ef32b7
Separated baked data from config data in VoxelLibrary and introduced thread-safety with blocky mesher
2020-08-11 23:52:42 +01:00
Marc Gilleron
7316e415dc
Implemented block events for VoxelTerrain
2020-08-10 20:57:03 +01:00
Marc Gilleron
404de21c9b
Don't error when a custom stream can't be used in editor, show warning instead
2020-08-02 18:58:04 +01:00
Marc Gilleron
ac3e303818
Report script errors a bit better, I hope
2020-08-02 18:57:08 +01:00
Marc Gilleron
61c82078f7
Added collision masks to voxel models so they can be filtered fast
2020-08-01 22:58:16 +01:00
Marc Gilleron
f9e2d9cc12
Stop using NULL
2020-07-25 23:19:08 +01:00
Marc Gilleron
b7fe71ff45
Fix block not copied when the save of a single one is triggered
2020-07-25 21:57:36 +01:00
Marc Gilleron
ec6bc00562
Added methods to trigger saves manually
2020-07-25 16:29:16 +01:00
Marc Gilleron
eef3818d29
Fixed mandatory requests not always being processed after telling the thread to exit
2020-07-24 20:07:34 +01:00
Marc Gilleron
071c5ee5c0
Fix channel depth not being applied to VoxelMap::get_buffer_copy()
2020-07-11 18:05:26 +01:00
Marc Gilleron
1a08cd31d6
Use a macro to print debug stuff only in verbose mode
2020-07-08 20:48:52 +01:00
Marc
e57a39d467
Merge pull request #141 from nwdamgaard/master
...
Generate a collision mesh for each surface
2020-05-08 17:24:13 +01:00
Nathan
a17ab8bbe7
clean up for Zylann
2020-05-07 17:33:16 -07:00
Nathan
6b43c9a187
General improvements
2020-05-07 13:55:16 -07:00
Marc Gilleron
600942564c
Fix crash when a VoxelTerrain is used without a stream
2020-05-07 21:13:47 +01:00
Nathan
713c57388a
Changing the approch once again due to misunderstanding Zylann
2020-05-06 19:47:00 -07:00
Nathan
6db4246e9a
Missed something to clean up
2020-05-06 16:20:24 -07:00
Nathan
c69afee67f
Clean up some stuff that should not have happened
2020-05-06 16:14:11 -07:00
Nathan
89691f6ece
Added function in mesher to create collision mesh
2020-05-06 14:42:46 -07:00
Nathan
e045c0f350
Generate a collision mesh for each surface
2020-04-28 21:50:37 -07:00