You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the problem or limitation you are having in your project
Editing complex CSG trees can be slow, since the CSG mesh is regenerated every time a change is made. This can occur every frame when dragging one of the handles or moving the node using the 3D manipulation gizmos.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Add a debounce delay to prevent CSG mesh updates from occurring too often while moving CSG nodes around.
This debounce delay should be adjustable with a project setting, in case you're actually using CSG for real-time purposes (which isn't recommended for performance reasons). I suggest setting this debounce delay to 0.1 seconds by default, but it may have to be tweaked in the future.
Alternatively, we can make this debounce delay effective only within the editor. This way, exported projects wouldn't be affected by this change.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
This can be done with an internal timer that is kept track of in each CSG node. Since CSG mesh generation works on a per-tree basis, only the timer at the topmost of each CSG tree would be taken into account. Child nodes would modify the parent's timer node, and child nodes' timer value would be ignored.
Every time a change is made that requires updating the mesh, the timer is set to its maximum time and is started.
When time reaches zero, an update of the CSG mesh is queued.
I recommend not using a Timer node for this for performance reasons. Using a float variable instead will likely perform better.
If this enhancement will not be used often, can it be worked around with a few lines of script?
No.
Is there a reason why this should be core and not an add-on in the asset library?
CSG is core engine functionality.
The text was updated successfully, but these errors were encountered:
This sounds like a good addition - my only comment on this is that i think that the debounce should be homogenous between editor and runtime: i think there could be cases where people see it running smoothly in the engine but it ends up lagging in the game (because of the high frequency of updates)
Describe the project you are working on
The Godot editor 馃檪
Describe the problem or limitation you are having in your project
Editing complex CSG trees can be slow, since the CSG mesh is regenerated every time a change is made. This can occur every frame when dragging one of the handles or moving the node using the 3D manipulation gizmos.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Add a debounce delay to prevent CSG mesh updates from occurring too often while moving CSG nodes around.
This debounce delay should be adjustable with a project setting, in case you're actually using CSG for real-time purposes (which isn't recommended for performance reasons). I suggest setting this debounce delay to 0.1 seconds by default, but it may have to be tweaked in the future.
Alternatively, we can make this debounce delay effective only within the editor. This way, exported projects wouldn't be affected by this change.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
This can be done with an internal timer that is kept track of in each CSG node. Since CSG mesh generation works on a per-tree basis, only the timer at the topmost of each CSG tree would be taken into account. Child nodes would modify the parent's timer node, and child nodes' timer value would be ignored.
Every time a change is made that requires updating the mesh, the timer is set to its maximum time and is started.
When time reaches zero, an update of the CSG mesh is queued.
I recommend not using a Timer node for this for performance reasons. Using a
float
variable instead will likely perform better.If this enhancement will not be used often, can it be worked around with a few lines of script?
No.
Is there a reason why this should be core and not an add-on in the asset library?
CSG is core engine functionality.
The text was updated successfully, but these errors were encountered: