mirror of
https://github.com/aelurum/AssetStudio.git
synced 2025-05-25 05:40:21 -04:00
add default values to materials
This commit is contained in:
parent
6a5ec80de7
commit
4a46f897bd
@ -422,15 +422,15 @@ namespace AssetStudio
|
||||
Color reflection = mat->Reflection;
|
||||
pMat = FbxSurfacePhong::Create(pScene, pMatName);
|
||||
pMat->Diffuse.Set(FbxDouble3(diffuse.R, diffuse.G, diffuse.B));
|
||||
pMat->DiffuseFactor.Set(FbxDouble(diffuse.A));
|
||||
//pMat->DiffuseFactor.Set(FbxDouble(diffuse.A));
|
||||
pMat->Ambient.Set(FbxDouble3(ambient.R, ambient.G, ambient.B));
|
||||
pMat->AmbientFactor.Set(FbxDouble(ambient.A));
|
||||
//pMat->AmbientFactor.Set(FbxDouble(ambient.A));
|
||||
pMat->Emissive.Set(FbxDouble3(emissive.R, emissive.G, emissive.B));
|
||||
pMat->EmissiveFactor.Set(FbxDouble(emissive.A));
|
||||
//pMat->EmissiveFactor.Set(FbxDouble(emissive.A));
|
||||
pMat->Specular.Set(FbxDouble3(specular.R, specular.G, specular.B));
|
||||
pMat->SpecularFactor.Set(FbxDouble(specular.A));
|
||||
//pMat->SpecularFactor.Set(FbxDouble(specular.A));
|
||||
pMat->Reflection.Set(FbxDouble3(reflection.R, reflection.G, reflection.B));
|
||||
pMat->ReflectionFactor.Set(FbxDouble(reflection.A));
|
||||
//pMat->ReflectionFactor.Set(FbxDouble(reflection.A));
|
||||
pMat->Shininess.Set(FbxDouble(mat->Shininess));
|
||||
pMat->TransparencyFactor.Set(FbxDouble(mat->Transparency));
|
||||
pMat->ShadingModel.Set(lShadingName);
|
||||
|
@ -566,6 +566,14 @@ namespace AssetStudio
|
||||
}
|
||||
iMat = new ImportedMaterial();
|
||||
iMat.Name = mat.m_Name;
|
||||
//default values
|
||||
iMat.Diffuse = new Color(0.8f, 0.8f, 0.8f, 1);
|
||||
iMat.Ambient = new Color(0.2f, 0.2f, 0.2f, 1);
|
||||
iMat.Emissive = new Color(0, 0, 0, 1);
|
||||
iMat.Specular = new Color(0.2f, 0.2f, 0.2f, 1);
|
||||
iMat.Reflection = new Color(0, 0, 0, 1);
|
||||
iMat.Shininess = 20f;
|
||||
iMat.Transparency = 0f;
|
||||
foreach (var col in mat.m_SavedProperties.m_Colors)
|
||||
{
|
||||
switch (col.Key)
|
||||
|
Loading…
Reference in New Issue
Block a user