BBMOD has a powerful material system. Setting up a completely custom material is an advanced topic, outside of the scope of this quickstart guide. For the starters, you can create a clone of one of these materials:
and change its base texture:
matSwordHilt = BBMOD_MATERIAL_DEFAULT.clone();
matSwordHilt.BaseOpacity = sprite_get_texture(SprSwordHilt, 0);
matSwordBlade = BBMOD_MATERIAL_DEFAULT.clone();
matSwordBlade.BaseOpacity = sprite_get_texture(SprSwordBlade, 0);
You can use method set_material to assign materials to models:
modSword.set_material("Hilt", matSwordHilt)
.set_material("Blade", matSwordBlade);
Make sure to always use a shader that is compatible with your model (i.e. you
cannot use BBMOD_MATERIAL_DEFAULT_ANIMATED
for a model that does not have
bones). For more info on materials, see the documentation of
BBMOD_BaseMaterial.
Note: If you are interested in using PBR materials, see the PBR module section for more info on PBR materials in BBMOD.
Copyright © 2022, BlueBurn. Built on April 11, 2022 using GMDoc.