Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
GPUParticlesCollisionSDF3D¶
Inherits: GPUParticlesCollision3D < VisualInstance3D < Node3D < Node < Object
A baked signed distance field 3D particle collision shape affecting GPUParticles3D nodes.
Description¶
A baked signed distance field 3D particle collision shape affecting 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 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 MeshInstance3Ds within the size will be taken into account for baking, regardless of their GeometryInstance3D.gi_mode.
Note: Baking a GPUParticlesCollisionSDF3D's 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 Texture3Ds into its texture property in an exported project.
Note: ParticleProcessMaterial.collision_mode must be ParticleProcessMaterial.COLLISION_RIGID or ParticleProcessMaterial.COLLISION_HIDE_ON_CONTACT on the GPUParticles3D's process material for collision to work.
Note: Particle collision only affects GPUParticles3D, not CPUParticles3D.
Properties¶
|
||
|
||
|
||
|
Methods¶
get_bake_mask_value ( int layer_number ) const |
|
void |
set_bake_mask_value ( int layer_number, bool value ) |
Enumerations¶
enum Resolution:
Resolution RESOLUTION_16 = 0
Bake a 16×16×16 signed distance field. This is the fastest option, but also the least precise.
Resolution RESOLUTION_32 = 1
Bake a 32×32×32 signed distance field.
Resolution RESOLUTION_64 = 2
Bake a 64×64×64 signed distance field.
Resolution RESOLUTION_128 = 3
Bake a 128×128×128 signed distance field.
Resolution RESOLUTION_256 = 4
Bake a 256×256×256 signed distance field.
Resolution RESOLUTION_512 = 5
Bake a 512×512×512 signed distance field. This is the slowest option, but also the most precise.
Resolution RESOLUTION_MAX = 6
Represents the size of the Resolution enum.