Up to date

This page is up to date for Godot 4.2. If you still find outdated information, please open an issue.

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

int

bake_mask

4294967295

Resolution

resolution

2

Vector3

size

Vector3(2, 2, 2)

Texture3D

texture

float

thickness

1.0

Methods

bool

get_bake_mask_value ( int layer_number ) const

void

set_bake_mask_value ( int layer_number, bool value )


Enumerations

enum Resolution:

Resolution RESOLUTION_16 =