Skip to content

Commit c372a67

Browse files
committed
Add MultiView Product Renderer add-on v1.3.0
Blender add-on for batch-rendering CAD products across a consistent multi-view camera rig. - STEP import via STEPper or a FreeCAD subprocess, run modally so Blender stays responsive and Esc cancels - Standardization: recenter, uniform rescale to a target size, and auto-smooth for tessellated CAD normals, baked into the mesh - Camera rig with shared ortho/perspective framing that is aspect-ratio aware, plus user-defined custom views - Four studio lighting presets and world background control - Batch render in full, clay, or both, with deterministic PREFIX_NN_Product_View file naming Includes MIT license, README, and a tag-triggered workflow that builds and attaches the add-on zip to a GitHub release.
1 parent 4883c54 commit c372a67

6 files changed

Lines changed: 1976 additions & 0 deletions

File tree

‎.github/workflows/release.yml‎

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Build add-on zip
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: write
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Build zip
19+
run: zip -r multiview_product_renderer.zip multiview_product_renderer -x '*__pycache__*' '*.pyc'
20+
21+
- name: Upload build artifact
22+
uses: actions/upload-artifact@v4
23+
with:
24+
name: multiview_product_renderer
25+
path: multiview_product_renderer.zip
26+
27+
- name: Attach zip to the release
28+
if: startsWith(github.ref, 'refs/tags/')
29+
env:
30+
GH_TOKEN: ${{ github.token }}
31+
run: |
32+
gh release create "$GITHUB_REF_NAME" multiview_product_renderer.zip \
33+
--title "$GITHUB_REF_NAME" --generate-notes \
34+
|| gh release upload "$GITHUB_REF_NAME" multiview_product_renderer.zip --clobber

‎.gitignore‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
__pycache__/
2+
*.py[cod]
3+
*.blend1
4+
*.blend2
5+
/dist/
6+
/renders/
7+
8+
# Local STEP files for manual testing - keep the folder and its README, ignore the CAD
9+
/test_files/*
10+
!/test_files/README.md
11+
.DS_Store
12+
Thumbs.db

‎LICENSE‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 Danyals-code
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

‎README.md‎

Lines changed: 251 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,251 @@
1+
# MultiView Product Renderer
2+
3+
A Blender add-on for turning CAD products into consistent, batch-rendered image sets.
4+
5+
Import STEP files, standardize them at the world origin, build a rig of orthographic and
6+
perspective cameras plus 3-point studio lighting, then render every product across every
7+
view in one click, with predictable file names like `AA_01_Widget_Front_clay.png`.
8+
9+
- **Blender:** 4.0 and newer
10+
- **Panel location:** `3D Viewport → Sidebar (N key) → MultiView`
11+
- **Version:** 1.3.0
12+
13+
---
14+
15+
## Install
16+
17+
### Option A: download the release zip (recommended)
18+
19+
1. Go to the [**Releases**](../../releases/latest) page and download
20+
**`multiview_product_renderer.zip`**.
21+
2. In Blender: `Edit → Preferences → Add-ons`.
22+
- Blender **4.2+**: `Install from Disk...` (in the top-right dropdown menu)
23+
- Blender **4.0 / 4.1**: `Install...`
24+
3. Pick the zip you downloaded. **Do not unzip it first.**
25+
4. Tick the checkbox next to **MultiView Product Renderer** to enable it.
26+
5. Press `N` in the 3D viewport and open the **MultiView** tab.
27+
28+
### Option B: clone the repo
29+
30+
```bash
31+
git clone https://github.com/Danyals-code/MultiView-Product-Render-Blender-Addon.git
32+
```
33+
34+
Copy the `multiview_product_renderer` folder into your Blender add-ons directory:
35+
36+
| OS | Path |
37+
| --- | --- |
38+
| Windows | `%APPDATA%\Blender Foundation\Blender\4.x\scripts\addons\` |
39+
| macOS | `~/Library/Application Support/Blender/4.x/scripts/addons/` |
40+
| Linux | `~/.config/blender/4.x/scripts/addons/` |
41+
42+
Restart Blender and enable the add-on as in step 4 above.
43+
44+
---
45+
46+
## STEP import setup (optional)
47+
48+
You only need this if you want to import `.step` / `.stp` files directly. If you already
49+
have meshes in your scene, skip it. The add-on works with any geometry.
50+
51+
Open `Edit → Preferences → Add-ons → MultiView Product Renderer` and expand the
52+
preferences:
53+
54+
| Setting | What it does |
55+
| --- | --- |
56+
| **STEP Import Mode** | `Auto` tries the STEPper add-on first, then falls back to FreeCAD. Or force one. |
57+
| **FreeCAD Executable** | Path to `freecadcmd.exe` (Windows) or `freecadcmd` (macOS/Linux). |
58+
| **Tessellation Deflection** | FreeCAD mode only. Lower = finer mesh, bigger files. Default `0.1`. |
59+
60+
**FreeCAD route**: install [FreeCAD](https://www.freecad.org/) and point the preference at
61+
its console binary, typically:
62+
63+
```
64+
C:\Program Files\FreeCAD 0.21\bin\freecadcmd.exe
65+
```
66+
67+
The add-on shells out to FreeCAD, tessellates each solid into a mesh, writes a temporary
68+
OBJ, and imports that. Nothing is left behind in your FreeCAD install, and the scratch
69+
directory is removed even if you cancel. FreeCAD is run with its standard input closed, so
70+
a build that stops to ask a question fails immediately instead of stalling the import.
71+
Any single conversion is given 15 minutes before it is stopped.
72+
73+
**STEPper route**: if you own the STEPper add-on, install and enable it; MultiView detects
74+
and uses its import operator automatically.
75+
76+
---
77+
78+
## Workflow
79+
80+
The sidebar is laid out in the order you should use it.
81+
82+
### 1. Scene Setup
83+
84+
Pick a lighting preset and a background, then **Apply Scene Setup**. This builds an
85+
`MV_Lighting` collection and sets the world background.
86+
87+
| Lighting preset | Look |
88+
| --- | --- |
89+
| **Studio Soft** | Large soft area lights, even fill. Default. |
90+
| **Studio Hard** | Smaller lights, crisper shadows and highlights. |
91+
| **Dramatic** | Strong key, deep falloff, minimal fill. |
92+
| **High Key** | Bright, near-shadowless, white-on-white product look. |
93+
94+
**Intensity** multiplies the preset's light energies. **Transparent Background** renders
95+
alpha instead of the **Background Color**. `Rebuild Lighting` and `Apply Background` re-run
96+
either half on its own.
97+
98+
### 2. Import Products
99+
100+
Add one or more STEP files to the list and click **Import STEP Files**. Each file becomes
101+
its own collection under `MV_Products`. That grouping is what the batch renderer iterates
102+
over.
103+
104+
Import runs in the background: the status bar shows `MultiView: 3/12 housing.step
105+
(converting)`, Blender stays responsive, and **Esc** cancels after the file in flight.
106+
Files that fail are skipped rather than stopping the batch, and FreeCAD's own error
107+
message is reported instead of a generic failure -- run `Window > Toggle System Console`
108+
to see the full list.
109+
110+
You can also click **Add Empty Product Collection** and drag existing meshes into it, which
111+
is how you use MultiView with geometry that didn't come from STEP.
112+
113+
**Fit on Import** (on by default) does this automatically: as each STEP file lands, the
114+
product is uniformly scaled so its largest dimension equals **Target Size** (default
115+
`1.0 m`, i.e. it fits inside a 1x1x1 m cube) and its bounding box is centred on the world
116+
origin. Turn it off if you want to place and scale products yourself.
117+
118+
**Standardize Products** applies the same fit to everything already under `MV_Products`,
119+
which is what you want after dragging in your own meshes or importing with the option off:
120+
121+
- **Recenter**: moves each product's bounding box centre onto the world origin.
122+
- **Rescale**: uniformly scales each product so its largest dimension equals **Target
123+
Size**. This is what makes a tiny screw and a large housing frame read identically in
124+
the final images.
125+
126+
- **Auto Smooth**: fixes the faceted look a tessellated CAD import arrives with. FreeCAD
127+
writes per-face normals that Blender keeps as custom split normals, and some Blender
128+
versions also mark most edges sharp on import; either one pins the flat shading no matter
129+
what you set. This clears both, then re-derives hard edges from the angle between faces
130+
(**Smooth Angle**, default 30 degrees -- raise it to keep fewer hard edges, lower it to
131+
keep more).
132+
133+
Both operate on the product as one rigid assembly, so multi-part STEP files keep their
134+
parts in the right places relative to each other.
135+
136+
Sharpness is baked into the mesh rather than left to a *Smooth by Angle* modifier, so a
137+
large batch costs nothing extra at render time. Running Standardize again is safe -- it is
138+
idempotent.
139+
140+
Afterwards the transform is baked down: scale values read `1.0` and every object origin sits
141+
on the world origin, so the product rotates about its own centre and the N panel is clean.
142+
Geometry does not move during that step. Objects on multi-user or linked data cannot be
143+
edited by Blender, so those keep their transform and are counted in the status message.
144+
145+
### 3. Cameras / Views
146+
147+
Choose a view set and click **Build Cameras**. Cameras land in `MV_Cameras`, named
148+
`MV_Cam_<View>`.
149+
150+
| View set | Cameras |
151+
| --- | --- |
152+
| **All** | Front, Back, Top, Bottom, Right, Left + 3 perspectives (9) |
153+
| **Orthographic** | Front, Back, Top, Bottom, Right, Left (6) |
154+
| **Standard** | Front, Top, Right, Perspective (4) |
155+
| **Minimal** | Front, Top, Right (3) |
156+
157+
**Front Axis** tells the add-on which world axis points out of the front of your product.
158+
CAD exports usually land on `+X` (the default); Blender's own convention is `-Y`. Getting
159+
this right is what makes the "Front" render actually the front.
160+
161+
**Framing Padding** is the margin around the product in frame. `1.4` leaves 40% headroom
162+
on the tightest axis; `1.0` fits the product exactly to the frame edge. Framing accounts for
163+
your output resolution's aspect ratio, so a 16:9 or portrait render is not cropped.
164+
165+
All orthographic views share one framing, and all perspective views share another, so a
166+
product reads at the same scale across the whole sheet rather than being re-fitted per view.
167+
168+
Need an angle that isn't in the presets? Add a **Custom View** with an X/Y/Z direction
169+
vector and an ortho/perspective toggle, and it gets built alongside the rest.
170+
171+
### 4. Batch Render
172+
173+
Set an **Output Directory**, choose a **Render Mode**, and hit **Render All**.
174+
175+
| Render mode | Output |
176+
| --- | --- |
177+
| **Full Render** | Uses your current engine (Cycles/EEVEE) and materials. |
178+
| **Clay (Workbench)** | Fast single-colour clay pass with cavity shading. Default. |
179+
| **Both** | Writes a `_render` and a `_clay` image per view. |
180+
181+
Every product is isolated in turn (all others excluded from the view layer), so nothing
182+
bleeds between shots. Progress prints to the system console.
183+
184+
**Render engine, sample count, resolution, and file format stay in Blender's own Output and
185+
Render Properties.** MultiView only drives cameras, visibility, and file paths. It never
186+
overwrites your render settings, and the clay pass restores your engine when it finishes.
187+
188+
#### File naming
189+
190+
Output is organised per product and named deterministically:
191+
192+
```
193+
renders/
194+
AA_01_Widget/
195+
AA_01_Widget_Front.png
196+
AA_01_Widget_Top.png
197+
AA_01_Widget_Persp_FTR.png
198+
AA_02_Bracket/
199+
AA_02_Bracket_Front.png
200+
...
201+
```
202+
203+
The `AA_01` label is controlled by three fields:
204+
205+
- **Start Prefix**: the letter pair for the first product (`AA`, `BB`, ...).
206+
- **Start Number**: the number the batch starts at, so a second batch can continue from
207+
`AA_11` instead of restarting at `AA_01`.
208+
- **Products per Letter**: how many products before the prefix rolls over to the next
209+
letter pair.
210+
211+
---
212+
213+
## Collections the add-on creates
214+
215+
| Collection | Contents |
216+
| --- | --- |
217+
| `MV_Products` | One child collection per product. This is what gets iterated and isolated. |
218+
| `MV_Cameras` | Generated cameras, named `MV_Cam_<View>`. |
219+
| `MV_Lighting` | The lights from the active lighting preset. |
220+
221+
Rebuilding cameras or lighting clears and regenerates only that collection. Your products
222+
are never touched.
223+
224+
---
225+
226+
## Troubleshooting
227+
228+
**"No cameras. Build cameras first."**: run *Build Cameras* in the Cameras / Views panel.
229+
230+
**"No product collections under 'MV_Products'."**: import a STEP file, or add an empty
231+
product collection and put your meshes inside it. Meshes sitting loose in the scene
232+
collection are not seen as products.
233+
234+
**STEP import does nothing**: check that the FreeCAD path in add-on preferences points at
235+
`freecadcmd`, not the GUI `freecad` binary. Open `Window → Toggle System Console` (Windows)
236+
to see the subprocess output.
237+
238+
**Products are all different sizes in the renders**: run *Standardize Products* with
239+
**Rescale** enabled.
240+
241+
**The "Front" view isn't the front**: change **Front Axis** in Cameras / Views and rebuild
242+
the cameras.
243+
244+
**Imported STEP geometry is blocky**: lower **Tessellation Deflection** in preferences
245+
(try `0.02`) and re-import.
246+
247+
---
248+
249+
## License
250+
251+
MIT. See [LICENSE](LICENSE).

0 commit comments

Comments
 (0)