Commit graph

7741 commits

Author SHA1 Message Date
lawnjelly
0b30d77384 Physics Interpolation - refactor Camera and fix get_camera_transform()
* Moves 3D Camera interpolation scene side.
* Automatically switches `get_camera_transform()` to report interpolated transform during `_process()`.
* Fixes `ClippedCamera` to work with physics interpolation.
2024-06-09 12:08:27 +01:00
Haoyu Qiu
d655fc8fed Add range hint for ViewportContainer.stretch_shrink 2024-05-29 09:06:06 +08:00
lawnjelly
1bfb788c4f
Merge pull request #92438 from lawnjelly/fti_fix_visual_instance_identity
[3.x] Physics Interpolation - Fix `VisualInstance::set_instance_use_identit…
2024-05-28 11:16:23 +01:00
lawnjelly
7130c1bebc Physics Interpolation - Fix VisualInstance::set_instance_use_identity_transform()
The logic for updating the `VisualServer` with the transform was the wrong way around.
2024-05-27 19:02:42 +01:00
Haoyu Qiu
1f0d9f04d2 Fix theme item parameter completion 2024-05-25 10:28:40 +08:00
lawnjelly
0f5cadfb56 Fix Viewport interpolation mode
Viewport interpolation mode is a special case, which should be set to ON instead of INHERIT.
2024-05-20 10:28:58 +01:00
kleonc
b045a7c92e
Always look for unique node names in owner if not found in owned nodes
(cherry picked from commit 95ced4bbdc)
2024-05-01 12:04:27 +02:00
lawnjelly
561a8eaf6e
Merge pull request #88207 from lawnjelly/view_mesh_stats
[3.x] Editor 3D view mesh stats
2024-04-21 19:31:57 +01:00
lawnjelly
36474d6142
Merge pull request #90928 from timothyqiu/toggle-tab-icon-3.x
[3.x] Fix TabContainer not updating content rect after toggling tab icon
2024-04-21 19:29:38 +01:00
lawnjelly
bdf0f78e07 Editor 3D view mesh stats
Similar to information window, add a small optional window to display face count and other stats.
2024-04-21 08:20:18 +01:00
lawnjelly
a73715cf55
Merge pull request #58577 from pfertyk/issue_58543_audio_not_paused
[3.x] Fix AudioStreamPlayer not paused on pause mode change
2024-04-20 09:18:46 +01:00
Haoyu Qiu
30dead8a5e Fix TabContainer not updating content rect after toggling tab icon 2024-04-20 16:12:45 +08:00
lawnjelly
d56d1ff4d2 Deprecate NOTIFICATION_MOVED_IN_PARENT
* NOTIFICATION_MOVED_IN_PARENT makes node children management very inefficient.
* Replaced by a NOTIFICATION_CHILD_ORDER_CHANGED (and children_changed signal).
* Most of the previous tasks carried out by NOTIFICATION_MOVED_IN_PARENT are now done not more than a single time per frame.

This PR breaks compatibility (although this notification was very rarely used, even within the engine), but provides an alternate way to do the same.
2024-04-20 07:52:05 +01:00
Rémi Verschelde
1869243644
Merge pull request #88807 from lawnjelly/portals_fix_enter_tree_order
[3.x] Portals - defer setting active in `VisualServer` until enter tree
2024-04-19 10:24:37 +02:00
lawnjelly
ea68c2bfab
Merge pull request #88946 from lawnjelly/fix_physics_on_floor_body
[3.x] Fix physics `on_floor_body` crash
2024-04-16 15:02:00 +01:00
lawnjelly
db3fe5e5c3
Merge pull request #90669 from timothyqiu/owner-id-3.x
[3.x] Store `ObjectID` instead of pointer for KinematicCollision owner
2024-04-16 13:49:58 +01:00
Haoyu Qiu
33043c63d5 Fix SceneTree not respecting virtual process methods
Co-authored-by: Raul Santos <raulsntos@gmail.com>
2024-04-16 18:49:02 +08:00
Haoyu Qiu
43862fbf44 Store ObjectID instead of pointer for KinematicCollision owner 2024-04-15 12:32:17 +08:00
Haoyu Qiu
ed952f82bd Add is_zero_approx methods to Vector{2,3} 2024-04-10 19:02:42 +08:00
Haoyu Qiu
fe65682937 Add Node.is_node_ready 2024-04-08 17:44:23 +08:00
Paweł Fertyk
90cf873979 Fix AudioStreamPlayer not paused on pause mode change
Fixes #58543.
2024-04-05 14:20:44 +02:00
lawnjelly
a0f130e23c Optimize AnimationTree::_process_graph()
Removes redundant lookups on HashMap.
2024-03-18 09:01:41 +00:00
lawnjelly
f8438601ef Physics Interpolation 2D - fix light and light occluder resetting
It turns out `NOTIFICATION_TRANSFORM_CHANGED` is deferred for these nodes, which can mean the transform is not set in the `VisualServer` until after the reset has been sent, even if the transform is set before the reset in script. This prevented the reset from acting correctly.

Here we explicitly set the transform prior to each reset, to ensure the `VisualServer` is up to date.
2024-03-16 16:02:22 +00:00
A Thousand Ships
0f6d2c3441
Fix building with disable_3d 2024-03-16 11:31:23 +01:00
Rémi Verschelde
1ad9e856a0
Merge pull request #88198 from lawnjelly/fix_facecount_bug
[3.x] Fix `Mesh::get_face_count()`
2024-03-08 17:54:04 +01:00
Rémi Verschelde
ae7dfd1f13
Merge pull request #85437 from lawnjelly/lod_scene_side
[3.x] Discrete Level of Detail
2024-03-08 17:53:58 +01:00
lawnjelly
9a9dccbaa2 Fix physics on_floor_body crash
Physics body previously stored the RID of a collision object and accessed it on the next frame, leading to a crash if the object had been deleted.
This PR stores the ObjectID in addition to the RID, and checks the object still exists prior to access.
2024-02-28 07:54:00 +00:00
lawnjelly
788567987a Portals - defer setting active in VisualServer until enter tree
`set_portal_active()` was being called loading packed scenes prior to entering the tree, visual server portals had not been fully created at this point hence the call was being ignored with an error flagged.
This PR defers the call until after entering the tree.
2024-02-25 10:11:06 +00:00
Ansraer
1e7c60174e fix crash on mat creation after orm refactor 2024-02-16 20:51:27 +01:00
lawnjelly
a32a2613e9 Fix Mesh::get_face_count()
This fixes a minor bug whereby facecount was actually returning the facecount * 3.
There were no major problems from this, but it did mean the optional threshold poly count used when merging was out by a factor of 3.
2024-02-11 12:19:52 +00:00
lawnjelly
1b5fa74e39 Discrete Level of Detail
Add scene side discrete level of detail.

New node `LOD` for UI, and `LODManager` within `World` for automatically updating child visibilities based on distance from cameras.
2024-02-10 18:54:25 +00:00
Ansraer
b9cbffd957 add ORMSpatialMaterial 2024-02-08 20:34:11 +01:00
lawnjelly
0aa22b8f13 Vertex cache optimizer
Optimizes indices to make good use of vertex cache on GPU.
2024-02-07 09:35:50 +00:00
Rémi Verschelde
e96ebf9218
Merge pull request #61568 from lawnjelly/merge_node
[3.x] Add MergeGroup node to simplify merging Meshes at runtime
2024-02-07 09:49:45 +01:00
Rémi Verschelde
dc776e46b6
Merge pull request #60246 from Calinou/directional-light-add-fade-start-3.x
[3.x] Backport DirectionalLight `fade_start` property
2024-02-07 09:49:21 +01:00
Rémi Verschelde
5eeb4f220d
Merge pull request #87713 from lawnjelly/portal_include_in_bound
[3.x] Portals - include in bound and special cases in start room
2024-02-07 09:41:22 +01:00
Rémi Verschelde
991e922877
Merge pull request #86786 from lawnjelly/calinou_sdf_fixed
[3.x] Fix signed distance field font rendering
2024-02-07 09:40:59 +01:00
Rémi Verschelde
862d63e9f7
Merge pull request #81559 from matorin57/3.x-backport-finished-singal-GPU-particles
[3.x] Backport "Add `finished` signal to GPUParticles"
2024-02-07 09:39:49 +01:00
lawnjelly
bc607fb607 Fix signed distance field font rendering
This fix works in both GLES3 and GLES2.

The rendering formula in the shader was adjusted to further improve the
sharpness/antialiasing quality balance.

Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
2024-02-05 17:50:33 +00:00
lawnjelly
7f3800ece2 Portals - include in bound and special cases in start room
* Re-introduces a property for portals to decide whether they are included in room bounds during room conversion.
* Adds a special case for portals that extend into the start room, which may be caused by level design inaccuracies.
2024-01-31 09:22:33 +00:00
lawnjelly
8b79135538 Add MergeGroup node to simplify merging Meshes at runtime 2024-01-31 08:28:51 +00:00
Rémi Verschelde
e9949a6db7
Merge pull request #87702 from lawnjelly/portal_export_logging
[3.x] Portals - Improve conversion logging
2024-01-29 23:30:11 +01:00
Rémi Verschelde
721eba5d5d
Merge pull request #87539 from SysError99/3.x-get_first_node_in_group
[3.x] Add `SceneTree::get_first_node_in_group` following 4.x
2024-01-29 23:29:04 +01:00
Rémi Verschelde
6f3c5e63f3
Merge pull request #82584 from lawnjelly/lightcull_23
[3.x] Shadow volume culling and tighter shadow caster culling
2024-01-29 23:27:56 +01:00
Rémi Verschelde
4e741ec2ba
Merge pull request #64493 from Mickeon/3.x-editor-group
[3.x] Add Node editor description group
2024-01-29 23:27:07 +01:00
lawnjelly
5e0b298d50 Portals - Improve conversion logging
Logging is now allowed in any TOOLS build (rather than just in the editor), but still prevented in final exports.
Logging can be switched off via project settings.
Autoplacement is now logged.
2024-01-29 14:21:22 +00:00
SysError99
99284482bc [3.x] Add SceneTree::get_first_node_in_group following 4.x 2024-01-26 21:26:40 +07:00
kobewi
c377bffaa1 Preserve selection when focusing SpinBox 2024-01-18 16:38:05 +01:00
Rémi Verschelde
e653473646
Merge pull request #86725 from Mickeon/3-x-remove-unused
[3.x] Remove unused struct in GradientTexture1D
2024-01-05 11:07:44 +01:00
Aaron Franke
ab9ed3245d
[3.x] Add "position" as an alias for "translation" in Spatial 2023-12-05 17:25:48 -06:00