pcb-product-render

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

PCB Product Render

PCB产品渲染

Use this skill when a user wants a KiCad PCB exported to STEP/GLB and rendered as realistic product imagery. The desired result is a clean product photograph/render, not a flat KiCad preview or vector-like orthographic diagram.
当用户希望将KiCad PCB导出为STEP/GLB格式并渲染为逼真的产品图像时,可使用此技能。预期结果是清晰的产品照片/渲染图,而非平面的KiCad预览图或类矢量正射图。

Required workflow

必备工作流程

  1. Identify the project root and the authoritative
    .kicad_pcb
    . If the user says “latest board,” always regenerate the STEP and GLB before rendering; never reuse an older GLB based only on its filename.
  2. Run a current DRC report. Stop on violations unless the user has explicitly authorized proceeding (an earlier authorization applies only to that project/task). Record the report path and counts in the handoff.
  3. Export with
    kicad-cli pcb export step
    and
    kicad-cli pcb export glb
    , using
    --force --no-dnp --subst-models
    . For the GLB include tracks, pads, zones, silkscreen, soldermask, and
    --cut-vias-in-body
    when supported.
  4. Inspect the exported scene before rendering. Confirm the rounded outline and every mounting/cutout hole are present. Remove only unnecessary 3D header models; retain their footprints and pads. If a known vendor model is missing, use a deterministic custom Blender fallback and state that it is a fallback.
  5. Render at least hero, near-overhead top, sensor/detail, and back views. Use Cycles with denoising and inspect the actual PNGs—not only a successful Blender exit code.
  6. Verify dimensions, output timestamps, and any gallery/server endpoints. If an HTML gallery already exists, keep its filenames stable so it refreshes without breaking links.
  1. 确定项目根目录和权威的
    .kicad_pcb
    文件。如果用户提到“最新电路板”,渲染前务必重新生成STEP和GLB文件;切勿仅根据文件名复用旧的GLB文件。
  2. 生成当前的DRC报告。除非用户明确授权继续,否则遇到违规情况需停止操作(此前的授权仅适用于该项目/任务)。在交接时记录报告路径和违规数量。
  3. 使用
    kicad-cli pcb export step
    kicad-cli pcb export glb
    命令导出,参数使用
    --force --no-dnp --subst-models
    。导出GLB时需包含走线、焊盘、覆铜区域、丝印、阻焊层,若支持则添加
    --cut-vias-in-body
    参数。
  4. 渲染前检查导出场景。确认圆角轮廓和所有安装/开孔都存在。仅移除不必要的3D接头模型;保留其焊盘和封装。若缺少已知的供应商模型,使用确定性的自定义Blender替代模型,并说明这是替代方案。
  5. 至少渲染主视图、近俯视顶视图、传感器/细节视图和后视图。使用Cycles渲染器并开启降噪,检查实际生成的PNG文件——而非仅依赖Blender的成功退出码。
  6. 验证尺寸、输出时间戳以及任何图库/服务器端点。若HTML图库已存在,保持文件名稳定,以便刷新时不会破坏链接。

Material targets

材质目标

  • Blue soldermask: deep royal blue LPI resin, non-metallic, moderately glossy rather than matte or mirror-polished. Use a smooth clear coat with low coat roughness, restrained micro-roughness/bump, and only subtle optical depth. Avoid high-contrast procedural grain.
  • Bare FR-4: muted warm tan/amber fiberglass, slightly cloudy and translucent at the routed edges. Use controlled transmission/subsurface/volume absorption and soft underlighting. Keep the clear fraction low enough that stage graphics do not appear as sharp stripes through the laminate; open holes may reveal the stage below.
  • ENIG: exposed copper/pads should read as pale metallic gold, not orange paint or raw copper. Adjust roughness and lighting so highlights do not clip to featureless white.
  • Solder: if the source model has dry passive blocks, add small silver SAC-style solder fillets at their pad interfaces. Keep them irregular and subdued; do not turn them into bright white dots.
  • Connector plastic: matte molded nylon with slight warm-gray variation, microscopic bump, and small physical edge bevels. Avoid opaque white blocks.
  • Sensor housing: matte charcoal molded plastic with restrained pebbled texture; emitter/receiver materials should follow the user’s reference images.
  • 蓝色阻焊层:深宝蓝色LPI树脂,非金属材质,中等光泽(而非哑光或镜面抛光)。使用光滑清漆,降低涂层粗糙度,控制微粗糙度/凹凸,仅保留细微的光学深度。避免高对比度的程序化纹理。
  • 裸FR-4:柔和的暖棕/琥珀色玻璃纤维,走线边缘略带浑浊和半透明。使用可控的透射/次表面/体积吸收效果,搭配柔和的底部照明。保持透明度足够低,避免场景图案透过层压板形成清晰条纹;开孔处可露出下方场景。
  • ENIG工艺:裸露的铜/焊盘应呈现淡金属金色,而非橙色涂料或纯铜色。调整粗糙度和光照,避免高光区域过曝成无细节的白色。
  • 焊锡:若源模型包含无源元件块,在其焊盘接口处添加小型银质SAC类焊锡圆角。保持形状不规则且柔和;不要将其变成亮白色圆点。
  • 连接器塑料:哑光模制尼龙,略带暖灰色变化,微观凹凸纹理,边缘有小物理倒角。避免不透明的白色块。
  • 传感器外壳:哑光炭黑色模制塑料,带有克制的卵石纹理;发射器/接收器材质需遵循用户提供的参考图像。

Camera and stage

相机与场景

The top view should be a near-overhead perspective product shot, not an orthographic CAD view: retain a small tilt so board thickness, component height, and contact shadows are visible, with enough background margin for the stage. A dark brutalist/Marathon-style stage is acceptable, but colored accents must support the object rather than dominate it. Hide under-board tracers and backlights when they make the top view look diagrammatic; preserve them only when they produce soft, plausible FR-4 transmission.
顶视图应为近俯视的产品透视镜头,而非正射CAD视图:保留轻微倾斜,以便显示电路板厚度、元件高度和接触阴影,同时为场景留出足够的背景边距。深色粗野主义/Marathon风格的场景是可接受的,但彩色点缀需衬托主体而非喧宾夺主。若电路板下方的走线和背光使顶视图看起来像示意图,则隐藏它们;仅当它们能产生柔和、合理的FR-4透射效果时才保留。

Current project reference

当前项目参考

The workflow was developed against:
/home/h/Documents/AmericanEmbedded/AmericanEmbedded/VL53L9CX_Pi_Cam
Important project artifacts:
  • Board:
    VL53L9CX_Pi_Cam.kicad_pcb
    (31 mm × 25 mm in the current scene).
  • Export helper:
    build/product-renders/export_board_3d.sh
    .
  • Blender scene builder:
    build/product-renders/build_product_scene.py
    .
  • Blender source:
    build/product-renders/VL53L9CX_STEMMA_QT.glb
    .
  • Final scene:
    build/product-renders/VL53L9CX_STEMMA_QT-product-renders.blend
    .
  • PNGs:
    VL53L9CX-STEMMA-QT-hero.png
    ,
    VL53L9CX-STEMMA-QT-top.png
    ,
    VL53L9CX-STEMMA-QT-sensor-detail.png
    , and
    VL53L9CX-STEMMA-QT-back.png
    .
  • Gallery:
    VL53L9CX-render-gallery.html
    , served in the current setup at
    http://100.64.84.41:8765/
    .
  • Latest DRC report:
    build/render-review/drc-latest-render.rpt
    . The current project was rendered under the user’s prior override despite 12 violations, 53 unconnected items, and one schematic-parity issue.
The current project intentionally has no rendered through-hole pin-header model. Its footprint/pads remain in KiCad. Y1’s missing vendor STEP is handled by the custom oscillator fallback in the Blender script.
此工作流程基于以下项目开发:
/home/h/Documents/AmericanEmbedded/AmericanEmbedded/VL53L9CX_Pi_Cam
重要项目工件:
  • 电路板:
    VL53L9CX_Pi_Cam.kicad_pcb
    (当前场景中尺寸为31毫米×25毫米)。
  • 导出辅助脚本:
    build/product-renders/export_board_3d.sh
  • Blender场景构建器:
    build/product-renders/build_product_scene.py
  • Blender源文件:
    build/product-renders/VL53L9CX_STEMMA_QT.glb
  • 最终场景:
    build/product-renders/VL53L9CX_STEMMA_QT-product-renders.blend
  • PNG渲染图:
    VL53L9CX-STEMMA-QT-hero.png
    VL53L9CX-STEMMA-QT-top.png
    VL53L9CX-STEMMA-QT-sensor-detail.png
    VL53L9CX-STEMMA-QT-back.png
  • 图库:
    VL53L9CX-render-gallery.html
    ,当前设置下可通过
    http://100.64.84.41:8765/
    访问。
  • 最新DRC报告:
    build/render-review/drc-latest-render.rpt
    。当前项目虽存在12项违规、53个未连接项和1个原理图一致性问题,但已获得用户此前的授权而进行渲染。
当前项目故意未渲染通孔排针模型,其焊盘/封装仍保留在KiCad中。Y1缺失的供应商STEP文件由Blender脚本中的自定义振荡器替代模型处理。

Handoff requirements

交接要求

Report the output directory, the gallery URL if available, the DRC status, and any missing-model fallback. Link local files with absolute paths. Do not describe a render as photorealistic without inspecting the resulting images; call out remaining source-model limitations when the KiCad footprint geometry is simplified.
报告输出目录、可用的图库URL、DRC状态以及任何缺失模型的替代方案。使用绝对路径链接本地文件。未检查生成的图像前,切勿称渲染图为照片级真实感;当KiCad封装几何结构被简化时,需指出源模型仍存在的局限性。