Configuring a Camera for a 3D Scene
- Updated2025-01-22
- 2 minute(s) read
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.
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.
Complete the following steps to configure a camera for a 3D scene rendered in a 3D picture control.
- Create a 3D scene or open a VI that contains a 3D scene.
- 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.
- (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.
- 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.
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.