123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148 |
- :github_url: hide
- .. DO NOT EDIT THIS FILE!!!
- .. Generated automatically from Godot engine sources.
- .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
- .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/GPUParticlesCollisionSDF3D.xml.
- .. _class_GPUParticlesCollisionSDF3D:
- GPUParticlesCollisionSDF3D
- ==========================
- **Inherits:** :ref:`GPUParticlesCollision3D<class_GPUParticlesCollision3D>` **<** :ref:`VisualInstance3D<class_VisualInstance3D>` **<** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
- Baked signed distance field 3D particle attractor affecting :ref:`GPUParticles3D<class_GPUParticles3D>` nodes.
- Description
- -----------
- Baked signed distance field 3D particle attractor affecting :ref:`GPUParticles3D<class_GPUParticles3D>` nodes.
- Signed distance fields (SDF) allow for efficiently representing approximate collision shapes for convex and concave objects of any shape. This is more flexible than :ref:`GPUParticlesCollisionHeightField3D<class_GPUParticlesCollisionHeightField3D>`, but it requires a baking step.
- \ **Baking:** The signed distance field texture can be baked by selecting the ``GPUParticlesCollisionSDF3D`` node in the editor, then clicking **Bake SDF** at the top of the 3D viewport. Any *visible* :ref:`MeshInstance3D<class_MeshInstance3D>`\ s touching the :ref:`extents<class_GPUParticlesCollisionSDF3D_property_extents>` will be taken into account for baking, regardless of their :ref:`GeometryInstance3D.gi_mode<class_GeometryInstance3D_property_gi_mode>`.
- \ **Note:** Baking a ``GPUParticlesCollisionSDF3D``'s :ref:`texture<class_GPUParticlesCollisionSDF3D_property_texture>` is only possible within the editor, as there is no bake method exposed for use in exported projects. However, it's still possible to load pre-baked :ref:`Texture3D<class_Texture3D>`\ s into its :ref:`texture<class_GPUParticlesCollisionSDF3D_property_texture>` property in an exported project.
- \ **Note:** :ref:`ParticlesMaterial.collision_enabled<class_ParticlesMaterial_property_collision_enabled>` must be ``true`` on the :ref:`GPUParticles3D<class_GPUParticles3D>`'s process material for collision to work.
- \ **Note:** Particle collision only affects :ref:`GPUParticles3D<class_GPUParticles3D>`, not :ref:`CPUParticles3D<class_CPUParticles3D>`.
- Properties
- ----------
- +---------------------------------------------------------------+-------------------------------------------------------------------------+----------------------+
- | :ref:`Vector3<class_Vector3>` | :ref:`extents<class_GPUParticlesCollisionSDF3D_property_extents>` | ``Vector3(1, 1, 1)`` |
- +---------------------------------------------------------------+-------------------------------------------------------------------------+----------------------+
- | :ref:`Resolution<enum_GPUParticlesCollisionSDF3D_Resolution>` | :ref:`resolution<class_GPUParticlesCollisionSDF3D_property_resolution>` | ``2`` |
- +---------------------------------------------------------------+-------------------------------------------------------------------------+----------------------+
- | :ref:`Texture3D<class_Texture3D>` | :ref:`texture<class_GPUParticlesCollisionSDF3D_property_texture>` | |
- +---------------------------------------------------------------+-------------------------------------------------------------------------+----------------------+
- | :ref:`float<class_float>` | :ref:`thickness<class_GPUParticlesCollisionSDF3D_property_thickness>` | ``1.0`` |
- +---------------------------------------------------------------+-------------------------------------------------------------------------+----------------------+
- Enumerations
- ------------
- .. _enum_GPUParticlesCollisionSDF3D_Resolution:
- .. _class_GPUParticlesCollisionSDF3D_constant_RESOLUTION_16:
- .. _class_GPUParticlesCollisionSDF3D_constant_RESOLUTION_32:
- .. _class_GPUParticlesCollisionSDF3D_constant_RESOLUTION_64:
- .. _class_GPUParticlesCollisionSDF3D_constant_RESOLUTION_128:
- .. _class_GPUParticlesCollisionSDF3D_constant_RESOLUTION_256:
- .. _class_GPUParticlesCollisionSDF3D_constant_RESOLUTION_512:
- .. _class_GPUParticlesCollisionSDF3D_constant_RESOLUTION_MAX:
- enum **Resolution**:
- - **RESOLUTION_16** = **0** --- Bake a 16×16×16 signed distance field. This is the fastest option, but also the least precise.
- - **RESOLUTION_32** = **1** --- Bake a 32×32×32 signed distance field.
- - **RESOLUTION_64** = **2** --- Bake a 64×64×64 signed distance field.
- - **RESOLUTION_128** = **3** --- Bake a 128×128×128 signed distance field.
- - **RESOLUTION_256** = **4** --- Bake a 256×256×256 signed distance field.
- - **RESOLUTION_512** = **5** --- Bake a 512×512×512 signed distance field. This is the slowest option, but also the most precise.
- - **RESOLUTION_MAX** = **6** --- Represents the size of the :ref:`Resolution<enum_GPUParticlesCollisionSDF3D_Resolution>` enum.
- Property Descriptions
- ---------------------
- .. _class_GPUParticlesCollisionSDF3D_property_extents:
- - :ref:`Vector3<class_Vector3>` **extents**
- +-----------+----------------------+
- | *Default* | ``Vector3(1, 1, 1)`` |
- +-----------+----------------------+
- | *Setter* | set_extents(value) |
- +-----------+----------------------+
- | *Getter* | get_extents() |
- +-----------+----------------------+
- The collision SDF's extents in 3D units. To improve SDF quality, the :ref:`extents<class_GPUParticlesCollisionSDF3D_property_extents>` should be set as small as possible while covering the parts of the scene you need.
- ----
- .. _class_GPUParticlesCollisionSDF3D_property_resolution:
- - :ref:`Resolution<enum_GPUParticlesCollisionSDF3D_Resolution>` **resolution**
- +-----------+-----------------------+
- | *Default* | ``2`` |
- +-----------+-----------------------+
- | *Setter* | set_resolution(value) |
- +-----------+-----------------------+
- | *Getter* | get_resolution() |
- +-----------+-----------------------+
- The bake resolution to use for the signed distance field :ref:`texture<class_GPUParticlesCollisionSDF3D_property_texture>`. The texture must be baked again for changes to the :ref:`resolution<class_GPUParticlesCollisionSDF3D_property_resolution>` property to be effective. Higher resolutions have a greater performance cost and take more time to bake. Higher resolutions also result in larger baked textures, leading to increased VRAM and storage space requirements. To improve performance and reduce bake times, use the lowest resolution possible for the object you're representing the collision of.
- ----
- .. _class_GPUParticlesCollisionSDF3D_property_texture:
- - :ref:`Texture3D<class_Texture3D>` **texture**
- +----------+--------------------+
- | *Setter* | set_texture(value) |
- +----------+--------------------+
- | *Getter* | get_texture() |
- +----------+--------------------+
- The 3D texture representing the signed distance field.
- ----
- .. _class_GPUParticlesCollisionSDF3D_property_thickness:
- - :ref:`float<class_float>` **thickness**
- +-----------+----------------------+
- | *Default* | ``1.0`` |
- +-----------+----------------------+
- | *Setter* | set_thickness(value) |
- +-----------+----------------------+
- | *Getter* | get_thickness() |
- +-----------+----------------------+
- The collision shape's thickness. Unlike other particle colliders, ``GPUParticlesCollisionSDF3D`` is actually hollow on the inside. :ref:`thickness<class_GPUParticlesCollisionSDF3D_property_thickness>` can be increased to prevent particles from tunneling through the collision shape at high speeds, or when the ``GPUParticlesCollisionSDF3D`` is moved.
- .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
- .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
- .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
- .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
- .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
- .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|