@@ -901,59 +901,22 @@ protected bool ExportLight (GameObject unityGo, FbxScene fbxScene, FbxNode fbxNo
901
901
}
902
902
// The color of the light.
903
903
var unityLightColor = unityLight . color ;
904
-
905
904
fbxLight . Color . Set ( new FbxDouble3 ( unityLightColor . r , unityLightColor . g , unityLightColor . b ) ) ;
906
905
907
- // TODO: commandBufferCount Number of command buffers set up on this light (Read Only).
908
-
909
- // cookie The cookie texture projected by the light.
910
- var unityCookieTexture = unityLight . cookie ;
911
-
912
- if ( unityCookieTexture != null )
913
- {
914
- // Find its filename
915
- var textureSourceFullPath = AssetDatabase . GetAssetPath ( unityCookieTexture ) ;
916
- if ( textureSourceFullPath != "" ) {
917
-
918
- // get absolute filepath to texture
919
- textureSourceFullPath = Path . GetFullPath ( textureSourceFullPath ) ;
920
-
921
- fbxLight . FileName . Set ( textureSourceFullPath ) ;
922
- fbxLight . DrawGroundProjection . Set ( true ) ;
923
- fbxLight . DrawVolumetricLight . Set ( true ) ;
924
- fbxLight . DrawFrontFacingVolumetricLight . Set ( false ) ;
925
- }
926
- }
927
-
928
- // TODO: cullingMask This is used to light certain objects in the scene selectively.
929
- // TODO: flare The flare asset to use for this light.
930
-
931
906
// Set the Intensity of a light is multiplied with the Light color.
932
- fbxLight . Intensity . Set ( unityLight . intensity * 100.0f /*compensate for Maya scaling by system units*/ ) ;
933
-
934
- // TODO: isBaked Is the light contribution already stored in lightmaps and/or lightprobes (Read Only).
935
- // TODO: lightmapBakeType This property describes what part of a light's contribution can be baked.
907
+ fbxLight . Intensity . Set ( unityLight . intensity * UnitScaleFactor /*compensate for Maya scaling by system units*/ ) ;
936
908
937
909
// Set the range of the light.
938
910
// applies-to: Point & Spot
939
911
// => FarAttenuationStart, FarAttenuationEnd
940
912
fbxLight . FarAttenuationStart . Set ( 0.01f /* none zero start */ ) ;
941
913
fbxLight . FarAttenuationEnd . Set ( unityLight . range * UnitScaleFactor ) ;
942
914
943
- // TODO: renderMode How to render the light.
944
-
945
915
// shadows Set how this light casts shadows
946
916
// applies-to: Point & Spot
947
917
bool unityLightCastShadows = unityLight . shadows != LightShadows . None ;
948
918
fbxLight . CastShadows . Set ( unityLightCastShadows ) ;
949
919
950
- // TODO: shadowBias Shadow mapping constant bias.
951
- // TODO: shadowCustomResolution The custom resolution of the shadow map.
952
- // TODO: shadowNearPlane Near plane value to use for shadow frustums.
953
- // TODO: shadowNormalBias Shadow mapping normal-based bias.
954
- // TODO: shadowResolution The resolution of the shadow map.
955
- // TODO: shadowStrength Strength of light's shadows.
956
-
957
920
fbxNode . SetNodeAttribute ( fbxLight ) ;
958
921
959
922
// set +90 post rotation on x to counteract for FBX light's facing -Y direction by default
0 commit comments