After you create a 3D scene, you can configure how a user-controlled camera interacts with the 3D scene.
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.
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.
Select among the following camera controller options:
None—Disables the camera for the 3D scene.
Spherical—Configures the camera to rotate around a fixed point. The fixed point is the point in the 3D scene at the center of the 3D picture control.
Flying—Configures the camera to fly freely through the 3D scene. If you select this option, be careful not to move the camera so far from the 3D objects that you no longer can see any of the objects.
Oriented—Configures the camera to rotate around a fixed point respective to the z-axis. If you select this option, LabVIEW prevents the camera from tilting to the right or left.
When you move the camera in the 3D scene, LabVIEW redraws the scene to update the view you see in the 3D picture control.
(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 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.
Run the VI to generate the 3D scene.
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.