Render 3D realistic images of EAGLE circuit boards

 Author:   Posted on:   Updated on:  2018-06-24T12:42:15Z

POV-Ray is able to render amazing images. This time we'll use it to generate 3D images of PCBs designed with EAGLE. Various fixes and improvements including HDRI lighting.

Did you ever wanted to see how some of your electronic projects would look before you actually build it? This post will show you how to create realistic images of your PCB designs that you can use in presentations, websites or only to get an idea of how it will look.

The process is the following: you design a PCB using CadSoft Autodesk EAGLE. Then, the Eagle3D script converts the EAGLE PCB file into a POV-Ray source. This is then rendered into something like below. POV-Ray is a very high quality and very configurable renderer. To make an idea of what ic can do with the right input, see the hall of fame of images rendered with it.

There is also a video version of this and some new improvements in: [Video] Render 3D images of EAGLE PCB projects.

This post will describe:
  • How to install POV-Ray. Linux users may want to compile POV-Ray (at the time of writing this there were no Ubuntu packages, you can now install from repositories).
  • How to use HDRI lighting to improve the quality of the rendered pictures.
  • How to install MegaPOV, a modified version of POV-Ray 3.6. Again, Linux users may want to compile from source. This is described below.
Hexapod Interface EAGLE example project
In the above render you can see Hexapod Interface EAGLE example project. Rendered using HDR Beverly Hills courthouse (sun) by Keith Bruns (available from and background texture by M0tty (Own work) [CC-BY-SA-3.0 (], via Wikimedia Commons.

Rendered vs. Real

POV-Ray rendered PCB boards vs. real PCB boards
Some rendered PCBs vs. real homemade PCBs

Required software:

  1. Cadsoft Autodesk EAGLE - will be used for schematic capture and PCB design.
  2. Eagle3D is the script that generates POV-Ray files from EAGLE PCBs.
  3. POV-Ray or MegaPOV is used to render images.


For the Linux/Ubuntu users:

Cadsoft Autodesk EAGLE is supplied both as 32 bit software and 64 bit software starting from version 7.3.0. It can be installed by running ./eagle*.run in a Terminal in the download directory.

Eagle3D doesn't need to be installed. Simply extract it to a folder of your choice (note that the subfolder povray is what Eagle3D_povray_folder refers to). There is a bug in file from povray folder. Go to line 3248 and replace disc {<9.45-2.5, H+0.05, 7.28-2> y,0.7,0.6.5 pigment{col}} with disc {<9.45-2.5, H+0.05, 7.28-2> y,0.7,0.65 pigment{col}} (remove that second point in 0.6.5 so it will be 0.65).

POV-Ray needs to be compiled. Ubuntu packages are now available in the Universe repository. You can install it with sudo apt-get install povray povray-examples povray-includes. Skip to the Linking section.

If you still want to compile it, then download the archive from GitHub and extract it to a folder. Open a Terminal and run the following commands:
cd povray-master
cd unix
sudo apt-get install build-essential libboost-dev zlib1g-dev libpng12-dev libjpeg8-dev libtiff5-dev libopenexr-dev autoconf automake libboost-thread-dev libxmu-dev libx11-dev libsdl1.2-dev libsvga1-dev
echo dummy > ./config/compile # do this ONLY if the following command errors  
cd ../
./configure COMPILED_BY="name <email>" LIBS="-lboost_system -lboost_thread" --with-x --disable-io-restrictions --with-svga
sudo make install


If you compiled POV-Ray (add the Library_Path at the end of the file that opens and save) or if you are using Windows:
gedit ~/.povray/3.7/povray.ini
If you installed from repository:
mkdir ~/.povray
mkdir ~/.povray/3.7
cp /etc/povray/3.7/povray.conf ~/.povray/3.7/povray.conf
cp /etc/povray/3.7/povray.ini ~/.povray/3.7/povray.ini
You must edit two text configuration files:
gedit ~/.povray/3.7/povray.ini
Here you will add at the end a line like below (replace Eagle3D_povray_folder accordingly):
And the other file is povray.conf:
gedit ~/.povray/3.7/povray.conf
Here look in the category [File I/O Security] where you will uncomment none and comment restricted to look like:
[File I/O Security]
none       ; all read and write operations on files are allowed.
;read-only  ; uses the "read+write" directories for writing (see below).
;restricted  ; uses _only_ "read" and "read+write" directories for file I/O.
Save and close the files.

For the Windows users:

You don't have to compile POV-Ray. It is simple to install. At the installation wizard don't forget to check Download Editor DLL and follow the instructions. The configuration file povray.ini may be in Program Files, POV-Ray subfolder or in user documents folder. And you don't have to worry about where it is, because you can open POV-Ray, go to Tools menu and choose Edit master POVRAY.INI. In this file you must add the Library_Path to Eagle3D files.

First render

Open a PCB in EAGLE and go to File - Run ULP. Browse to Eagle3D directory - ulp and select 3d50.ulp. Choose a language, accept license then select a folder where POV-Ray generated files will be placed. Go to POVRay tab and modify settings as (if using Windows adjust paths):

Eagle 3D (3d50.ulp) POV-Ray settings

Click Create POV-File and Exit. Select logos and sockets for ICs, LEDs color, crystals height etc. When you see the POV-Ray File successfully written dialog, you should have an image already generated. Look in the folder you selected when first launched 3d50.ulp. If there is no image, open a Terminal in this folder and run the bash script. Look for any errors.

This is the result:

Hexapod Interface EAGLE example project rendered with POV-Ray (no radiosity)
Hexapod Interface EAGLE example project rendered with POV-Ray
If this looks good, you should know that there are many improvements that can be made.

HDRI and radiosity in POV-Ray

Starting with version 3.7, POV-Ray supports HDRI lighting. Following Friedrich A. Lohm├╝ller How to create Realistic Skies with POV-Ray, POV-Wiki Radiosity without conventional lighting tutorial and Jaime Vives Piqueres Experiments with Eagle3D the following code should be added in the .pov file before the line #include "".
#declare hdrprobe = "sun.hdr"
#declare table = "wood_painting_texture.jpg"
// Radiosity
global_settings {
    radiosity {
    pretrace_start 0.05
    pretrace_end 0.005
    count 150
    nearest_count 10
    error_bound 0.5
    recursion_limit 1
    low_error_factor 0.5
    gray_threshold 0.5
    minimum_reuse 0.005
    maximum_reuse 0.2
    brightness 1
    adc_bailout 0.01
// default finish for all textures:
#default{texture{finish{emission 0 diffuse 1 }}}
// hdr environment
    image_map{ hdr hdrprobe
         gamma 1
         map_type 1 interpolate 2}
    rotate <0,90,0>
// wood table
    pigment{image_map{jpeg table}}
    normal{bump_map{jpeg table}}
    translate -.5 rotate <90,90,0> scale <10,10,5>*30
Replace the table and hdrprobe declarations with your own filenames. You'll need two files:
  • a HDR light probe. See the Resources section.
  • a texture. You can use Creative Commons Search to find those on the web. I used a file By M0tty (Own work) [CC-BY-SA-3.0 (], via Wikimedia Commons. Replace texture.jpg with the name of that texture.
Put these files in Eagle3D - povray subdirectory (the above Eagle3D_povray_folder).

The result is the first image in this post. To get that, some textures were also modified. The PCB (defined in as col_brd) got a bit of reflection (as seen on and a lower diffuse (0.4) than the default. Also the Gold and Silver textures defined in were added an emission of 0.1 (when using radiosity, these textures emit light).

Don't forget to change the version declaration from 3.5 to 3.7 (at the beggining of the .pov file). And of course, remove all four light_source definitions.

Automating things

There are 3 steps you need to do every time:
  1. Change file version to 3.7
  2. Paste the above contents in the file
  3. Remove light definitions
To make things easier, first of all save the above code into a file Put this file into the Eagle3D_povray_folder. Now, the 3d50.ulp must be edited. Go to Eagle3D - ulp folder and open that file in any text editor. Now edit the usrinc string and change  "#version 3.5;\n\n" to  "#version 3.7;\n\n" (it is on line 35). Edit also the incfiles string and add on line 64 "#include \"\"\n". All that's left now is to remove light definitions. There is no need to remove them as the Activate checkbox can be unchecked by default.

Ealge3D light sources settings dialog

The value is stored in lgtx_inf[10], where x ranges from 1 to 4. They can be found on lines 556 - 559. Change the value to 0 like this: lgt1_inf[10] = 0; for all four lights.

If you change often the texture and the HDR, you can remove those definitions (the first two lines with #declare) from and put them in 3d50.ulp to be added in the main .pov file.


If you want to follow Jaime Vives Piqueres Experiments with Eagle3D tutorial, you'll need MegaPOV. This is a custom build of POV-Ray 3.6 (which did not have HDRI support) and as POV-Ray 3.6 is not a multithreaded application.

There are Linux binaries on its website, but to be able to run that install script, you need to have POV-Ray 3.6 installed on your system, which may conflict with 3.7 on a Linux OS. There is no problem on Windows machines, as 3.6 and 3.7 install in different locations.

If you compile MegaPOV and use the include folder from POV-Ray 3.6 there is no need for a full POV-Ray 3.6 installation. Here is how to compile MegaPOV.

After you downloaded the archive and you extracted it to a folder, go to that folder and:
cd megapov-1.2.1
sudo apt-get install build-essential libx11-dev libxmu-dev libsvga1-dev
./configure COMPILED_BY="name <email>" --with-x --disable-io-restrictions --with-svga --disable-lib-checks
sudo make install
MegaPOV is based on POV-Ray 3.6 and it lacks some of its files. You'll have to download a v3.6 archive and add the required file to MegaPOV. Extract the include folder to a location you want (the location is mentioned below as include_folder_from_povray). Now, link that and Eagle3D to MegaPOV. Run:
gedit ~/.megapov/1.2.1/povray.ini
Add the following absolute paths (replace with your configuration):
On Windows, you'll have to install first an old version of POV-Ray (recommended v3.6 with exe installer, not msi - see this). You can have both POV-Ray 3.6 and 3.7 installed at the same time.


Additional parts

Here are some pages where you can find additional components. How to merge those with Eagle3D will be the subject of another post.
Eagle 3D was probably the best way to render realistic images of PCB but now it seems the author no longer maintains it. Have you succeeded in rendering some images? If not where are you having difficulties?

1 comment :

  1. very good ... sorry, I'm still learning and interested in the tutorial on this web ...
    I tried to make it from the step file (to-264) to render a big POV image ... is there a special setting for rendering it to a POV that matches the 0riginal to-264 ....
    I hope I can help ... thank you


Please read the comments policy before publishing your comment.