From 2f2fe92b6247513f5ec02c98acd7c5a0f002b2c9 Mon Sep 17 00:00:00 2001 From: Matt Oliver Date: Mon, 9 Jan 2017 16:13:25 +1100 Subject: [PATCH] FBX: Add additional material properties. Currently there isnt a AI_MATKEY_DISPLACEMENTSCALING define but fbx supports the value so for the moment it is just manually specified. --- code/FBXConverter.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/code/FBXConverter.cpp b/code/FBXConverter.cpp index be7c41f..848da57 100644 --- a/code/FBXConverter.cpp +++ b/code/FBXConverter.cpp @@ -2134,6 +2134,16 @@ void Converter::SetShadingPropertiesCommon( aiMaterial* out_mat, const PropertyT if ( ok ) { out_mat->AddProperty( &ShininessExponent, 1, AI_MATKEY_SHININESS ); } + + const float BumpFactor = PropertyGet(props, "BumpFactor", ok); + if (ok) { + out_mat->AddProperty(&BumpFactor, 1, AI_MATKEY_BUMPSCALING); + } + + const float DispFactor = PropertyGet(props, "DisplacementFactor", ok); + if (ok) { + out_mat->AddProperty(&DispFactor, 1, "$mat.displacementscaling", 0, 0); + } } -- 2.7.4