GPUParticlesAttractorVectorField3D

Inherits: GPUParticlesAttractor3D < VisualInstance3D < Node3D < Node < Object

Box-shaped 3D particle attractor with strength varying within the box, affecting GPUParticles3D nodes.

Description

Box-shaped 3D particle attractor with strength varying within the box, affecting GPUParticles3D nodes.

Unlike GPUParticlesAttractorBox3D, GPUParticlesAttractorVectorField3D uses a texture to affect attraction strength within the box. This can be used to create complex attraction scenarios where particles travel in different directions depending on their location. This can be useful for weather effects such as sandstorms.

Note: Particle attractors only affect GPUParticles3D, not CPUParticles3D.

Properties

Vector3

extents

Vector3(1, 1, 1)

Texture3D

texture

Property Descriptions

Default

Vector3(1, 1, 1)

Setter

set_extents(value)

Getter

get_extents()

The extents of the vector field box in 3D units.


Setter

set_texture(value)

Getter

get_texture()

The 3D texture to be used. Values are linearly interpolated between the texture's pixels.

Note: To get better performance, the 3D texture's resolution should reflect the extents of the attractor. Since particle attraction is usually low-frequency data, the texture can be kept at a low resolution such as 64×64×64.