1 - About

This tool is a simple 3D viewer for Gerber files. It's only displaying PCBs, and is primarily intended as a validation tool to review Gerber files before sending them to a PCB fab house.

Only recent Windows (Vista and later) are supported so far, 32bits and 64bits.


All support is done by email, through jerome.vuarand@gmail.com.

Feel free to ask for further developments. I can't guarantee that I'll develop everything you ask, but I want my code to be as useful as possible, so I'll do my best to help you. You can also send me request or bug reports (for code and documentation). All constructive criticism is welcome. All non-constructive criticism will be thoroughly examined, considered, printed, shredded, burned and used as fertilizer for carbon capturing plants :D.

Whenever the application terminates with a Lua error, that error has been reported online automatically. To help identify errors that happened to you, please fill in the user configuration option (see hacking below). If for some reason you don't want to effortlessly contribute to improving this wonderful software that you got for free, you can disable error reports by setting the report_errors configuration option to false (no link to the hacking section here, you're on your own to find it :D).


This tool was inspired by the Mayhew Labs online 3D Gerber viewer. It was started to overcome some limitations from the Mayhew Labs viewer.

The logo was inspired by another kind of Gerber. Hopefully it will be seen as a tribute rather than a copyright infringement.

This tool is written and maintained by Jérôme Vuarand.

It is available under a MIT-style license.

2 - Installation

Go to the downloads page. Download the latest ZIP file for your architecture. Unzip it somewhere. Run grbv.exe or grbv.com (see manual below).

3 - Manual

The tool comes in two forms. A file grbv.exe is expected to be run by clicking it, by creating a shortcut to it, or by associating it with your gerber files. It's a purely GUI application. A file grbv.com is expected to be run from the command line. It logs stuff to the console, opening one if necessary. It's better suited to override some parameters from the command line. If you set the tool directory in your %PATH% environment variable, the grbv.com application should take precedence, so that simply typing grbv from a command line starts the console version.

Once the viewer is started, you can drop Gerber files on its window, or use the keys F5 to F8 to load demo boards (taken from the Mayhew Labs viewer, these are open hardware projects). Note that it may take a while to load the boards, but subsequent loading (and colorscheme changes) will be faster thanks to some caching (assuming the Gerber files don't change).

Gerber files are identified by their extension. You have to drop all files belonging to a board at the same time if you want to view them together. You can also pass the root name of the board on the command line (with the -board option, see hacking below) without extension, and the tool will try to load all files with same root name. The extensions are detected as follow:

You can also press the keys F9 to F12 to change the color scheme. They are loosely based on the Mayhew Labs viewer, the Seeed Studio PCB fab, the OSH Park PCB fab, and Altium software respectively.

You can then zoom in and out using the mouse wheel, rotate the board using a left click drag, and move the board around using a right click drag.

You can press the Print Screen key to take a screenshot. This will be saved as a PNG file in the tool root directory. Note when the tool is run in translucent mode (see hacking below to turn it off), the PNG files will have a transparent background (which can be quite handy to post pictures of your boards on a colorful website). To avoid post-processing, you can resize the window to fit the expected image size (the PNG file have the same resolution as the window). To make that easier you can set the width and height configuration options (see hacking below) to start the tool at that resolution.

You can press the S key to save the currently loaded board as a textured 3D mesh to import the board in another application. This will open a file selection dialog that lets you select the name of the exported mesh. It should have the .obj file extension, as the mesh is in Wavefront .obj format. In the same directory three other files will be created: a material file with the extension .mtl, a top texture with the extension -top.png and a bottom texture with the extension -bottom.png. All four files are required to import the mesh into your other application.

Press escape, alt-F4 or click the close button on the title bar to close the viewer.

4 - Hacking

This tool is written in Lua, and can be modified quite easily without recompilation.

Configuration files

The first thing you can modify in grbv are configuration files. Several modules use such a file: it should be named module.conf, in the root directory of the tool. Modules reading configuration files include gui, render, display. The tool itself (which main code is in grbv.lua) will look for a grbv.conf file. Look at the modules source code to see available options. For example to replace the translucent background with a white background, you can write the following to grbv.conf:

translucent = false

To configure the user name used in error reports (to help me find you in my logs), you can write:

user = "John Doe <john.doe@example.com>"

The configuration files are Lua scripts, with globals writes going to the respective module configuration table. If a file doesn't exist (most don't in the grbv packages), you can simply create a new empty text file, with notepad for example.

Command line arguments

In addition to grbv.conf, all the main script configuration parameters can be set from the command line. The parameter name should be prefixed with a dash, and the parameter passed in a separate argument. For example to start with a white background you can start grbv like that:

grbv -translucent false

Strings don't need to be quoted. To load a specific board from the command line, you can write:

grbv -board path/to/my/board

To use a specific color scheme (see below), you can write:

grbv -colors flex

Color schemes

Colors schemes are defined in separate files in the colors subdirectory. They are actually board templates, since they define not only the various layers colors, but also the board thickness. The four templates assigned to the Fxx keys can be changed with the quick_colors configuration option. The default color used can be set with the colors configuration option, and it falls back to quick_colors[1] if it exists, and the template named 'default' otherwise.

The templates are Lua files. Feel free to modify them or create your own (and eventually submit them to me for inclusion in future releases).

Source code

All Lua modules and the main tool script are packaged as interpreted source files, so you can modify them directly in your installation to change the tool behaviour. Just explore all the .lua files.

The C code is available on the BitBucket repository of this tool. It's not straightforward to compile it or all the dependencies, so feel free to ask for help if you're interested.


All data files can also be modified or replaced quite easily. In particular the GLSL shaders used for rendering can be modified if you want some specific look. I provided the application icon as a separate gerber.ico file for shortcuts or file associations.