from_material method

from_material(, material)

Allow convert other material to PbrMaterial

Returns


@staticmethod
def from_material(material):
    ...
ParameterTypeDescription
materialMaterial

Example

from aspose.threed.shading import LambertMaterial, Material, PbrMaterial, Texture
from aspose.threed.utilities import Vector3

mat = LambertMaterial()
tex = Texture()
tex.file_name = "diffuse.png"
mat.set_texture(Material.MAP_DIFFUSE, tex)
mat.diffuse_color = Vector3(0.3, 0.9, 0.4)
pbr = PbrMaterial.from_material(mat)

See Also