From 291b3cd49ef173756c9c8da0b6995a5966365d1c Mon Sep 17 00:00:00 2001 From: Shital Shah Date: Wed, 21 Feb 2018 18:38:19 -0800 Subject: [PATCH] minor changes for PR https://github.com/Microsoft/AirSim/pull/831 --- Unreal/Plugins/AirSim/Source/PIPCamera.cpp | 4 ++-- docs/settings.md | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Unreal/Plugins/AirSim/Source/PIPCamera.cpp b/Unreal/Plugins/AirSim/Source/PIPCamera.cpp index a1de19297f..7c63a9ac8f 100644 --- a/Unreal/Plugins/AirSim/Source/PIPCamera.cpp +++ b/Unreal/Plugins/AirSim/Source/PIPCamera.cpp @@ -145,7 +145,7 @@ void APIPCamera::updateCaptureComponentSetting(USceneCaptureComponent2D* capture if (!std::isnan(setting.fov_degrees)) capture->FOVAngle = setting.fov_degrees; - if (!std::isnan(setting.ortho_width)) + if (capture->ProjectionType == ECameraProjectionMode::Orthographic && !std::isnan(setting.ortho_width)) capture->OrthoWidth = NedTransform::toNeuUU(setting.ortho_width); updateCameraPostProcessingSetting(capture->PostProcessSettings, setting); @@ -160,7 +160,7 @@ void APIPCamera::updateCameraSetting(UCameraComponent* camera, const CaptureSett if (!std::isnan(setting.fov_degrees)) camera->SetFieldOfView(setting.fov_degrees); - if (!std::isnan(setting.ortho_width)) + if (camera->ProjectionMode == ECameraProjectionMode::Orthographic && !std::isnan(setting.ortho_width)) camera->SetOrthoWidth(NedTransform::toNeuUU(setting.ortho_width)); updateCameraPostProcessingSetting(camera->PostProcessSettings, setting); diff --git a/docs/settings.md b/docs/settings.md index f68771aa72..38c5d363d1 100644 --- a/docs/settings.md +++ b/docs/settings.md @@ -57,7 +57,7 @@ Below are complete list of settings available along with their default values. I "AutoExposureMinBrightness": 0.03, "MotionBlurAmount": 0, "TargetGamma": 1.0, - "ProjectionMode": "perspective", + "ProjectionMode": "", "OrthoWidth": 5.12 } ], @@ -124,7 +124,9 @@ Below are complete list of settings available along with their default values. I ```` ## Image Capture Settings -The `CaptureSettings` determines how different image types such as scene, depth, disparity, surface normals and segmentation views are rendered. The Width, Height and FOV settings should be self explanatory. The AutoExposureSpeed decides how fast eye adaptation works. We set to generally high value such as 100 to avoid artifacts in image capture. Simplarly we set MotionBlurAmount to 0 by default to avoid artifacts in groung truth images. For explanation of other settings, please see [this article](https://docs.unrealengine.com/latest/INT/Engine/Rendering/PostProcessEffects/AutomaticExposure/). +The `CaptureSettings` determines how different image types such as scene, depth, disparity, surface normals and segmentation views are rendered. The Width, Height and FOV settings should be self explanatory. The AutoExposureSpeed decides how fast eye adaptation works. We set to generally high value such as 100 to avoid artifacts in image capture. Simplarly we set MotionBlurAmount to 0 by default to avoid artifacts in groung truth images. The `ProjectionMode` decides the projection used by the capture camera and can take value "perspective" (default) or "orthographic". If projection mode is "orthographic" then `OrthoWidth` determines width of projected area captured in meters. + +For explanation of other settings, please see [this article](https://docs.unrealengine.com/latest/INT/Engine/Rendering/PostProcessEffects/AutomaticExposure/). The `ImageType` element determines which image type the settings applies to. The valid values are described in [ImageType section](image_apis.md#available-imagetype). In addition, we also support special value `ImageType: -1` to apply the settings to external camera (i.e. what you are looking at on the screen).