Commit graph

40 commits

Author SHA1 Message Date
Aaron Franke de3f6699a5
Rename Transform to Transform3D in core 2021-06-03 07:30:01 -04:00
jfons 4d9d99bb82 Implement occlusion culling
Added an occlusion culling system with support for static occluder meshes.
It can be enabled via `Project Settings > Rendering > Occlusion Culling > Use Occlusion Culling`.

Occluders are defined via the new `Occluder3D` resource and instanced using the new
`OccluderInstance3D` node. The occluders can also be automatically baked from a
scene using the built-in editor plugin.
2021-04-23 21:45:23 +02:00
Aaron Franke b8f66d58b6
Show a message when trying to zoom farther than the limit 2021-04-09 11:21:09 -04:00
jmb462 068300c7c9 Adding Raycast3D custom debug shape thickness and color 2021-03-04 11:17:26 +01:00
reduz d6a9cff8b7 Add preview Sun and Environment
* Adds both a preview sun and preview environment to the 3D editor.
* They are valid as long as a DirectionalLight3D and WorldEnvironment are not in the scene.
* If any is added to the scene, the respective preview is disabled.
* Changed WorldEnvironment to better handle multiple node versions.
* Added a function in SceneTree to get the first node in a group.
* Fixed button minimum size to also consider font height if no text is there, this broke with the TextSever PR.
2021-02-22 16:56:29 -03:00
reduz 288540a690 Fix editor always redrawing
-Only update rendering settings when project settings change
-Fixes the update spinner (and editor rendering) updating all the time.
-Added a "project_settings_changed" signal to EditorNode and EditorPlugin
2021-02-13 14:57:28 -03:00
jfons 73e62dffb9 3D editor grid improvements
This commit adds a view-dependant fade to the 3D viewport grid. It fades out
at steep view angles to hide the solid regions that appear far from the camera.
I also included a fade to hide the grid borders.

I added some improvements to the dynamic grid when the camera is in orthogonal mode.
It properly handles zoom now, and the grid center is now set to the intersection point
between the grid plane and the camera forward ray, keeping the grid
always visible.
2021-02-01 22:19:54 +01:00
reduz 099dee35f4 Added GPU based cluster builder
Clustering is now GPU based, uses an implementation based on the Activision algorithm.
2021-01-19 23:31:06 +01:00
Rafał Mikrut 8e7cbf315e Fix Leak with Gradient in Node3DEditorViewport 2021-01-04 10:06:46 +01:00
Rémi Verschelde b5334d14f7
Update copyright statements to 2021
Happy new year to the wonderful Godot community!

2020 has been a tough year for most of us personally, but a good year for
Godot development nonetheless with a huge amount of work done towards Godot
4.0 and great improvements backported to the long-lived 3.2 branch.

We've had close to 400 contributors to engine code this year, authoring near
7,000 commit! (And that's only for the `master` branch and for the engine code,
there's a lot more when counting docs, demos and other first-party repos.)

Here's to a great year 2021 for all Godot users 🎆
2021-01-01 20:19:21 +01:00
Hugo Locurcio b188913384
Color 3D editor frame time labels depending on the performance level
This provides easier visual grepping for each value
(CPU time, GPU time, FPS).
2020-12-26 22:59:46 +01:00
reduz d2302f53d6 Implement automatic LOD (Level of Detail)
-Happens on import by default for all models
-Just works (tm)
-Biasing can be later adjusted per node or per viewport (as well as globally)
-Disabled AABB.get_support test because its broken
2020-12-18 15:48:03 +01:00
Rémi Verschelde 90bdba576a
Merge pull request #43742 from qarmin/editor_modules_default_values
Initialize class/struct variables with default values in platform/ and editor/
2020-12-08 15:53:42 +01:00
Aaron Franke 5ef62e546f
Rename EditorNode3DGizmoPlugin "get_name" to "get_gizmo_name" 2020-12-04 19:34:50 -05:00
Rafał Mikrut e1811b689b Initialize class/struct variables with default values in platform/ and editor/ 2020-12-02 16:09:11 +01:00
Pedro J. Estébanez 4eb3286230 Put misc. 3D tool visible instances on their own layer
This makes that visible stuff invisible to ReflectionProbes, whose preview in the editor shouldn't involve them.
2020-11-26 20:11:00 +01:00
Aaron Franke 02161aad5a
Remove empty lines around braces with the formatting script 2020-11-16 23:38:11 -05:00
Rémi Verschelde a7d610db16
Merge pull request #43408 from rcorre/path-gizmos-4.0
Make Path3D handles visible and consistent with 2D.
2020-11-12 13:12:49 +01:00
Ryan Roden-Corrent 8458ba0aef
Proposal 1246: Make Path3D handles more visible.
Resolves godotengine/godot-proposals#1246.

It is difficult to tell the difference between the handles for adjusting
curves and the points themselves when looking at a Path gizmo.
This re-uses the icons used for Path2D.

Unlike Path2D, this does not use a different icon for smooth vs sharp
points, as using a potentially different material for each point would
prevent batching the points in add_handles (and adding them out-of-order
messes up other logic based on handle indices).

This includes a public API change to allow specifying a texture for a
handle material. This allows spatial gizmo plugins to customize the way
a handle is rendered, if desired, but does not break existing behavior
(as providing no texture uses the default).

The path handle icons were resized as well.  16x16 is the standard icon
size. These icons were 10x10 rather than 16x16, and appeared rather
small in the editor.

To resize, I:

- Opened the original in Inkscape
- Resized the document to 16x16
- Opened the transform dialog
- Scaled by 160% proportionally
- Used Align/Distribute to center on the page
- Saved the document
- Cleaned with `svgcleaner --multipass`
2020-11-12 06:37:56 -05:00
Hugo Locurcio 8a3a4fa3a0
Improve the 3D editor selection box appearance
- Draw two boxes slightly offset from each other to give the illustion
  of a thicker outline.
- Decrease the offset compared to the 3D node's AABB to give a more
  accurate representation of its size.
- Make the box fully visible instead of only displaying the corners.
- Draw a x-ray version of the box that's more translucent, but visible
  through walls. This helps make the box more visible while still
  having a sense of depth.
- Use an orange color similar to the 2D editor.
2020-11-09 16:24:12 +01:00
Yetizone 09356c1f67 node_3d_editor_plugin.h: Update header guard 2020-10-17 18:52:17 +03:00
Duroxxigar 4834e14493 Updated getters and setters names for toplevel 2020-10-02 19:09:01 -04:00
JFonS 5cd9e04447 Improve rotation gizmo
Hide the back sides of the rotation gizmo circles and add a white
outline for better visualization of the rotation "sphere".
2020-09-15 17:12:53 +02:00
Marcel Admiraal 26fcf2b04c Add override keywords. 2020-07-10 13:56:54 +01:00
Juan Linietsky 201d606b3d Addition of SDFGI for open world global illumination
Move GI to a deferred pass
2020-06-26 11:06:48 -03:00
Hugo Locurcio 4a542e0007
Restore previous mouse position when leaving the editor freelook mode
- Remove the crosshair as it no longer serves a purpose (the cursor will
  now appear where the user "expects" it to).

This closes https://github.com/godotengine/godot-proposals/issues/1076.
2020-06-17 20:02:46 +02:00
Aaron Franke 6c2df6792b
Change the default editor camera rotation to position it in +X +Y +Z 2020-06-07 13:36:04 -04:00
Aaron Franke 8879625879
Dynamic infinite 3D grid
Well, infinite for all intents and purposes.
2020-05-22 19:43:59 -04:00
Rémi Verschelde 0be6d925dc Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks
Which means that reduz' beloved style which we all became used to
will now be changed automatically to remove the first empty line.

This makes us lean closer to 1TBS (the one true brace style) instead
of hybridating it with some Allman-inspired spacing.

There's still the case of braces around single-statement blocks that
needs to be addressed (but clang-format can't help with that, but
clang-tidy may if we agree about it).

Part of #33027.
2020-05-14 16:54:55 +02:00
JFonS 051f02a3a0 Keep mouse inside 3D viewport rotation widget
Hide and keep the mouse in place when the user oribts the scene via the 3D
rotation widget.
2020-05-07 19:19:54 +02:00
jfons 3e77b6d49d Update Joint gizmos automatically 2020-04-21 21:51:33 +02:00
Hugo Locurcio 8a48fb3517
Add editor freelook navigation scheme settings
Depending on what one is trying to achieve, a different freelook mode
may be more desirable.

This closes #34034.
2020-04-18 16:24:12 +02:00
Juan Linietsky 5944eb6e7f Implement decals
Also implemented decal atlas, so projectors and other stuff can be added.
Sidenote: Had to make RID hashable, so some unrelated includes changed
in order to include it in hashfuncs.h
2020-04-14 11:13:34 -03:00
Juan Linietsky d06f8ef75a Shows proper scene render time in editor info
Also fixed GPU profiler, which was not working on nvidia hardware.
2020-04-10 14:19:30 -03:00
Juan Linietsky 4ffc0d6b3f Refactored shadowmapping.
- Made shadow bias size independent, so it will remain when changing light or camera size.
- Implemented normal offset bias, which greatly enhances quality.
- Added transmission to subsurface scattering
- Reimplemented shadow filter modes

Closes #17260
2020-04-08 11:19:43 -03:00
Rémi Verschelde 59d44ee872
Merge pull request #37505 from YeldhamDev/viewcont_rename
Rename ViewportContainer to SubViewportContainer
2020-04-03 15:53:35 +02:00
lupoDharkael 95a1400a2a Replace NULL with nullptr 2020-04-02 13:38:00 +02:00
Michael Alexsander 0c6851ae53 Rename ViewportContainer to SubViewportContainer 2020-04-01 16:11:44 -03:00
Juan Linietsky a6f3bc7c69 Renaming of servers for coherency.
VisualServer -> RenderingServer
PhysicsServer -> PhysicsServer3D
Physics2DServer -> PhysicsServer2D
NavigationServer -> NavigationServer3D
Navigation2DServer -> NavigationServer2D

Also renamed corresponding files.
2020-03-27 15:21:27 -03:00
Rémi Verschelde d1acbbce7f Rename more 2D and 3D nodes to follow convention
Rename editor plugins to match the new node names.
2020-03-27 16:26:34 +01:00
Renamed from editor/plugins/spatial_editor_plugin.h (Browse further)