This repository provides a comprehensive shader setup that you can use to turn exported PCB models into photorealisitc rendered images in Blender. As an example the Blender file includes this scene:
If you just want to download the Blender project, we recommend you to not clone this repo since it's very large in file size. Instead you can download the .blend
file and all necessary textures from the Releases page as a compressed ZIP folder.
If you want to know how this Blender file was created, you can read our articles about this on our blog:
- Rendering PCBs (Part 1) - Preparation, Textures and UV Unwrapping
- Rendering PCBs (Part 2) - Shader Setup
- Rendering PCBs (Part 3) - Final steps
The articles are available in 🇬🇧 and 🇩🇪. If you have any technical question or recommendation, feel free to open an Issue or Pull Request!
Inputs:
Outputs:
Name | Type | Description |
---|---|---|
Shader | Shader |
A combination of silkscreen, soldermask and copper materials according to the layer masks. There is also a material between the top and bottom which is visible on the sides of the PCB. |
Displacement | Displacement Map |
Contains bumps on the surface caused by different layers. |
Eventhough the shader configuration is quite complex, we encourage you to look into it and play around with the materials and parameters. We tried our best to configure the materials as realistic as possible, but don't hesitate to change them for your needs as you may find even more realistic parameters.
This repository contains a Blender project file which is quite large. Hence, it's best to compress this file before pushing any changes. To make life easier, there is a Python script named tools.py
which can be used for compressing and uncompressing the .blend
file. Also you can use it to setup a pre-commit hook which will automatically compress the right file before you create a commit.
Here is how you can use this script:
usage: tools.py [-h] command [file]
Tools for stylized-blender-setup
positional arguments:
command Determines type of operation. See command list below.
file Path to target file
optional arguments:
-h, --help show this help message and exit
command list:
compress Compress .blend file using gzip and create .blend.gz file
uncompress Uncompress .blend.gz file using gzip and create .blend file
install Setup pre-commit hook for automatic compression before committing.
NOTE: This script uses standard packages of Python, so you don't have to install additional dependencies. The functionality was tested under Linux. It may not work on other systems.