将材质导入到AssImp中时,属性会减少到一个较小的子集(漫反射、发射等)。有没有办法访问不属于该子集的材质属性?例如,在下面的示例中,我可以获得refl_samples吗?
例如:
FBX文件中的此材质
Material: 1821000800, "Material::MRTest", "" {
Version: 102
ShadingModel: "unknown"
MultiLayer: 0
Properties70: {
P: "ShadingModel", "KString", "", "", "unknown"
P: "AmbientColor", "ColorRGB", "Color", "",0.847058892250061,0.501960813999176,0.898039281368256
P: "DiffuseColor", "ColorRGB", "Color", "",0.847058892250061,0.501960813999176,0.898039281368256
P: "SpecularColor", "ColorRGB", "Color", "",0.600000023841858,0.600000023841858,0.600000023841858
P: "SpecularFactor", "double", "Number", "",2
P: "ShininessExponent", "double", "Number", "",1024
P: "TransparencyFactor", "double", "Number", "",0
P: "EmissiveColor", "ColorRGB", "Color", "",0,0,0
P: "EmissiveFactor", "double", "Number", "",0
P: "3dsMax", "Compound", "", ""
P: "3dsMax|ClassIDa", "int", "Integer", "",1890604853
P: "3dsMax|ClassIDb", "int", "Integer", "",1242969684
P: "3dsMax|SuperClassID", "int", "Integer", "",3072
P: "3dsMax|Parameters", "Compound", "", ""
P: "3dsMax|Parameters|diff_color", "ColorAndAlpha", "", "A",0.847058892250061,0.501960813999176,0.898039281368256,1
P: "3dsMax|Parameters|diff_rough", "Float", "", "A",0
P: "3dsMax|Parameters|diff_weight", "Float", "", "A",1
P: "3dsMax|Parameters|refl_color", "ColorAndAlpha", "", "A",1,1,1,1
P: "3dsMax|Parameters|refl_gloss", "Float", "", "A",1
P: "3dsMax|Parameters|refl_samples", "Integer", "", "A",8
.
.
.将被简化为:
<MatPropertyList num="12">
<MatProperty key="?mat.name"
type="string" tex_usage="n/a" tex_index="0">
"GreenTeapot"
</MatProperty>
<MatProperty key="$clr.diffuse"
type="float" tex_usage="n/a" tex_index="0" size="3">
0.133333 0.796079 0.172549
</MatProperty>
<MatProperty key="$clr.emissive"
type="float" tex_usage="n/a" tex_index="0" size="3">
0.000000 0.000000 0.000000
</MatProperty>
<MatProperty key="$clr.ambient"
type="float" tex_usage="n/a" tex_index="0" size="3">
0.133333 0.796079 0.172549
</MatProperty>
<MatProperty key="$clr.specular"
type="float" tex_usage="n/a" tex_index="0" size="3">
0.000000 0.000000 0.000000
</MatProperty>
<MatProperty key="$mat.opacity"
type="float" tex_usage="n/a" tex_index="0" size="1">
1.000000
</MatProperty>
<MatProperty key="$mat.reflectivity"
type="float" tex_usage="n/a" tex_index="0" size="1">
0.000000
</MatProperty>
<MatProperty key="$mat.shinpercent"
type="float" tex_usage="n/a" tex_index="0" size="1">
2.000000
</MatProperty>
<MatProperty key="$mat.shininess"
type="float" tex_usage="n/a" tex_index="0" size="1">
2.000000
</MatProperty>发布于 2016-09-19 11:56:03
后处理方法可能会删除这些属性。尝试在您的标志中不使用aiProcess_RemoveRedundantMaterials。如果您想删除其他材料而只保留少量材料,则可以使用AI_CONFIG_PP_RRM_EXCLUDE_LIST对其进行配置
https://stackoverflow.com/questions/39552022
复制相似问题