How to Set Up Lighting and Camera in FreeCAD
Rendering a 3D model in FreeCAD requires configuring a dedicated camera view and an appropriate lighting environment using external rendering engines integrated via the Render Workbench. This guide covers how to install the necessary tools, establish precise camera angles and perspective settings, and position various light sources—including point lights, directional lights, and HDRIs—to produce clean, realistic visualizations directly from your CAD workspace.
1. Install and Activate the Render Workbench
FreeCAD’s built-in Raytracing workbench is largely deprecated. Modern rendering relies on the Render Workbench, which supports open-source external render engines like LuxCoreRender, Appleseed, and POV-Ray.
- Go to Tools > Addon manager.
- Search for and install the Render workbench.
- Restart FreeCAD, open your project, and switch to the Render workbench from the workbench dropdown.
2. Setting Up the Camera
The camera defines the viewpoint, focal length, and perspective of the rendered image.
Aligning the Viewport
- Rotate, pan, and zoom in the FreeCAD 3D viewport until you find your desired composition.
- Ensure the view mode is set to perspective rather than orthographic by pressing V then P, or selecting View > Perspective view. Orthographic views lack natural depth and can make renders look flat.
Creating and Adjusting the Camera Object
- Create a new Render project using the engine of your choice (e.g., LuxCoreRender or Appleseed) by clicking the Create a Project icon.
- Click the Create Camera icon. FreeCAD generates a camera matching your current viewport angle and places it in the model tree inside your project container.
- Select the newly created Camera object in the Tree
view and review the Property view (Data tab):
- Position / Placement: Fine-tune the X, Y, and Z coordinates of the camera.
- LookAt: Define the precise point in 3D space the camera is focused on.
- Focal Length: Set the lens focal length (e.g., 35mm for standard wide-angle, 50mm for human eye perspective, 85mm+ for product shots with minimal distortion).
3. Setting Up Lighting
Proper lighting creates depth, highlights edges, and casts realistic shadows. The Render workbench provides tools to insert specific light types.
Choosing Light Types
- Point Light: Emits light in all directions from a single point. Useful for interior fixtures, lightbulbs, or local fill lighting.
- Directional (Sun) Light: Emits parallel rays of light from an infinitely distant source. Ideal for outdoor scenes and strong, uniform cast shadows.
- Area Light: Emits soft, diffuse light from a rectangular surface. Best for studio product renders and soft shadow transitions.
- Environment / HDRI Map: Wraps the scene in an image-based high-dynamic-range light source, providing realistic ambient reflections and global illumination.
Implementing a Standard Three-Point Lighting Setup
For general product rendering, use three directional or area lights:
- Key Light (Primary):
- Insert a light using the workbench lighting tools.
- Position it roughly 45 degrees to the side and 45 degrees above the subject.
- Set its intensity/power higher than all other lights. This defines the main form and shadows.
- Fill Light (Secondary):
- Position a second light on the opposite side of the camera, roughly 30 degrees to the side.
- Set the intensity to roughly 30% to 50% of the key light to soften harsh shadows without creating competing dark areas.
- Rim / Backlight:
- Position a light behind and slightly above the object, pointing toward the back edges facing the camera.
- This creates an edge highlight that visually separates the model from the background.
Configuring Light Properties
Select any light object in the Tree view to modify its attributes in the Data tab:
- Color: Shift slightly off-white (e.g., slight yellow for warm sunlight, pale blue for ambient sky/fill) to avoid sterile results.
- Power / Flux / Intensity: Adjust based on the engine scale (different render engines calculate lumens and watts differently).
- Placement: Use the Placement dialog to alter position and aim vectors.
4. Final Render Preview
- Ensure the camera and all created lights reside inside your active Render Project folder in the Tree view.
- Select the Render project item.
- Click the Render button in the toolbar to launch the external engine process.
- If highlights are blown out or shadows are too dark, cancel the render, adjust the individual light intensities or camera exposure settings in the Property view, and re-render.