Configuring a Camera for a 3D Scene

After you create a 3D scene, you can configure how a user-controlled camera interacts with the 3D scene.

Note Note  The following procedure explains how to configure a camera for a 3D scene rendered in a 3D picture control. If you configure a scene window for viewing the 3D scene, you must use the SceneWindow properties to configure the camera for the scene window programmatically.

Refer to the 3D Model of Solar System VI in the labview\examples\Graphics and Sound\3D Picture Control directory for an example of configuring a camera for a 3D scene window.

 Open example  Find related examples

Complete the following steps to configure a camera for a 3D scene rendered in a 3D picture control.

  1. Create a 3D scene or open a VI that contains a 3D scene.
  2. On the front panel, right-click the 3D picture control and move the cursor over Camera Controller in the shortcut menu to display the available options.
  3. Select among the following camera controller options: When you move the camera in the 3D scene, LabVIEW redraws the scene to update the view you see in the 3D picture control.
  4. (Optional) To disable automatic redrawing, right-click the 3D picture control and select Camera Controller»Auto Redraw from the shortcut menu to remove the checkmark next to the option. Disabling automatic redrawing is useful when you make multiple updates to a 3D scene and do not want the view of the 3D scene to change until you complete all the updates.
Note Note  If you disable automatic redrawing, you can use a loop, such as a For Loop or While Loop, to update the 3D scene. Enclose the VIs, properties, and methods that compose the 3D scene in the loop. LabVIEW redraws the 3D scene with each iteration of the loop, which updates the view to match the current camera perspective.
  1. Run the VI to generate the 3D scene.
  2. Use the Operating tool to click and drag in the 3D picture control and move the camera around the 3D scene. You can zoom in and out of the 3D scene by holding the <Shift> key while using the Operating tool to click and drag. You can reposition the camera in the plane of the screen by holding the <Ctrl> key while using the Operating tool to click and drag. (macOS) Press the <Option> key. (Linux) Press the <Alt> key.

You also can use the Camera Controller:Type and Camera Controller:Auto Redraw properties to configure camera controller options for a 3D scene rendered in a 3D picture control programmatically.