New addon: Import_max #19
@ -668,7 +668,7 @@ def make_material_chunk(material, image):
|
|||||||
material_chunk.add_subchunk(make_material_subchunk(MATAMBIENT, wrap.emission_color[:3]))
|
material_chunk.add_subchunk(make_material_subchunk(MATAMBIENT, wrap.emission_color[:3]))
|
||||||
material_chunk.add_subchunk(make_material_subchunk(MATDIFFUSE, wrap.base_color[:3]))
|
material_chunk.add_subchunk(make_material_subchunk(MATDIFFUSE, wrap.base_color[:3]))
|
||||||
material_chunk.add_subchunk(make_material_subchunk(MATSPECULAR, material.specular_color[:]))
|
material_chunk.add_subchunk(make_material_subchunk(MATSPECULAR, material.specular_color[:]))
|
||||||
material_chunk.add_subchunk(make_percent_subchunk(MATSHINESS, wrap.roughness))
|
material_chunk.add_subchunk(make_percent_subchunk(MATSHINESS, 1 - wrap.roughness))
|
||||||
material_chunk.add_subchunk(make_percent_subchunk(MATSHIN2, wrap.specular))
|
material_chunk.add_subchunk(make_percent_subchunk(MATSHIN2, wrap.specular))
|
||||||
material_chunk.add_subchunk(make_percent_subchunk(MATSHIN3, wrap.metallic))
|
material_chunk.add_subchunk(make_percent_subchunk(MATSHIN3, wrap.metallic))
|
||||||
material_chunk.add_subchunk(make_percent_subchunk(MATTRANS, 1 - wrap.alpha))
|
material_chunk.add_subchunk(make_percent_subchunk(MATTRANS, 1 - wrap.alpha))
|
||||||
@ -716,7 +716,7 @@ def make_material_chunk(material, image):
|
|||||||
|
|
||||||
if wrap.roughness_texture:
|
if wrap.roughness_texture:
|
||||||
roughness = [wrap.roughness_texture]
|
roughness = [wrap.roughness_texture]
|
||||||
r_pct = material.roughness
|
r_pct = 1 - material.roughness
|
||||||
matmap = make_material_texture_chunk(MAT_SHINMAP, roughness, r_pct)
|
matmap = make_material_texture_chunk(MAT_SHINMAP, roughness, r_pct)
|
||||||
if matmap:
|
if matmap:
|
||||||
material_chunk.add_subchunk(matmap)
|
material_chunk.add_subchunk(matmap)
|
||||||
@ -749,7 +749,7 @@ def make_material_chunk(material, image):
|
|||||||
material_chunk.add_subchunk(make_material_subchunk(MATAMBIENT, material.line_color[:3]))
|
material_chunk.add_subchunk(make_material_subchunk(MATAMBIENT, material.line_color[:3]))
|
||||||
material_chunk.add_subchunk(make_material_subchunk(MATDIFFUSE, material.diffuse_color[:3]))
|
material_chunk.add_subchunk(make_material_subchunk(MATDIFFUSE, material.diffuse_color[:3]))
|
||||||
material_chunk.add_subchunk(make_material_subchunk(MATSPECULAR, material.specular_color[:]))
|
material_chunk.add_subchunk(make_material_subchunk(MATSPECULAR, material.specular_color[:]))
|
||||||
material_chunk.add_subchunk(make_percent_subchunk(MATSHINESS, material.roughness))
|
material_chunk.add_subchunk(make_percent_subchunk(MATSHINESS, 1 - material.roughness))
|
||||||
material_chunk.add_subchunk(make_percent_subchunk(MATSHIN2, material.specular_intensity))
|
material_chunk.add_subchunk(make_percent_subchunk(MATSHIN2, material.specular_intensity))
|
||||||
material_chunk.add_subchunk(make_percent_subchunk(MATSHIN3, material.metallic))
|
material_chunk.add_subchunk(make_percent_subchunk(MATSHIN3, material.metallic))
|
||||||
material_chunk.add_subchunk(make_percent_subchunk(MATTRANS, 1 - material.diffuse_color[3]))
|
material_chunk.add_subchunk(make_percent_subchunk(MATTRANS, 1 - material.diffuse_color[3]))
|
||||||
|
Reference in New Issue
Block a user