from_material method

from_material

Allow convert other material to PbrMaterial

Returns

def from_material(self, 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