41 Commits

Author SHA1 Message Date
Marc Gilleron
24e9e36434 Namespace SDF functions 2022-01-03 03:18:58 +00:00
Marc Gilleron
1e89a7b75d FastNoise2 conditional compilation 2021-12-31 21:22:30 +00:00
Marc Gilleron
204b64ac23 Added FastNoise2 to VoxelGeneratorGraph 2021-12-31 18:23:42 +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
3cf2e92483 Optimized Curve range analysis by dividing it into monotonic sections 2021-09-19 18:20:54 +01:00
Marc Gilleron
264b77ac21 Moved hardcoded output types outside the runtime.
For simplicity I chose to just give output nodes output ports,
like regular ones, and hide them in the editor.
It required to change a bit how output nodes are detected,
and backing output buffers are no longer required from callers.
This will allow to more easily implement custom outputs as well.
2021-05-02 01:22:44 +01:00
Marc Gilleron
ee1169cc45 Merge branch 'master' into smooth_texturing 2021-04-30 22:15:27 +01:00
Marc Gilleron
cc9e614b4a Fix Remap node 2021-04-30 22:07:26 +01:00
Marc Gilleron
32f9006b75 Added initial support for texture weights in graph generators (not optimal) 2021-04-30 22:04:38 +01:00
Marc Gilleron
10683ccd15 Comments 2021-04-15 20:35:31 +01:00
Marc Gilleron
0c830ded40 Fix wrong input used in sdf subtract node 2021-04-07 00:04:33 +01:00
Marc Gilleron
18f211822f Fix ignored buffers still being used when optimized execution map is used 2021-04-03 20:44:48 +01:00
Marc Gilleron
08bfcd96d4 Optimized smooth subtract and union by marking unused input cases.
This allows optimized execution map to pick them up and skip dependencies
2021-03-22 00:02:16 +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
9188ae619b Optimized several range analysis functions
- square, cube and polynomials are more precise
- lerp() is more precise
- smooth union and subtract are more precise
- fallback on simple min/max if smoothness is zero
2021-03-17 18:11:00 +00:00
Marc Gilleron
71384e25bc Moved sdf functions to their own file 2021-02-21 18:18:01 +00:00
Marc Gilleron
8b2278a2d6 Profiling scopes 2021-02-20 00:36:26 +00:00
Marc Gilleron
6208699281 Added smooth union and subtraction 2021-02-18 23:29:00 +00:00
Marc Gilleron
fcd9284edf Fix SphereHeightmap node 2021-01-17 20:02:40 +00:00
Marc Gilleron
67b1a2b86f Fixed image locking 2021-01-17 19:59:20 +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
7940b3b761 Made VoxelGeneratorGraph thread-safe 2021-01-16 13:51:01 +00:00
Marc Gilleron
4686735f00 Fix pseudo-shadowing detected by GCC 2021-01-09 19:51:58 +00:00
Marc Gilleron
b2ca66e714 Fix Smoothstep node, params were not initialized 2021-01-09 16:36:09 +00:00
Marc Gilleron
04c1d61cd2 Quick cleanup, also patch preview nodes 2021-01-07 23:36:14 +00:00
Marc Gilleron
e00ed9b538 Move all node logic to function pointers, each combined into one place 2021-01-07 22:19:06 +00:00
Marc Gilleron
3364748fef Integrate FastNoiseLite to voxel graph generator 2021-01-03 20:23:45 +00:00
Marc Gilleron
7c6bfe0dbc Added Normalize node to voxel graph 2020-12-21 20:06:20 +00:00
Marc Gilleron
ae9abb0248 Added SdfSphereHeightmap node to graph generator 2020-12-21 02:00:31 +00:00
Marc Gilleron
56aee87615 Added Select node to "conditionally" switch between two values 2020-07-11 17:03:09 +01:00
Marc Gilleron
6b63746135 Added categories 2020-07-08 01:26:12 +01:00
Marc Gilleron
b8c235fce3 Added preview nodes (has a few limitations, may fix them later) 2020-07-07 23:28:02 +01:00
Marc Gilleron
f73e566535 Added smoothstep 2020-04-05 19:53:07 +01:00
Marc Gilleron
9ce0ded22e Added a bunch of operation types, untested 2020-03-20 00:21:09 +00:00
Marc Gilleron
4176894383 Editable default inputs 2020-03-08 19:23:48 +00:00
Marc Gilleron
d1f00537d5 Parameters are editable (not default inputs, need to do them after) 2020-03-08 00:46:55 +00:00
Marc Gilleron
43b99975f3 Loading and saving of voxel graphs 2020-03-07 01:34:30 +00:00
Marc Gilleron
a3b64c3983 A bit of reorganization:
- Merged VoxelGeneratorGraph::Node into ProgramGraph::Node
- Separated compilation and execution to its own class
2020-02-29 00:17:47 +00:00
Marc Gilleron
5aa7c4cbd6 Fix missing data in node type info dict 2020-02-26 22:26:22 +00:00
Marc Gilleron
815954bc03 Added graph edition methods and exposed to script API 2020-02-24 23:03:41 +00:00
Marc Gilleron
f4a5b36fe9 Moved node DB to its own file 2020-02-23 19:08:14 +00:00