summaryrefslogtreecommitdiff
path: root/scene/3d/visual_instance_3d.cpp
AgeCommit message (Collapse)Author
2023-01-20Sort decals and lights based on camera originclayjohn
Also implement sort_offset for decals Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
2023-01-05One Copyright Update to rule them allRémi Verschelde
As many open source projects have started doing it, we're removing the current year from the copyright notice, so that we don't need to bump it every year. It seems like only the first year of publication is technically relevant for copyright notices, and even that seems to be something that many companies stopped listing altogether (in a version controlled codebase, the commits are a much better source of date of publication than a hardcoded copyright statement). We also now list Godot Engine contributors first as we're collectively the current maintainers of the project, and we clarify that the "exclusive" copyright of the co-founders covers the timespan before opensourcing (their further contributions are included as part of Godot Engine contributors). Also fixed "cf." Frenchism - it's meant as "refer to / see".
2022-12-29Add safety-checks before some servers `free()`Adam Scott
2022-12-23Merge pull request #69998 from BastiaanOlij/sorting-pivot-4Rémi Verschelde
Added options for sorting transparent objects (port of PR #63040)
2022-12-23Added options for sorting transparent objects (port of PR 63040)Bastiaan Olij
2022-12-17Merge pull request #70114 from clayjohn/custom-aabbRémi Verschelde
Expose GeometryInstance3D.custom_aabb property
2022-12-15Expose GeometryInstance3D.custom_aabb propertyclayjohn
2022-12-15Fix the update of the inspector when instance shader uniform has changedYuri Rubinsky
2022-11-09Some fixes for instance shader parametersYuri Rubinsky
2022-11-03Fix typo in method of visual_instance_3dPatrick Siemsen
2022-10-31Merge pull request #67588 from KoBeWi/if(!GDVIRTUAL_CALL)don'tRémi Verschelde
Simplify GDVIRTUAL_CALL calls
2022-10-19Simplify GDVIRTUAL_CALL callskobewi
2022-10-18Remove the global space `get_transformed_aabb` helper methodAaron Franke
2022-09-19Change return type of `get_configuration_warnings` to `PackedStringArray`Marc Gilleron
2022-09-01Rename `uniform` to `parameter` across the engineYuri Rubinsky
2022-08-04Rename shader parameter uniform setter/getter methods for consistencyHugo Locurcio
`shader_uniform` is now consistenly used across both per-shader and per-instance shader uniform methods. This makes methods easier to find in the class reference when looking for them.
2022-07-27Tweak Decal distance fade defaults and add property hintsHugo Locurcio
The new default values are more usable in real world scenarios when smooth fading of distant decals is desired for performance reasons. The Decal distance fade property hints were adjusted based on the GeometryInstance3D visibility range fade property hints. `or_greater` was also added to allow specifying larger values if needed.
2022-06-23Use the Static global illumination mode in GeometryInstance3D by defaultHugo Locurcio
This makes VoxelGI and SDFGI work out of the box with primitive meshes, loaded OBJ meshes and CSG nodes.
2022-06-11Add suffixes to all nodes and resourcesFireForge
2022-05-26Fix errors when materials attached to 3d object are not freedYuri Rubinsky
2022-05-19Use suffixes for units in nodes and resourcesAaron Franke
2022-03-28String: Remove TTR and DTR defines in non-tools buildRémi Verschelde
This ensures we don't use TTR in runtime code, as it's specifically meant to source translations for the editor.
2022-03-10Discern between virtual and abstract class bindingsreduz
* Previous "virtual" classes (which can't be instantiated) are not corretly named "abstract". * Added a new "virtual" category for classes, they can't be instantiated from the editor, but can be inherited from script and extensions. * Converted a large amount of classes from "abstract" to "virtual" where it makes sense. Most classes that make sense have been converted. Missing: * Physics servers * VideoStream * Script* classes. which will go in a separate PR due to the complexity involved.
2022-02-15Use `switch` consistently in `_notification` (`scene` folder)Rémi Verschelde
2022-01-20Merge pull request #55360 from Calinou/rename-bake-mode-propertiesRémi Verschelde
2022-01-05Added material_overlay property to MeshInstance3DFernando Cosentino
Applying overlay materials into multi-surface meshes currently requires adding a next pass material to all the surfaces, which might be cumbersome when the material is to be applied to a range of different geometries. This also makes it not trivial to use AnimationPlayer to control the material in case of visual effects. The material_override property is not an option as it works replacing the active material for the surfaces, not adding a new pass. This commit adds the material_overlay property to GeometryInstance3D (and therefore MeshInstance3D), having the same reach as material_override (that is, all surfaces) but adding a new material pass on top of the active materials, instead of replacing them.
2022-01-04Merge pull request #55370 from ↵JFonS
Calinou/geometryinstance3d-lod-fade-node-configuration-warning Emit node configuration warnings for GeometryInstance3D distance fade
2022-01-03Update copyright statements to 2022Rémi Verschelde
Happy new year to the wonderful Godot community!
2021-12-14Rename and reorder bake mode properties for consistencyHugo Locurcio
The order now goes from least to most computationally expensive: - Disabled - Static - Dynamic
2021-11-26Emit node configuration warnings for GeometryInstance3D distance fadeHugo Locurcio
The visibility range begin/end margin properties must be set above 0.0 for the fade transition to be visible.
2021-10-25Implement distance fade and transparencyJFonS
The built-in ALPHA in spatial shaders comes pre-set with a per-instance transparency value. Multiply by it if you want to keep it. The transparency value of any given GeometryInstance3D is affected by: - Its new "transparency" property. - Its own visiblity range when the new "visibility_range_fade_mode" property is set to "Self". - Its parent visibility range when the parent's fade mode is set to "Dependencies". The "Self" mode will fade-out the instance when reaching the visibility range limits, while the "Dependencies" mode will fade-in its dependencies. Per-instance transparency is only implemented in the forward clustered renderer, support for mobile should be added in the future. Co-authored-by: reduz <reduzio@gmail.com>
2021-08-13Merge pull request #51607 from aaronfranke/includesRémi Verschelde
Fix some unnecessary includes
2021-08-13Fix some unnecessary includesAaron Franke
2021-08-12Use the Unicode multiplication symbol where relevantHugo Locurcio
2021-08-12Uniformize layer names, script methods and documentationPouleyKetchoupp
- Back to 1-based layer names to make it clearer in editor UI - Layer bit accessors are renamed to layer value and 1-based too - Uniform errors and documentation in render and physics - Fix a few remaining collision_layer used in place of collision_mask
2021-07-28Add node configuration warning for GeometryInstance3D distanceHugo Locurcio
2021-07-23Use C++ iterators for Lists in many situationsAaron Franke
2021-07-07Merge pull request #50193 from reduz/fix-command-queue-crashRémi Verschelde
Fix Command Queue Crash
2021-07-07Fix Command Queue Crashreduz
* No longer allow sending an object (texture) to the server as material parameter * Keep a parameter cache locally in ShaderMaterial
2021-07-04Allow using ORMMaterial3D by using BaseMaterial3D as a resource hintHugo Locurcio
Previously, only StandardMaterial3D could be defined as an alternative to ShaderMaterial. This also reorders the CanvasItemMaterial property hints to follow alphabetical order (which is enforced by the inspector).
2021-07-01Use PROPERTY_USAGE_NONE instead of 0 for no property usageAaron Franke
Also use const more often.
2021-06-14Implement visibility range and dependencies.jfons
This commit adds the following properties to GeometryInstance3D: `visibility_range_begin`, `visibility_range_begin_margin`, `visibility_range_end`, `visibility_range_end_margin`. Together they define a range in which the GeometryInstance3D will be visible from the camera, taking hysteresis into account for state changes. A begin or end value of 0 will be ignored, so the visibility range can be open-ended in both directions. This commit also adds the `visibility_parent` property to 'Node3D'. Which defines the visibility parents of the node and its subtree (until another parent is defined). Visual instances with a visibility parent will only be visible when the parent, and all of its ancestors recursively, are hidden because they are closer to the camera than their respective `visibility_range_begin` thresholds. Combining visibility ranges and visibility parents users can set-up a quick HLOD system that shows high detail meshes when close (i.e buildings, trees) and merged low detail meshes for far away groups (i.e. cities, woods).
2021-06-03Rename Transform to Transform3D in coreAaron Franke
2021-04-23Implement occlusion cullingjfons
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-02-10Removed _change_notifyreduz
-For inspector refresh, the inspector now detects if a property change by polling a few times per second and then does update the control if so. This process is very cheap. -For property list refresh, a new signal (property_list_changed) was added to Object. _change_notify() is replaced by notify_property_list_changed() -Changed all objects using the old method to the signal, or just deleted the calls to _change_notify(<property>) since they are unnecesary now.
2021-02-07Initialize class variables with default values in scene/ [1/2]Rafał Mikrut
2021-02-04doc: Don't bind argument names with p_ prefixRémi Verschelde
This prefix is used in the C++ codebase, not in the scripting API.
2021-01-01Update copyright statements to 2021Rémi Verschelde
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 🎆
2020-12-18Implement automatic LOD (Level of Detail)reduz
-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-05-14Style: Enforce braces around if blocks and loopsRémi Verschelde
Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html