Here are the notes I made to go along with the workshop. I updated some parts and elaborated others. Ideally, these notes ought to supplement the workshop video, but until that gets released, folks can try and see if just the notes are sufficient. Let me know.
Everything I used for the workshop has been shared on the project repository on Github
https://github.com/Hack-a-Day/Remoticon_KiCad_Blender
- /blends folder : Contains the various BLENDER files I created as I progressed with my learning of Blender
- /kicad_3d_models : Contains the STEP and WRL footprint models. The default ones that come with KiCad, and then the modified ones where I added text and logos and such
- /KiCad/tiny_blinky_coarse : Contains the KiCad project files. Coarse indicates that the 3D footprint models used are the default KiCad versions without any embellishments
- /KiCad/tiny_blinky_fine : Contains the KiCad project files. Fine indicates that the 3D footprint models used are the detailed versions created from FreeCAD
- /renders : Contains some saved Blender results.
REMOTICON :: KiCad to BLENDER workflow
If you are recording a video showing Blender workflow, enable the “SCREENCAST” option to show keyboard / mouse events.
- EDIT > PREFERENCES > ADD ONS > search for “Screencast Keys” and enable checkbox.
- Then, in main Blender workspace, press “N” key to show number panel, select Screencast Keys tab, check Screencast Keys checkbox.
PRE-PREPARATION
- To add greater realism, in FreeCAD, add text/graphics to all generic footprint models – IC part numbers, resistor color codes, capacitor markings etc
- Text items can be added using DRAFT (workbench) > Text String
- Convert Text String objects to Sketches, merge Sketches, apply thickness (extrude) and do either Boolean Cut or Fusion (depending on if you want engraved or embossed text.
- Logos can be added similarly, by importing SVG, converting to sketch, applying thickness (extrude) and doing Boolean Cut or Fusion.
- Use FreeCAD StepUpTools WB to generate .STEP / .WRL models for all footprints. During model export, choose the appropriate colors for different elements of the model – example for THT Resistors, choose the band colors to match value (1k 5% = Brown, Black, Red, Gold)
- Export VRML from KiCad
- Some examples can be seen in the Github repository folder : /kicad_3d_models
- These steps add a greater level of realism to the final renders
BLENDER INITIAL SETUP AND OVERVIEW
- Basic navigation
- Press middle mouse button (MMB) for ORBIT
- Press SHIFT + MMB for PAN (WALK)
- Press Scroll Up/Down for ZOOM (or CTRL + MMB)
- IMPORTANT : When selecting objects, make sure to be in X-ray mode so you can select hidden elements. Check out the icons above the XYZ Gizmo.
- “A” to toggle selecting ALL / “ALT + A” to select NONE
- “B” to BOX select
- “G” to MOVE
- “R” to Rotate
- “S” to Scale
- “T” to transform
- Blender workbenches used will be Layout, Shading, Compositing and Render
BLENDER PROPERTIES SETTINGS (Properties TABS, left side of screen)
- Render
- Render Engine > Cycles
- Output
- Set Resolution and % Scale
- Set Save folder, Color Space, Color Depth etc
- Layer
- Check Passes > Data > De-noising Data (only available in Cycles)
GETTING THE WRL PCB into BLENDER
- (If below steps don’t work in ver 2.83, then do these actions in ver 2.79 first, and then go to 2.83)
- Blender > File > New > Delete the default Cube
- File > Import > Import X3D/VRML2 > SET TRANSFORM to “Forward = X Forward” and “Up = Z Up” > Select XXXX.wrl (your PCB file)
- Your PCB ought to be visible with “colors”, not white chalk. If you see white chalk in ver 2.83, then try this in ver 2.79.
- Once Imported, and with everything still selected, type “M” and add the imported items to a new collection called PCB
- In the other default “Collection”, hide Camera and Light
- Choose X-ray mode, then in the “PCB” collection, choose all using box select
- Type “S” to scale, grab and move the White circle and scale it a bit.
- This ought to bring up the SCALE interactive dialogue (lower left) where you can enter the precise scaling dimensions (0.01, for example)
- Save as a .BLEND file
- At this point, if you were using ver 2.79, you can save the .blend file, close it, and open in ver 2.83.
- Bring up Number Panel “N” > View > SET CLIP > 0.01mm or 0.001mm (This setting allows you to zoom in close to the model without the parts getting “clipped”)
- RENDER Properties
- Render Engine = CYCLES
- LAYER Properties
- Check DENOISING DATA (works only with CYCLES)
- OUTPUT properties
- set output resolution to 100>#/p###
- set Colour Depth to 16
- Select COMPOSITING Workbench
- Check USE NODES
- SHIFT + A > ADD (SEARCH) > DENOISE
- Add between Render Layers and Composite
- (If you don’t see proper nodes, you may be using Eveee instead of Cycles and/or not enabled Denoising Data in LAYER properties)
- Change Image --> Image to Noisy Image --> Image (Yellow to Yellow)
- Add Denoising Normal --> Normal (Blue to Blue)
- Add Denoising Albedo --> Albedo (Yellow to Yellow)
- This improves Render result by eliminating noise
- ADD GROUND PLANE
- Highlight / select the default “COLLECTION” (not the PCB collection)
- SHIFT + A > MESH > PLANE
- To change PLANE appearance, MATERIAL Properties
- Select NEW > BASE COLOR > apply a color using the color wheel
- Adjust “shininess” using “ROUGHNESS” slider
- Adjust metallic sheen using “METALLIC” slider
- OR, if you want to apply an image texture such as “Wood”,
- Press CIRCLE next to Base Colour
- Choose option Image Texture
- Select Image
- Advanced settings allow you to add NORMAL, REFLECTION, GLOSS, etc settings using NODES (use the SHADING workbench).
- ADJUST CAMERA
- Using Orbit, Pan and Zoom, choose the desired view that you want rendered
- Then, select VIEW > ALIGN VIEW > ALIGN ACTIVE CAMERA TO VIEW
- OR
- Select Camera, then use Translate / Move / Rotate / Zoom to set camera as required
- OR
- Select Number Panel “N”, VIEW > check CAMERA TO VIEW
- Then, Translate / Move / Rotate / Zoom your scene to get desired Render view, then uncheck CAMERA TO VIEW
- ADD LIGHTS
- Select LAMP > OBJECT DATA PROPERTIES, select between to POINT / SUN / SPOT / AREA
- Adjust Cone, Blend, Power etc
- Adjust light location just as you would other objects using Translate / Move / Rotate
- Later, add a tri-source light for overall ambient lighting (make sure it is added to the default “COLLECTION” , not the “PCB” one)
- ADDING MORE REALISM
- In the PCB collection, scroll to the end of the model tree
- The bottom 8 elements are the different parts of the bare PCB (not the Parts).
- Identify the layers, and rename them. Use “H” to hide a layer or EYE icon in the collection tree to hide / unhide
- PCB TOP PADS
- PCB BOT PADS
- PCB TOP COPPER
- PCB BOT COPPER
- PCB TOP SILK
- PCB BOT SILK
- PCB TOP_BOT MASK – this is a single entity
- PCB EDGE
- We will have to split this in to PCB edge (fibreglass material) and THROUGH HOLE VIA’S (gold)
- The rest of the items in collection are components which can also be modified later to add even more realism
- COLOUR the various PCB parts now, and “name” the MATERIALS so it’s easy to apply to other objects
- MATERIAL properties
- Enable NODES
- PCB TOP SILK / PCB BOT SILK – Color White, decrease roughness to make it shiny, about 0.1~0.3
- Since materials are linked, TOP SILK and BOT SILK both receive the same settings
- PCB TOP COPPER / PCB BOT COPPER - dark green/blue/purple etc depending on mask choice
- PCB TOP PADS / PCB BOT PADS – Gold, use an orange-yellow shade, increase Metallic to 0.7~0.9, and decrease Roughness to 0.1~0.3
- PCB TOP_BOT MASK – Use the same color as PCB TOP COPPER, but make it a lighter shade
- PCB EDGE – Apply same material as PCB TOP PADS – Gold – which gets applied to all the VIA holes on the PCB
- Unfortunately, this GOLD material is also applied to the edges of the PCB.
- We need to separate the EDGES from the rest of the VIA holes, so we can apply a different material (more on that later).
- SEPARATE PCB EDGES FROM VIAS
- Requires special actions to separate plated holes from unplated objects such as the pcb edges.
- In the DEFAULT and PCB collections, Hide all the entities. Then, UNHIDE just the PCB EDGE entity. This unhides the edges and vias.
- TAB to go to edit mode or use the drop down to go from OBJECT mode to EDIT mode
- Make sure X-ray mode is selected
- SHIFT select all the edges (painful part)
- “P” to SEPARATE the selection from the parent
- This creates another object in the model tree (some_name.001)
- With the PCB edges and VIAS separated, we can delink the materials properties for each, and reassign fresh materials.
- Select the Edges, then in Materials tab, delete the assigned material, select NEW, and assign a color that appears like fibreglass (dark green / brown)
- ADD THICKNESS TO COPPER, MASK and SILK
- Select a layer – PCB TOP PADS
- Select MODIFIER (Wrench / Spanner symbol)
- ADD modifier, SOLIDIFY
- In SOLIDIFY settings, add a thickness and positive normal (1.0)
- Use “high quality normals” and “fill rim”
- EDGE DATA > CREASE Inner / Outer / Rim ought to give bevelled edges, but I haven’t been able to get that work.
- Repeat the procedure for all the other layers
- PCB BOT PADS – same settings as applied to PCB TOP PADS
- PCB TOP COPPER – same settings as applied to PCB TOP PADS
- PCB BOT COPPER – same settings as applied to PCB TOP PADS
- PCB TOP SILK – requires slightly more thickness in order to stay above pads / copper thickness
- PCB BOT SILK – requires slightly more thickness in order to stay above pads / copper thickness
- At this point, you can try running a RENDER (F12) to check out the result.
- IMPROVE COMPONENT APPEARANCES
- Hide all the PCB layers
- Choose a component that needs improvement – a THT resistor for example.
- Select the component body – you may have to do multiple selections (SHIFT + Select)
- In MATERIALS properties, select New, then Use Nodes, then in Color wheel select required color.
- Adjust Roughness and Metallic sliders.
- If there’s another part that requires the same material treatment, then you can use the LINK MATERIALS option
- To make a BOX selection, choose reference material first, and then the box, then CTRL + L > MATERIALS
- When making individual selections, choose them first and then the reference material, then CTRL + L > MATERIALS
- Hide parts as you work along to make selections easier
About Materials and Textures
https://medium.com/@chunaik/texture-mapping-in-3d-6dffd54d3a54
https://www.youtube.com/watch?v=UkU0-QeWUcU&feature=emb_logo
https://www.youtube.com/watch?v=rzXNZkEoTAk&feature=emb_logo
Diffuse = Albedo = Colour
IOR = Index of Refraction (related to Frenel effect)
AO = ambient occlusion
When using nodes, CTRL + H will hide unused parts of a node to make visibility better
CTRL + G groups Nodes
CTRL + L to link materials
H, SHIFT + H, ALT + H to hide / unhide
PBR = Physics Based Rendering
F3 = search
RENDER properties > COLOR Management > VIEW transform > Filmic / False Color
(to check exposure etc)
PLANE
Use UV unwrap if Texture doesn’t appear on Plane
You can IMPORT “images as planes” (needs add on enabled)
POLIIGON Material converter (to use texture maps)
https://help.poliigon.com/en/articles/2540839-poliigon-material-converter-addon-for-blender
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.
Thank you!
Are you sure? yes | no
thanks so much for providing this!! <3
Are you sure? yes | no