ParticleFieldSphericalHarmonicsAttributeAPI
Defines the spherical harmonics attributes for a ParticleField, such as the spherical harmonics degree and coefficients.
The degree is constant across all particles in the ParticleField.
The coefficients are provided in both float and half types for
easy data footprint affordance. Data consumers should prefer the
float version if available.
The length of the coefficients attribute is expected to match the
length of any provided position data times the per-particle element size
derived from the SH degree, specifically element size = (degree+1)*(degree+1)).
If it is too long it will be truncated to be compatible with the number of
particles defined by the position data. If it is too short it will be ignored.
If it is ignored or not populated, the particle should use a SH
coefficient corresponding to a DC signal of (0.5, 0.5, 0.5),
with degree 0.
Properties
radiance:sphericalHarmonicsCoefficients
USD type: float3[]
An array of spherical harmonics
coefficients, in float precision. The coefficients are grouped in the array by
particle, meaning each particle has N contiguous coefficients, Y(m,l) sorted
first by order (m) and then within the order by index (l). A renderer can compute
an element size per particle based on the SH degree, and use that to stripe
the array by particle.
The length of this attribute is expected to
match the length of any provided position data for the ParticleField times the
per-particle element size derived from the SH degree, specifically
element size = (degree+1)*(degree+1)). If it is
too long it will be truncated to the number of particles defined by the position
data. If it is too short it will be ignored.
radiance:sphericalHarmonicsCoefficientsh
USD type: half3[]
An array of spherical harmonics
coefficients, in half precision. If the float version
(sphericalHarmonicsCoefficients) is defined, that version should be preferred.
The coefficients are grouped in the array by
particle, meaning each particle has N contiguous coefficients, Y(m,l) sorted
first by order (m) and then within the order by index (l). A renderer can compute
an element size per particle based on the SH degree, and use that to stripe
the array by particle.
The length of this attribute is expected to
match the length of any provided position data for the ParticleField times the
per-particle element size derived from the SH degree, specifically
element size = (degree+1)*(degree+1)). If it is
too long it will be truncated to the number of particles defined by the position
data. If it is too short it will be ignored.
radiance:sphericalHarmonicsDegree
USD type: int
Fallback value: 3
Defines the highest degree of the spherical
harmonics. A degree of N implies a coefficient element size (per particle) of
(N+1)*(N+1) values. The spherical harmonics degree is the same for all
particles in the ParticleField.