The KHR_materials_volume extension specifies that attenuationDistance is an optional number, with the default being infinity. But if a gltf_json::extensions::material::Volume is serialized with attenuation_distance: AttenuationDistance::default(), the output contains JSON null instead of omitting the field. This is rejected by gltf::import() and other glTF validators.
The
KHR_materials_volume
extension specifies thatattenuationDistance
is an optional number, with the default being infinity. But if agltf_json::extensions::material::Volume
is serialized withattenuation_distance: AttenuationDistance::default()
, the output contains JSONnull
instead of omitting the field. This is rejected bygltf::import()
and other glTF validators.