HammeriteAudioMaterials

Audio. Inherits RefCounted

What each material does to sound: a table of material names to HammeriteAudioMaterial.

It answers one question - what does OAK do to sound - and deliberately not the other one. Which material a given texture IS is the game's to say, because a texture name is geometry's and what it MEANS belongs to whoever authored the level: see HammeriteAudioRuntime.material_resolver. This table used to answer both, by taking the first material whose name appeared anywhere in the texture name - so textile was tile, environment contained iron, and a plank texture with stone in its specifier was stone (#241).

Assign a table of your own as HammeriteAudio.materials and every bake from then on samples rooms against it. Without one the defaults below apply.

Fallback for a material the table has never heard of, so that get_material() always answers something a room can be built of.

Properties

TypeNameDefault
HammeriteAudioMaterialdefault_material

Methods

ReturnsMethod
voidadd_material(material: HammeriteAudioMaterial)
HammeriteAudioMaterialfind_material(material_name: StringName) const
HammeriteAudioMaterialget_material(material_name: StringName) const
StringName[]get_material_names() const
boolhas_material(material_name: StringName) const
boolremove_material(material_name: StringName)

Property descriptions

default_material

var default_material: HammeriteAudioMaterial

Undocumented.

Method descriptions

add_material()

func add_material(material: HammeriteAudioMaterial) -> void

Undocumented.

find_material()

func find_material(material_name: StringName) -> HammeriteAudioMaterial

Undocumented.

get_material()

func get_material(material_name: StringName) -> HammeriteAudioMaterial

Undocumented.

get_material_names()

func get_material_names() -> StringName[]

Undocumented.

has_material()

func has_material(material_name: StringName) -> bool

Undocumented.

remove_material()

func remove_material(material_name: StringName) -> bool

Undocumented.

Hammerite 2.0 · built from 6d57ab2d, 2026-10-17