https://wiki.freecad.org/index.php?title=Tutorial_Render_with_Blender/ru&feed=atom&action=historyTutorial Render with Blender/ru - Revision history2024-03-29T02:21:02ZRevision history for this page on the wikiMediaWiki 1.40.1https://wiki.freecad.org/index.php?title=Tutorial_Render_with_Blender/ru&diff=1251782&oldid=prevFuzzyBot: Updating to match new version of source page2023-04-14T13:15:20Z<p>Updating to match new version of source page</p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 13:15, 14 April 2023</td>
</tr><tr>
<td colspan="2" class="diff-lineno">Line 298:</td>
<td colspan="2" class="diff-lineno">Line 298:</td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Obtaining good results is highly dependent on the rendering options, the materials, and the lighting. The {{incode|Principled BSDF}} material shader is a generic solution that works well for many cases, however, to produce truly photorealistic results, the use of texture maps and normal maps, along with careful lighting of the scene is still very important.</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Obtaining good results is highly dependent on the rendering options, the materials, and the lighting. The {{incode|Principled BSDF}} material shader is a generic solution that works well for many cases, however, to produce truly photorealistic results, the use of texture maps and normal maps, along with careful lighting of the scene is still very important.</div></td>
</tr>
<tr>
<td colspan="2" class="diff-empty diff-side-deleted"></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td class="diff-marker" data-marker="−"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>{{Tutorials navi{{#translation:}}}}</div></td>
<td colspan="2" class="diff-empty diff-side-added"></td>
</tr>
<tr>
<td colspan="2" class="diff-empty diff-side-deleted"></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>{{Raytracing Tools navi{{#translation:}}}}</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>{{Raytracing Tools navi{{#translation:}}}}</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>{{Userdocnavi{{#translation:}}}}</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>{{Userdocnavi{{#translation:}}}}</div></td>
</tr>
</table>FuzzyBothttps://wiki.freecad.org/index.php?title=Tutorial_Render_with_Blender/ru&diff=1108473&oldid=prevFuzzyBot: Updating to match new version of source page2022-03-04T20:18:09Z<p>Updating to match new version of source page</p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 20:18, 4 March 2022</td>
</tr><tr>
<td colspan="2" class="diff-lineno">Line 17:</td>
<td colspan="2" class="diff-lineno">Line 17:</td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>A similar description of this process is described in a series of videos, [https://www.youtube.com/watch?v=U7e6-Wfv2b0 Render Solidworks and FreeCAD Models in Blender], by Joko Engineering.</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>A similar description of this process is described in a series of videos, [https://www.youtube.com/watch?v=U7e6-Wfv2b0 Render Solidworks and FreeCAD Models in Blender], by Joko Engineering.</div></td>
</tr>
<tr>
<td class="diff-marker" data-marker="−"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td colspan="2" class="diff-empty diff-side-added"></td>
</tr>
<tr>
<td class="diff-marker" data-marker="−"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>{{Note|Note: a faster way to render models in blender without leaving FreeCAD can be done via the [[Image:render_workbench_icon.svg|24px]][[Render_project|Render project]]|}}</div></td>
<td colspan="2" class="diff-empty diff-side-added"></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== FreeCAD ==</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== FreeCAD ==</div></td>
</tr>
</table>FuzzyBothttps://wiki.freecad.org/index.php?title=Tutorial_Render_with_Blender/ru&diff=841693&oldid=prevFuzzyBot: Updating to match new version of source page2021-01-20T17:28:52Z<p>Updating to match new version of source page</p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 17:28, 20 January 2021</td>
</tr><tr>
<td colspan="2" class="diff-lineno">Line 14:</td>
<td colspan="2" class="diff-lineno">Line 14:</td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>This tutorial shows how to produce a rendered image in [https://www.blender.org/ Blender], beginning from a part or assembly created with FreeCAD. It assumes that the user already created the part in FreeCAD, or has imported it into it. Then this part is exported to Blender for rendering.</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>This tutorial shows how to produce a rendered image in [https://www.blender.org/ Blender], beginning from a part or assembly created with FreeCAD. It assumes that the user already created the part in FreeCAD, or has imported it into it. Then this part is exported to Blender for rendering.</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td class="diff-marker" data-marker="−"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>It produces a rendering with Blender 2.80 with both the EEVEE and Cycles renderers. It shows various [[Python]] commands that can be used to perform actions quicker both in FreeCAD and Blender.</div></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>It produces a rendering with Blender 2.80 with both the EEVEE and Cycles renderers. It shows various [[<ins style="font-weight: bold; text-decoration: none;">Python|</ins>Python]] commands that can be used to perform actions quicker both in FreeCAD and Blender.</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>A similar description of this process is described in a series of videos, [https://www.youtube.com/watch?v=U7e6-Wfv2b0 Render Solidworks and FreeCAD Models in Blender], by Joko Engineering.</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>A similar description of this process is described in a series of videos, [https://www.youtube.com/watch?v=U7e6-Wfv2b0 Render Solidworks and FreeCAD Models in Blender], by Joko Engineering.</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td class="diff-marker" data-marker="−"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>{{Note|Note: a faster way to render models in blender without leaving FreeCAD can be done via the [[Image:render_workbench_icon.svg|24px]][[Render <del style="font-weight: bold; text-decoration: none;">Workbench</del>]]|}}</div></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>{{Note|Note: a faster way to render models in blender without leaving FreeCAD can be done via the [[Image:render_workbench_icon.svg|24px]][[<ins style="font-weight: bold; text-decoration: none;">Render_project|</ins>Render <ins style="font-weight: bold; text-decoration: none;">project</ins>]]|}}</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== FreeCAD ==</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== FreeCAD ==</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td class="diff-marker" data-marker="−"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>1. Create an assembly using bodies from the [[Part Workbench<del style="font-weight: bold; text-decoration: none;">|Part</del>]] or [[PartDesign Workbench<del style="font-weight: bold; text-decoration: none;">|PartDesign Workbenches</del>]], or any other workbench that produces solid objects, for example, the [[<del style="font-weight: bold; text-decoration: none;">Arch Workbench</del>|Arch Workbench]]. Assign colors or materials to the individual bodies that make the assembly, approximately matching the color that you want in your render.</div></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>1. Create an assembly using bodies from the [[<ins style="font-weight: bold; text-decoration: none;">Part_Workbench|</ins>Part Workbench]] or [[<ins style="font-weight: bold; text-decoration: none;">PartDesign_Workbench|</ins>PartDesign Workbench]], or any other workbench that produces solid objects, for example, the [[<ins style="font-weight: bold; text-decoration: none;">Arch_Workbench</ins>|Arch Workbench]]. Assign colors or materials to the individual bodies that make the assembly, approximately matching the color that you want in your render.</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>[[Image:01_T03_FreeCAD_Blender_model.png|600px|center]]</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>[[Image:01_T03_FreeCAD_Blender_model.png|600px|center]]</div></td>
</tr>
<tr>
<td colspan="2" class="diff-lineno">Line 36:</td>
<td colspan="2" class="diff-lineno">Line 36:</td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>3. Select the {{incode|Part}}, then {{MenuCommand|File → Export}}, or press {{KEY|Ctrl}}+{{KEY|E}}, and export it as {{incode|Wavefront OBJ}}.</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>3. Select the {{incode|Part}}, then {{MenuCommand|File → Export}}, or press {{KEY|Ctrl}}+{{KEY|E}}, and export it as {{incode|Wavefront OBJ}}.</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td class="diff-marker" data-marker="−"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>Alternatively, the export can be done from the [[Python]] console. Define a list of objects to be exported and use the exporting function with a file name.</div></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>Alternatively, the export can be done from the [[<ins style="font-weight: bold; text-decoration: none;">Python|</ins>Python]] console. Define a list of objects to be exported and use the exporting function with a file name.</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>{{Code|code=</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>{{Code|code=</div></td>
</tr>
</table>FuzzyBothttps://wiki.freecad.org/index.php?title=Tutorial_Render_with_Blender/ru&diff=784565&oldid=prevFuzzyBot: Updating to match new version of source page2020-10-17T19:28:49Z<p>Updating to match new version of source page</p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 19:28, 17 October 2020</td>
</tr><tr>
<td colspan="2" class="diff-lineno">Line 17:</td>
<td colspan="2" class="diff-lineno">Line 17:</td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>A similar description of this process is described in a series of videos, [https://www.youtube.com/watch?v=U7e6-Wfv2b0 Render Solidworks and FreeCAD Models in Blender], by Joko Engineering.</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>A similar description of this process is described in a series of videos, [https://www.youtube.com/watch?v=U7e6-Wfv2b0 Render Solidworks and FreeCAD Models in Blender], by Joko Engineering.</div></td>
</tr>
<tr>
<td colspan="2" class="diff-empty diff-side-deleted"></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td colspan="2" class="diff-empty diff-side-deleted"></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>{{Note|Note: a faster way to render models in blender without leaving FreeCAD can be done via the [[Image:render_workbench_icon.svg|24px]][[Render Workbench]]|}}</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== FreeCAD ==</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== FreeCAD ==</div></td>
</tr>
</table>FuzzyBothttps://wiki.freecad.org/index.php?title=Tutorial_Render_with_Blender/ru&diff=755306&oldid=prevFuzzyBot: Updating to match new version of source page2020-09-07T12:38:09Z<p>Updating to match new version of source page</p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 12:38, 7 September 2020</td>
</tr><tr>
<td colspan="2" class="diff-lineno">Line 246:</td>
<td colspan="2" class="diff-lineno">Line 246:</td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>18. If the scene has been completely finished, you may wish to render from outside Blender, from the operating system's command line. This can be useful to batch render different scenes in a remote system. Both EEVEE and Cycles are supported.</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>18. If the scene has been completely finished, you may wish to render from outside Blender, from the operating system's command line. This can be useful to batch render different scenes in a remote system. Both EEVEE and Cycles are supported.</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td class="diff-marker" data-marker="−"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>{{Code|code=</div></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>{{Code<ins style="font-weight: bold; text-decoration: none;">|lang=sh</ins>|code=</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>blender -b assembly.blend -E BLENDER_EEVEE -o //assembly_EEVEE_#### -t 3 -F PNG -x 1 -f 1</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>blender -b assembly.blend -E BLENDER_EEVEE -o //assembly_EEVEE_#### -t 3 -F PNG -x 1 -f 1</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>}}</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>}}</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td class="diff-marker" data-marker="−"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>{{Code|code=</div></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>{{Code<ins style="font-weight: bold; text-decoration: none;">|lang=sh</ins>|code=</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>blender -b assembly.blend -E CYCLES -o //assembly_CYCLES_#### -t 3 -F PNG -x 1 -f 1</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>blender -b assembly.blend -E CYCLES -o //assembly_CYCLES_#### -t 3 -F PNG -x 1 -f 1</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>}}</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>}}</div></td>
</tr>
</table>FuzzyBothttps://wiki.freecad.org/index.php?title=Tutorial_Render_with_Blender/ru&diff=676490&oldid=prevBaritone: Created page with "{{TutorialInfo/ru |Topic=Rendering |Level=Intermediate |Time=60 минут |Author=[https://forum.freecadweb.org/memberlist.php?mode=viewprofile&u=21943 vocx] |FCVersion=0.18..."2020-05-05T12:19:43Z<p>Created page with "{{TutorialInfo/ru |Topic=Rendering |Level=Intermediate |Time=60 минут |Author=[https://forum.freecadweb.org/memberlist.php?mode=viewprofile&u=21943 vocx] |FCVersion=0.18..."</p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 12:19, 5 May 2020</td>
</tr><tr>
<td colspan="2" class="diff-lineno">Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div><languages/></div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div><languages/></div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td class="diff-marker" data-marker="−"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>{{TutorialInfo</div></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>{{TutorialInfo<ins style="font-weight: bold; text-decoration: none;">/ru</ins></div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>|Topic=Rendering</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>|Topic=Rendering</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>|Level=Intermediate</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>|Level=Intermediate</div></td>
</tr>
<tr>
<td class="diff-marker" data-marker="−"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>|Time=60 <del style="font-weight: bold; text-decoration: none;">minutes</del></div></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>|Time=60 <ins style="font-weight: bold; text-decoration: none;">минут</ins></div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>|Author=[https://forum.freecadweb.org/memberlist.php?mode=viewprofile&u=21943 vocx]</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>|Author=[https://forum.freecadweb.org/memberlist.php?mode=viewprofile&u=21943 vocx]</div></td>
</tr>
<tr>
<td class="diff-marker" data-marker="−"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>|FCVersion=0.18 <del style="font-weight: bold; text-decoration: none;">or</del> <del style="font-weight: bold; text-decoration: none;">greater</del></div></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>|FCVersion=0.18 <ins style="font-weight: bold; text-decoration: none;">или</ins> <ins style="font-weight: bold; text-decoration: none;">выше</ins></div></td>
</tr>
<tr>
<td class="diff-marker" data-marker="−"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>|Files=<del style="font-weight: bold; text-decoration: none;">none</del></div></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>|Files=<ins style="font-weight: bold; text-decoration: none;">нет</ins></div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>}}</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>}}</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
</table>Baritonehttps://wiki.freecad.org/index.php?title=Tutorial_Render_with_Blender/ru&diff=670341&oldid=prevBaritone: Created page with "Учебник визуализации с помощью Blender"2020-04-26T20:22:26Z<p>Created page with "Учебник визуализации с помощью Blender"</p>
<p><b>New page</b></p><div><languages/><br />
<br />
{{TutorialInfo<br />
|Topic=Rendering<br />
|Level=Intermediate<br />
|Time=60 minutes<br />
|Author=[https://forum.freecadweb.org/memberlist.php?mode=viewprofile&u=21943 vocx]<br />
|FCVersion=0.18 or greater<br />
|Files=none<br />
}}<br />
<br />
==Introduction==<br />
<br />
This tutorial shows how to produce a rendered image in [https://www.blender.org/ Blender], beginning from a part or assembly created with FreeCAD. It assumes that the user already created the part in FreeCAD, or has imported it into it. Then this part is exported to Blender for rendering.<br />
<br />
It produces a rendering with Blender 2.80 with both the EEVEE and Cycles renderers. It shows various [[Python]] commands that can be used to perform actions quicker both in FreeCAD and Blender.<br />
<br />
A similar description of this process is described in a series of videos, [https://www.youtube.com/watch?v=U7e6-Wfv2b0 Render Solidworks and FreeCAD Models in Blender], by Joko Engineering.<br />
<br />
== FreeCAD ==<br />
<br />
1. Create an assembly using bodies from the [[Part Workbench|Part]] or [[PartDesign Workbench|PartDesign Workbenches]], or any other workbench that produces solid objects, for example, the [[Arch Workbench|Arch Workbench]]. Assign colors or materials to the individual bodies that make the assembly, approximately matching the color that you want in your render.<br />
<br />
[[Image:01_T03_FreeCAD_Blender_model.png|600px|center]]<br />
<br />
{{Caption|align=center|Assembly of three bodies created in FreeCAD, and with colors or materials assigned.}}<br />
<br />
2. If your model is very detailed, make sure the {{PropertyView|Deviation}} of the body is set to a low value, between {{incode|0.1}} and {{incode|0.01}}, or even smaller. The lower this value is, the more detailed the exported mesh will be, and thus the better the quality of the render will be.<br />
<br />
[[Image:02_T03_FreeCAD_Blender_deviation.png|center]]<br />
<br />
{{Caption|align=center|Deviation property of the bodies created in FreeCAD; the deviation needs to be small in order to export the parts with good resolution.}}<br />
<br />
3. Select the {{incode|Part}}, then {{MenuCommand|File → Export}}, or press {{KEY|Ctrl}}+{{KEY|E}}, and export it as {{incode|Wavefront OBJ}}.<br />
<br />
Alternatively, the export can be done from the [[Python]] console. Define a list of objects to be exported and use the exporting function with a file name.<br />
<br />
{{Code|code=<br />
import importOBJ<br />
objs = FreeCAD.ActiveDocument.getObjectsByLabel("Part")[0]<br />
<br />
importOBJ.export(objs, "/home/user/assembly.obj")<br />
}}<br />
<br />
{{Emphasis|Note:}} when exporting to OBJ, two files are created; the first one contains the mesh information itself, {{incode|assembly.obj}}; the second one contains the definition of the materials, which in most cases is just the color, {{incode|assembly.mtl}}.<br />
<br />
{{Emphasis|Note 2:}} if the resulting OBJ file appears to be empty, you may have to export the individual bodies. In this case, select each of the bodies under the part, and repeat the export.<br />
<br />
{{Code|code=<br />
import importOBJ<br />
objs = [FreeCAD.ActiveDocument.getObjectsByLabel("Body.base")[0],<br />
FreeCAD.ActiveDocument.getObjectsByLabel("Body.bolt")[0],<br />
FreeCAD.ActiveDocument.getObjectsByLabel("Body.bolt.big")[0]]<br />
<br />
importOBJ.export(objs, "/home/user/assembly.obj")<br />
}}<br />
<br />
== Blender ==<br />
<br />
=== Prepare the model ===<br />
<br />
4. Open Blender. Change the {{incode|Timeline}} panel into a {{incode|Python Console}} ({{KEY|Shift}}+{{KEY|F4}}). This will help you to input commands and see the results. You may divide this panel, to keep the console on one side, and make the other division an {{incode|Info}} panel; this will allow you to see the code of the actions as you click on the interface.<br />
<br />
Make sure you are using the EEVEE renderer. In the {{incode|Properties}} panel go to {{incode|Render}}, and for {{incode|Render Engine}} select {{incode|Eevee}}.<br />
<br />
{{Code|code=<br />
bpy.context.scene.render.engine = 'BLENDER_EEVEE'<br />
}}<br />
<br />
5. Import the model file from the menu, {{MenuCommand|File → Import → Wavefront (.obj)}}.<br />
<br />
Alternatively, importing can be done from the {{incode|Python Console}}.<br />
<br />
{{Code|code=<br />
obj_file = "/home/user/assembly.obj"<br />
bpy.ops.import_scene.obj(filepath=obj_file)<br />
}}<br />
<br />
6. Change the scale.<br />
<br />
If the bodies appear to be very large you may have to change the units so the objects appear at the right scale.<br />
<br />
In the {{incode|Properties}} panel go to {{incode|Scene}}, {{incode|Units}}, and select the appropriate {{incode|Unit System}}, {{incode|Unit Scale}}, and {{incode|Length}}.<br />
<br />
For small parts, you may wish to keep the length to {{incode|Millimeters}}, and the scale to {{incode|0.001}}. For bigger parts, for example, the model of a building, you may have to set these values to {{incode|Meters}} and {{incode|0.001}}. Try other values of scale as required.<br />
<br />
This can be set also from the {{incode|Python console}}.<br />
<br />
{{Code|code=<br />
bpy.context.scene.unit_settings.length_unit = 'MILLIMETERS'<br />
# or bpy.context.scene.unit_settings.length_unit = 'METERS'<br />
bpy.context.scene.unit_settings.scale_length = 0.001<br />
}}<br />
<br />
{{Emphasis|Note:}} changing the scale and units of the scene is only necessary if you wish to work with objects at their true dimensions. If you just want to render your scene quickly, you may omit any adjustment.<br />
<br />
6.1. If you zoom out, and the view cuts the imported parts, you may have to adjust the view clip values.<br />
<br />
Hit {{KEY|N}} to show the auxiliary panel; go to the {{incode|View}} section and set the {{incode|End}} to a large value, for example, {{incode|1E6 mm}} or {{incode|1000 m}}.<br />
<br />
6.2. If you wish, also adjust the size of the grid; go to {{incode|Overlays}}, then {{incode|Guides}}, and set the {{incode|Scale}} of the grid to {{incode|0.001}}.<br />
<br />
7. Fix the rotation of the objects.<br />
<br />
When imported, objects may appear rotated around one of the axes, for example, 90 degrees around the X axis.<br />
Hit {{KEY|N}} to show the auxiliary panel; select an object, go to the {{incode|Transform}} section and set the {{incode|Rotation}} to {{incode|0°}} in each field. Do this for every object.<br />
<br />
This can be automated by a small script that just sets the rotation of each imported body to zero, with the exception of the objects inside the {{incode|fixed_objs}} tuple. This can be useful if you are importing objects into an existing scene where other objects are already in their right positions.<br />
<br />
{{Code|code=<br />
fixed_objs = ('Camera', 'Cube', 'Light')<br />
<br />
for obj in bpy.data.objects:<br />
if any(s for s in fixed_objs if s in obj.name):<br />
print('%s %s [[No change]]' % (obj.name, obj.rotation_euler))<br />
continue<br />
else:<br />
obj.rotation_euler = (0, 0, 0)<br />
print('%s %s ... rotated' % (obj.name, obj.rotation_euler))<br />
}}<br />
<br />
[[Image:03_T03_FreeCAD_Blender_imported_assembly.png|center]]<br />
<br />
{{Caption|align=center|Assembly created in FreeCAD imported into Blender; the model was rotated and the units for the scene were adjusted to match the imported objects.}}<br />
<br />
=== Prepare the camera of the scene ===<br />
<br />
8. Set the camera in the right position.<br />
<br />
Adjust the viewport to look at the model in the desired orientation, then hit {{KEY|Ctrl}}+{{KEY|Alt}}+{{KEY|0}} (numerical pad), or use the menu {{MenuCommand|View → Align View → Align Active Camera to View}}.<br />
<br />
8.1. If you don't see anything in the camera view, you may need to adjust the clipping. Selecting the camera in the {{incode|Outliner}}, go to the {{incode|Properties}} panel, then {{incode|Object Data}}, then {{incode|Lens}}, then set the {{incode|Clip End}} to a large value, for example, {{incode|1E3 mm}} or {{incode|1000 m}}.<br />
<br />
{{Code|code=<br />
bpy.context.object.data.clip_end = 1e+03<br />
}}<br />
<br />
If you can see the object through the camera view, now you can quickly render the model by pressing {{KEY|F12}}, which will open the {{incode|Image Editor}} with the result. Press {{KEY|Esc}} to exit, and return to the {{incode|3D Viewport}}.<br />
<br />
[[Image:04_T03_FreeCAD_Blender_first_render.png|600px|center]]<br />
<br />
{{Caption|align=center|First render of the assembly in Blender, with the camera with correct clipping but no lighting}}<br />
<br />
You can toggle between camera view and the 3D viewport by pressing {{KEY|0}} in the numerical pad; pressing {{KEY|F12}} will render the camera view in any moment.<br />
<br />
8.2. If the camera looks very small in the 3D viewport, go to the {{incode|Properties}} panel, then {{incode|Object Data}}, then {{incode|Viewport Display}}, and set a larger value for the {{incode|Size}}, for example, {{incode|20 mm}}. Also activate the {{incode|Limits}} checkbox to see the clipping distance of the camera.<br />
<br />
{{Code|code=<br />
bpy.context.object.data.display_size = 20<br />
bpy.context.object.data.show_limits = True<br />
}}<br />
<br />
=== Prepare the lighting of the scene ===<br />
<br />
9. Select the light in the {{incode|Outliner}}, go to the {{incode|Properties}} panel, then {{incode|Object Data}}, then press on {{incode|Sun}}, and set the {{incode|Strength}} to {{incode|5.0}}.<br />
<br />
{{Code|code=<br />
bpy.context.object.data.type = 'SUN'<br />
bpy.context.object.data.energy = 5<br />
}}<br />
<br />
This will turn the light into a Sun lamp. This type of lamp emits an infinite number of parallel light rays that all arrive to the scene with a fixed angle.<br />
<br />
You may position the Sun lamp anywhere on the viewport above your model so that you define the direction of the rays of light. For a Sun lamp it doesn't matter how close or far you place the lamp, only the direction of the rays, which are defined by the rotation of the {{incode|Light}} object.<br />
<br />
{{Code|code=<br />
bpy.context.active_object.location = (150, 100, 100)<br />
bpy.context.active_object.rotation_euler = (0.6, 0.05, 1.88)<br />
}}<br />
<br />
Press {{KEY|F12}} again to see a preliminary render of the model.<br />
<br />
[[Image:05_T03_FreeCAD_Blender_render_sun_lamp.png|600px|center]]<br />
<br />
{{Caption|align=center|Render of the assembly in Blender with a Sun lamp added that emits parallel light rays with a fixed angle}}<br />
<br />
=== More setup: floor, global lighting, reflections, and soft shadows ===<br />
<br />
10. Add a floor plane. Press {{KEY|Shift}}+{{KEY|A}} then choose {{incode|Mesh}}, {{incode|Plane}}, and give it dimensions about 10 times larger than your model. This mesh object will serve as a floor plane or table top on which the model is standing. Also move the plane a bit down so that it does not intersect the model; {{incode|-1 mm}} below the object is enough.<br />
<br />
{{Code|code=<br />
bpy.ops.mesh.primitive_plane_add(size=1500, view_align=False, enter_editmode=False, location=(0, 0, -1))<br />
}}<br />
<br />
11. Set the world illumination. In the {{incode|Properties}} panel go to {{incode|World}}, and set {{incode|Color}} to a light blue-gray value, {{incode|RGB (0.358, 0.512, 0.527)}}, and set the {{incode|Strength}} to {{incode|0.3}}.<br />
<br />
12. Set reflections and shadows. The EEVEE renderer of Blender produces fast renders by deactivating most effects initially. In order to obtain better images, some options need to be made active.<br />
<br />
Go to the {{incode|Properties}} panel, then {{incode|Render}}, and check {{incode|Screen Space Reflections}}. In the {{incode|Shadows}} section, also check {{incode|Soft Shadows}}.<br />
<br />
{{Code|code=<br />
bpy.context.scene.eevee.use_ssr = True<br />
bpy.context.scene.eevee.use_soft_shadows = True<br />
}}<br />
<br />
=== Set the materials of the objects ===<br />
<br />
13. Turn the {{incode|Python Console}} panel into a {{incode|Shader Editor}} panel ({{KEY|Shift}}+{{KEY|F3}}).<br />
<br />
13.1. Select the ground plane, go to the {{incode|Properties}} panel, then {{incode|Material}}, and click on {{incode|New}}. In the {{incode|Shader Editor}} a {{incode|Principled BSDF}} node should appear. Give it a beige {{incode|Base Color}} {{incode|RGB (0.318, 0.267, 0.187)}}, turn the {{incode|Metallic}} slider to {{incode|0.000}}, and the {{incode|Roughness}} to {{incode|1.000}}.<br />
<br />
[[Image:06_T03_FreeCAD_Blender_Principled_shader.png|center]]<br />
<br />
{{Caption|align=center|Principled BSDF shader used in Blender to simulate a variety of materials ranging from shiny metals to rough and opaque solids.}}<br />
<br />
13.2. Select each of the parts of the model, and adjust the respective {{incode|Principled BSDF}} material node. For metallic parts, turn the {{incode|Metallic}} property all the way to {{incode|1.000}}. Adjust the value of {{incode|Roughness}} to be between {{incode|0.2}} and {{incode|0.7}}. The closer to {{incode|0.000}} the {{incode|Roughness}} is, the more reflective (mirror-like) it will appear.<br />
<br />
For non metals, like plastics, wood and textiles, set the {{incode|Metallic}} slider all the way to {{incode|0.000}}, and adjust the value of {{incode|Roughness}} to between {{incode|0.4}} and {{incode|1.0}}.<br />
<br />
In general, metals are naturally smooth and therefore their roughness value is small, making them very reflective (shiny). Other materials are microscopically rough, and therefore do not reflect as much light, making them opaque.<br />
<br />
14. Test different combinations of materials until they look acceptable. Press {{KEY|Z}} and then {{KEY|8}} (numerical pad) to enter {{incode|Rendered}} mode; in this mode, the EEVEE renderer shows in real time in the 3D viewport how the final image will look like. Use {{KEY|Z}} to open the pie menu and switch back to {{incode|Solid}} mode ({{KEY|Z}} {{KEY|6}}), or go to {{incode|LookDev}} mode ({{KEY|Z}} {{KEY|2}}), a mode which adds different types of lighting to the scene to test the appearance of the materials.<br />
<br />
Press {{KEY|F12}} to render the view through the camera and check the quality of the image.<br />
<br />
=== Rendering and saving ===<br />
<br />
15. If your model looks reasonably well with the EEVEE renderer you can already save the image by going to {{MenuCommand|Image → Save As}} or pressing {{KEY|Shift}}+{{KEY|S}} in the {{Incode|Image Editor}}.<br />
<br />
[[Image:07_T03_FreeCAD_Blender_EEVEE_render.png|600px|center]]<br />
<br />
{{Caption|align=center|Rendered assembly produced with Blender EEVEE; all materials use the Principled BSDF shader; only one Sun lamp is used, with some ambient background light.}}<br />
<br />
16. If you want to improve the quality of the image, try the Cycles renderer.<br />
<br />
Go to the {{incode|Properties}} panel, then {{incode|Render}}, and for {{incode|Render Engine}} select {{incode|Cycles}}. With the Cycles renderer, Blender will refine the image gradually until a number of iterations have passed. Every time the viewport changes the recalculation restarts.<br />
<br />
{{Code|code=<br />
bpy.context.scene.render.engine = 'CYCLES'<br />
}}<br />
<br />
16.1. Adjust the sampling rate. Go to the {{incode|Properties}} panel, then {{incode|Render}}, then in the {{incode|Sampling}} section select an appropriate number for {{incode|Render}} and {{incode|Viewport}}.<br />
<br />
For the {{incode|Viewport}} a small number of samples, in the range of {{incode|32}} to {{incode|128}}, is generally enough to obtain a good preview of the image. For the final image, set {{incode|Render}} to a higher number, from {{incode|128}} to {{incode|2000}}, depending on the complexity and amount of details on the scene.<br />
<br />
Press {{KEY|F12}} to render the final view through the camera. Depending on your graphics card (GPU) the image should take several more seconds, or minutes, to render with Cycles than with EEVEE, but the quality of the image should be better.<br />
<br />
17. When you are satisfied with the quality of the rendering, in the {{incode|Image Editor}} go to {{MenuCommand|Image → Save As}} or press {{KEY|Shift}}+{{KEY|S}}.<br />
<br />
[[Image:08_T03_FreeCAD_Blender_Cycles_render.png|600px|center]]<br />
<br />
{{Caption|align=center|Rendered assembly produced with Blender Cycles; all options, materials, and lights that were used with EEVEE were kept for use with Cycles.}}<br />
<br />
=== Rendering from the command line ===<br />
<br />
18. If the scene has been completely finished, you may wish to render from outside Blender, from the operating system's command line. This can be useful to batch render different scenes in a remote system. Both EEVEE and Cycles are supported.<br />
<br />
{{Code|code=<br />
blender -b assembly.blend -E BLENDER_EEVEE -o //assembly_EEVEE_#### -t 3 -F PNG -x 1 -f 1<br />
}}<br />
<br />
{{Code|code=<br />
blender -b assembly.blend -E CYCLES -o //assembly_CYCLES_#### -t 3 -F PNG -x 1 -f 1<br />
}}<br />
<br />
This specifies that rendering should happen in the background with {{incode|-b}}; the rendering engine is chosen with {{incode|-E}}; the output filename is selected with {{incode|-o}}; the double forward slash {{incode|//}} indicates a path relative to the input file; the hash mark {{incode|#}} is used to indicate the frame number, padded with zeroes if necessary, for example, {{incode|0001}}; the number of CPU threads used in rendering is chosen with {{incode|-t 3}}; the output file format is indicated with {{incode|-F}}, and the {{incode|-x 1}} option adds automatically the extension to the name; the final option is {{incode|-f 1}} which indicates that only the first frame will be rendered, which is the normal case for a static scene; for animations use the {{incode|-a}} switch to produce an image for each frame, which can then be assembled to produce a video file.<br />
<br />
== Importing plugin ==<br />
<br />
Creating the intermediate Wavefront mesh (.obj) and then importing it into Blender will work in most situations. However, there is also the option of importing the FreeCAD file (.FCStd) directly into Blender by means of a plugin.<br />
* [https://gist.github.com/yorikvanhavre/e873d51c8f0e307e333fe595c429ba87 io_import_fcstd.py], original version for Blender 2.79<br />
* [https://gist.github.com/yorikvanhavre/680156f59e2b42df8f5f5391cae2660b FreeCAD .FCStd importer for Blender 2.80]<br />
<br />
This is a Blender plugin; for it to work, Blender needs to be able to import FreeCAD as a module from the {{incode|Python Console}}.<br />
{{Code|code=<br />
import FreeCAD<br />
}}<br />
<br />
This is only possible if both Blender and FreeCAD are compiled against the same {{incode|pythonX.Y}} (major and minor) version. For example, if Blender is compiled against Python 3.7, FreeCAD must be compiled against a Python 3.7 version as well. If FreeCAD is compiled against another version, for example, Python 2.7.15 or Python 3.6.7, the plugin will not work. The micro version number (third number) does not matter, that is, the plugin should work if one software is compiled against Python 3.7.5 and the other against Python 3.7.8.<br />
<br />
In addition, the FreeCAD precompiled Python module, {{incode|FreeCAD.so}} on Linux and {{incode|FreeCAD.pyd}} on Windows, should be in the Python path used by Blender to import modules. This path can be set up in different ways, depending on the operating system and Python distribution.<br />
<br />
In Blender you can see all paths searched by inspecting the {{incode|sys.path}} variable. The FreeCAD module should be found in any of those directories.<br />
{{Code|code=<br />
import sys<br />
print(sys.path)}}<br />
<br />
* A copy or symbolic link inside one of those directories could be created pointing to the FreeCAD module.<br />
{{Code|code=<br />
ln -s /usr/lib/freecad/lib/FreeCAD.so $HOME/.config/blender/2.80/scripts/addons<br />
<br />
ln -s /usr/lib/freecad/lib/FreeCAD.so $HOME/.local/lib/python3.7/site-packages<br />
}}<br />
<br />
* Another possibility is adding the module directly into the path inside Blender.<br />
{{Code|code=<br />
import sys<br />
sys.path.append("/usr/lib/freecad/lib/FreeCAD.so")<br />
}}<br />
<br />
== Final notes ==<br />
<br />
EEVEE is not a physically accurate renderer, however its main strength is that it is a real time engine so it is able to produce quick renderings directly in the 3D viewport. In many cases these images have enough quality for final production, which means it is possible to obtain a good result in a very short time. In cases where complex light interactions are desired (reflections, refractions, volumetric light, and caustics) EEVEE is more limited, and requires some options and tricks to work around some of these limitations.<br />
<br />
On the other hand, Cycles is a true raytracing renderer which means it is more accurate at calculating light paths in a scene. Cycles is the recommended renderer when the best quality is desired (photorealistic results), at the cost of more rendering time.<br />
<br />
Both renderers can be used to leverage the advantages of each. In many cases the scene can be quickly prepared and tested with EEVEE to obtain preliminary renderings; then the same scene can be used with minor changes with Cycles in order to produce a higher quality, final rendering. In particular, when a scene that was setup with EEVEE will be used with Cycles, the lights may need to be adjusted in value and position as both renderers treat light in different ways.<br />
<br />
Obtaining good results is highly dependent on the rendering options, the materials, and the lighting. The {{incode|Principled BSDF}} material shader is a generic solution that works well for many cases, however, to produce truly photorealistic results, the use of texture maps and normal maps, along with careful lighting of the scene is still very important.<br />
{{Tutorials navi{{#translation:}}}}<br />
{{Raytracing Tools navi{{#translation:}}}}<br />
{{Userdocnavi{{#translation:}}}}</div>Baritone