This guide explains how to associate 3D models with footprints, embed model files, use ray tracing in the 3D Viewer, and generate 3D PCBA models from the command line.

In everyday PCB design, most of the work involves 2D pads, traces, and silkscreen graphics. However, a completed product must eventually exist in the physical world. Component height, connector orientation, and mechanical clearance with the enclosure are difficult to evaluate accurately from a 2D view alone.
KiCad provides powerful 3D visualization capabilities that are useful for much more than producing attractive design images. A 3D model can help you:
- Inspect component placement: Clearly view the actual physical dimensions and relative positions of components.
- Avoid mechanical risks: Detect at an early stage whether a tall capacitor may interfere with an enclosure or whether a connector may collide with nearby components.
- Improve manufacturability: Check whether connectors, switches, and similar components are oriented correctly for user operation and production-line assembly.
- Collaborate with mechanical engineers: Export a complete 3D board model in STEP format for use in mechanical CAD and product enclosure design.
Where to Find KiCad 3D Models
Before associating a model with a footprint, you need a suitable 3D model file. Common sources include the following:
-
KiCad official library: KiCad includes a large 3D model library covering most standard component footprints. This is usually the first source to check.
-
Component manufacturer websites: Manufacturers such as Molex, TE Connectivity, and Würth Elektronik commonly provide accurate STEP models for connectors, inductors, and other important components. These models are generally the most reliable because they are created for specific part numbers.
-
Component data services: Services such as SnapEDA, Ultra Librarian, and SamacSys often provide 3D models together with schematic symbols and footprints.
-
General-purpose 3D model communities: FreeCAD Electronics Library, GrabCAD, 3D ContentCentral, and TraceParts contain many models shared by engineers.

Tip: Prefer the
.STEPformat when possible. STEP files contain accurate mechanical data and are well suited to collaboration with MCAD tools. The.WRLformat is usually smaller and can include color information, making it useful for quick visual previews.
Associating a 3D Model with a Footprint
The following example uses a common USB Type-C connector to demonstrate how to associate a downloaded 3D model with its footprint.
Step 1: Open the Footprint Properties and Add the Model
-
In the KiCad PCB Editor or Footprint Editor, select the footprint to which you want to add a model.
-
Press
Eto open the Footprint Properties dialog. -
Switch to the 3D Models tab.
-
Click the folder icon in the lower-left corner, browse to the prepared model file, and select it. For example, the file may be named
USB_C_Receptacle_Amp.step.

Step 2: Adjust the Model Orientation
After adding the model, the preview window will often show the 3D model and the footprint out of alignment. This is normal. The model must be adjusted using the scale, rotation, and offset parameters.

- Scale: Corrects the model dimensions. If the model uses a different unit system, such as inches, while KiCad uses millimeters, scale values can be used to compensate. In most cases, the X, Y, and Z scale values should remain
1. - Rotation: This is usually the most important adjustment. Change the rotation angle around the X, Y, and Z axes so that the model pins and locating posts align with the footprint pads and through-holes.
- Offset: Moves the model in three-dimensional space. Adjust the X, Y, and Z values to align the model with the footprint center. The Z-axis offset is particularly important because it positions the bottom of the model accurately on the PCB surface.
Adjustment technique: Do not try to make every correction at once. First adjust the Z-axis rotation so that the model faces the correct direction. Then adjust the X and Y offsets to center the model. Next, correct any tilt by changing the X- and Y-axis rotations. Finally, fine-tune the Z-axis offset so that the model sits correctly on the board. The preview updates in real time after each change, making the alignment process straightforward.
Step 3: Check the Complete Board in the 3D Viewer
When the alignment in the preview window is satisfactory, click OK to save the settings. Return to the PCB Editor and open the complete board view by pressing Alt + 3, or select View > 3D Viewer from the menu.
KiCad will render the entire PCB in three dimensions. You can drag with the left mouse button to rotate the view, scroll the mouse wheel to zoom, and use the middle mouse button to pan. The USB Type-C connector should now appear correctly positioned on the virtual PCB.
Embedding 3D Models in a PCB or Footprint Library
In versions before KiCad 9, STEP models and PCB footprints were stored as separate files and linked through the model path defined in the footprint. When a PCB project was shared or transferred, the associated 3D model files also had to be copied. If those files were missing, the models could not be displayed correctly.
KiCad 9 supports file embedding, allowing a 3D model to be embedded directly into a PCB or footprint. Embedded models can significantly increase the project file size, but they provide an important advantage: copying the PCB file is sufficient to preserve the complete 3D representation.

Embedding is especially useful when a project must be shared with other engineers or transferred between design environments. It reduces the risk of broken relative paths and missing library files, although the resulting file size and project-management requirements should be considered.
Ray Tracing and Advanced Rendering Settings
KiCad's 3D Viewer does more than display component models. It also includes a rendering engine with ray-tracing support, allowing PCB images to achieve a more realistic, almost photographic appearance.
In the 3D Viewer, open Preferences > 3D Viewer to access the advanced settings.

When ray tracing is enabled, KiCad uses physically based ray-tracing calculations to simulate how light reflects and refracts through the scene. This produces more realistic shadows, highlights, reflections, and material effects on the PCB, components, and enclosure-related geometry.
You can compare the rendered result before and after enabling ray tracing. Changing the viewing angle and adjusting the available parameters can also help you evaluate how the board surface, component bodies, and metallic parts appear under different lighting conditions.

Automating 3D Export with the Command-Line Interface
From the PCB Editor, select File > Export to export the board in several 3D formats, including STEP, GLB, BREP, XAO, PLY, and STL.

Manual export becomes inefficient when 3D files must be generated frequently or integrated into an automated workflow such as continuous integration and continuous delivery. KiCad 7.0 and later versions provide a command-line interface that can export a STEP file directly from a terminal or command prompt.
kicad-cli pcb export step [options] <input_file.kicad_pcb>
For example, if the project file is MyProject.kicad_pcb and the desired output file is MyProject.step, use the following command:
kicad-cli pcb export step --output "MyProject.step" "MyProject.kicad_pcb"
After the command completes, a STEP file containing the board's 3D models is created in the current directory. This approach is useful for processing multiple projects, generating deliverables on a server, or incorporating PCB 3D export into an automated engineering workflow.
Conclusion
Adding 3D models to a PCB design is not merely a visual enhancement. It is a practical engineering method for evaluating the physical aspects of a product at an early design stage. Accurate models make it easier to identify enclosure interference, verify connector orientation, assess component height, and communicate the board structure to mechanical engineers.
By associating models with footprints, correcting their orientation and position, embedding files when appropriate, using ray tracing for realistic visualization, and automating STEP export through the CLI, KiCad can provide a complete bridge between 2D PCB layout and the physical product.