Skip to content

Commit

Permalink
minor changes for PR microsoft#831
Browse files Browse the repository at this point in the history
  • Loading branch information
sytelus committed Feb 22, 2018
1 parent dc95052 commit 291b3cd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Unreal/Plugins/AirSim/Source/PIPCamera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down
6 changes: 4 additions & 2 deletions docs/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
],
Expand Down Expand Up @@ -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).

Expand Down

0 comments on commit 291b3cd

Please sign in to comment.