├── .github └── workflows │ └── codeql-analysis.yml ├── .gitignore ├── .pre-commit-config.yaml ├── .pylintrc ├── InitGui.py ├── LICENSE ├── README.md ├── Render ├── __init__.py ├── base.py ├── camera.py ├── coin.py ├── commands.py ├── constants.py ├── groundplane.py ├── imageviewer.py ├── lights.py ├── material.py ├── plugins │ ├── README.md │ ├── console │ │ └── __main__.py │ ├── help │ │ ├── 3rdparty │ │ │ ├── jQuery.js │ │ │ ├── marked.min.js │ │ │ ├── waterdark.css │ │ │ └── waterlight.css │ │ ├── COPYING.txt │ │ ├── LICENSE.txt │ │ ├── README.md │ │ └── __main__.py │ └── materialx │ │ ├── COPYING.txt │ │ ├── LICENSE.txt │ │ ├── README.md │ │ ├── __init__.py │ │ ├── __main__.py │ │ ├── downloader │ │ ├── __init__.py │ │ └── materialx_downloader.py │ │ ├── importer │ │ ├── __init__.py │ │ ├── converter │ │ │ ├── materialx_baker.py │ │ │ ├── materialx_converter.py │ │ │ └── render_libraries │ │ │ │ ├── displacement_to_render_disp.mtlx │ │ │ │ ├── render_disp.mtlx │ │ │ │ ├── render_pbr.mtlx │ │ │ │ └── translation │ │ │ │ └── standard_surface_to_render_pbr.mtlx │ │ └── materialx_importer.py │ │ └── polyhaven │ │ ├── __init__.py │ │ └── materialx_polyhaven.py ├── prefpage.py ├── project.py ├── rdrexecutor.py ├── rdrhandler.py ├── renderables.py ├── renderers │ ├── Appleseed.py │ ├── Cycles.py │ ├── Luxcore.py │ ├── Luxrender.py │ ├── Ospray.py │ ├── Pbrt.py │ ├── Povray.py │ ├── README.md │ ├── __init__.py │ ├── as_shaders │ │ ├── PyLa.osl │ │ ├── PyLa.oso │ │ ├── README.md │ │ ├── as_anisotropy_vector_field.oso │ │ ├── as_asc_cdl.oso │ │ ├── as_attributes.oso │ │ ├── as_blackbody.oso │ │ ├── as_blend_color.oso │ │ ├── as_blend_normal.oso │ │ ├── as_blend_shader.oso │ │ ├── as_bump.oso │ │ ├── as_closure2surface.oso │ │ ├── as_color_transform.oso │ │ ├── as_composite_color.oso │ │ ├── as_create_mask.oso │ │ ├── as_disney_material.oso │ │ ├── as_double_shade.oso │ │ ├── as_falloff_angle.oso │ │ ├── as_fresnel.oso │ │ ├── as_glass.oso │ │ ├── as_globals.oso │ │ ├── as_hair_material.oso │ │ ├── as_id_manifold.oso │ │ ├── as_invert_color.oso │ │ ├── as_luminance.oso │ │ ├── as_manifold2d.oso │ │ ├── as_matte.oso │ │ ├── as_metal.oso │ │ ├── as_noise2d.oso │ │ ├── as_noise3d.oso │ │ ├── as_plastic.oso │ │ ├── as_ray_switch.oso │ │ ├── as_ray_switch_surface.oso │ │ ├── as_sbs_pbrmaterial.oso │ │ ├── as_space_transform.oso │ │ ├── as_standard_surface.oso │ │ ├── as_subsurface.oso │ │ ├── as_surface_luminance.oso │ │ ├── as_switch_surface.oso │ │ ├── as_switch_texture.oso │ │ ├── as_swizzle.oso │ │ ├── as_texture.oso │ │ ├── as_texture2surface.oso │ │ ├── as_texture3d.oso │ │ ├── as_texture_info.oso │ │ ├── as_toon.oso │ │ ├── as_triplanar.oso │ │ ├── as_vary_color.oso │ │ ├── as_voronoi2d.oso │ │ ├── as_voronoi3d.oso │ │ ├── fc_add_normal.osl │ │ ├── fc_add_normal.oso │ │ ├── fc_bump.osl │ │ └── fc_bump.oso │ └── utils │ │ ├── misc.py │ │ └── sunlight.py ├── rendermaterial.py ├── rendermesh.py ├── rendermesh_mixins.py ├── rendermesh_mp │ ├── README.md │ ├── autosmooth.py │ ├── uvmap_cube.py │ ├── vector3d.py │ └── writeobj.py ├── resources │ ├── icons │ │ ├── Appleseed.svg │ │ ├── ApplyMaterial.svg │ │ ├── Arch_Material_Group.svg │ │ ├── AreaLight.svg │ │ ├── Camera-photo.svg │ │ ├── Cycles.svg │ │ ├── DistantLight.svg │ │ ├── Help.svg │ │ ├── ImageLight.svg │ │ ├── Luxcore.svg │ │ ├── Luxrender.svg │ │ ├── MaterialSettings.svg │ │ ├── Ospray.svg │ │ ├── Pbrt.svg │ │ ├── PointLight.svg │ │ ├── Povray.svg │ │ ├── Raytrace_Camera.svg │ │ ├── Render.svg │ │ ├── RenderProject.svg │ │ ├── RenderView.svg │ │ ├── RenderViewTree.svg │ │ ├── SunskyLight.svg │ │ ├── Texture.svg │ │ ├── ambientcg.png │ │ ├── amdgpuopen.png │ │ ├── materialx-stacked-black.svg │ │ ├── materialx-stacked-color.svg │ │ ├── preferences-render.svg │ │ └── settings.svg │ ├── translations │ │ ├── README.md │ │ ├── Render.ts │ │ ├── Render_af.ts │ │ ├── Render_ar.ts │ │ ├── Render_bg.ts │ │ ├── Render_ca.ts │ │ ├── Render_cs.ts │ │ ├── Render_de.qm │ │ ├── Render_de.ts │ │ ├── Render_el.ts │ │ ├── Render_es-AR.qm │ │ ├── Render_es-AR.ts │ │ ├── Render_es-ES.qm │ │ ├── Render_es-ES.ts │ │ ├── Render_eu.ts │ │ ├── Render_fi.ts │ │ ├── Render_fil.ts │ │ ├── Render_fr.qm │ │ ├── Render_fr.ts │ │ ├── Render_hr.ts │ │ ├── Render_hu.ts │ │ ├── Render_it.qm │ │ ├── Render_it.ts │ │ ├── Render_ja.ts │ │ ├── Render_ka.qm │ │ ├── Render_ka.ts │ │ ├── Render_kab.ts │ │ ├── Render_ko.ts │ │ ├── Render_lt.ts │ │ ├── Render_nl.ts │ │ ├── Render_no.ts │ │ ├── Render_pl.qm │ │ ├── Render_pl.ts │ │ ├── Render_pt-BR.ts │ │ ├── Render_pt-PT.ts │ │ ├── Render_ro.ts │ │ ├── Render_ru.ts │ │ ├── Render_sk.ts │ │ ├── Render_sl.qm │ │ ├── Render_sl.ts │ │ ├── Render_sr.ts │ │ ├── Render_sv-SE.ts │ │ ├── Render_tr.ts │ │ ├── Render_uk.ts │ │ ├── Render_val-ES.ts │ │ ├── Render_vi.ts │ │ ├── Render_zh-CN.ts │ │ ├── Render_zh-TW.ts │ │ └── update_translation.sh │ └── ui │ │ ├── RenderMaterial.ui │ │ └── RenderSettings.ui ├── subcontainer.py ├── taskpanels.py ├── texture.py ├── utils.py ├── view.py └── virtualenv.py ├── docs ├── Appleseed_glass.png ├── CODE_OF_CONDUCT.md ├── Cameras.md ├── Contributing.md ├── EngineInstall.md ├── Lights.md ├── Materials.md ├── Projects.md ├── UVProjection.png ├── View.png ├── Views.md ├── arealight.jpg ├── camera.jpg ├── fileset_texture.png ├── freecad-june-09.jpg ├── manyimages_texture.png ├── material_texture.png ├── materials_advanced.md ├── pointlight.jpg ├── preferences.jpg └── textures.png ├── licenses ├── gpl.txt └── lgpl-2.1.txt ├── materials ├── Aluminium.FCMat ├── Brass.FCMat ├── Carpaint.FCMat ├── Disney.FCMat ├── Emission.FCMat ├── Glass.FCMat ├── GlossyPlastic.FCMat ├── Gold.FCMat ├── GreenMarble.FCMat ├── GreenMarble │ ├── Marble009_1K-JPG.usda │ ├── Marble009_1K-JPG.usdc │ ├── Marble009_1K-JPG.zip │ ├── Marble009_1K_Color.jpg │ ├── Marble009_1K_Color_Light.jpg │ ├── Marble009_1K_Displacement.jpg │ ├── Marble009_1K_NormalDX.jpg │ ├── Marble009_1K_NormalGL.jpg │ ├── Marble009_1K_Roughness.jpg │ └── Marble009_PREVIEW.jpg ├── Iron.FCMat ├── Magnetite.FCMat ├── Magnetite │ └── magnetite.nk ├── Matte.FCMat ├── RoughPlastic.FCMat ├── Terrazzo.FCMat └── Terrazzo019 │ ├── Terrazzo019M_1K_Color_Light.jpg │ ├── Terrazzo019M_1K_Displacement.jpg │ ├── Terrazzo019M_1K_NormalGL.jpg │ ├── Terrazzo019M_1K_Roughness.jpg │ └── Terrazzo019M_PREVIEW.jpg ├── package.xml ├── pyproject.toml ├── renderplugin ├── .gitignore ├── README.md ├── pyproject.toml └── src │ └── renderplugin │ ├── __init__.py │ └── plugin_framework.py ├── templates ├── appleseed_flat.appleseed ├── appleseed_standard.appleseed ├── appleseed_studio_dark.appleseed ├── appleseed_studio_light.appleseed ├── appleseed_sunlight.appleseed ├── cycles_flat.xml ├── cycles_standard.xml ├── cycles_studio_dark.xml ├── cycles_studio_light.xml ├── cycles_sunlight.xml ├── luxcore_flat.cfg ├── luxcore_standard.cfg ├── luxcore_studio_dark.cfg ├── luxcore_studio_light.cfg ├── luxcore_sunlight.cfg ├── luxrender_flat.lxs ├── luxrender_standard.lxs ├── luxrender_sunlight.lxs ├── ospray_flat.sg ├── ospray_standard.sg ├── ospray_studio_dark.sg ├── ospray_studio_light.sg ├── ospray_sunlight.sg ├── pbrt_flat.pbrt ├── pbrt_standard.pbrt ├── pbrt_studio_dark.pbrt ├── pbrt_studio_light.pbrt ├── pbrt_sunlight.pbrt ├── povray_flat.pov ├── povray_standard.pov ├── povray_studio_dark.pov ├── povray_studio_light.pov └── povray_sunlight.pov └── wheelhouse ├── README.md ├── materialx-1.38.10-cp312-cp312-macosx_11_0_arm64.whl ├── materialx-1.38.10-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl ├── materialx-1.38.10-cp312-cp312-win_amd64.whl ├── materialx-1.38.10-cp313-cp313-manylinux_2_28_x86_64.whl ├── renderplugin-0.0.1-py2.py3-none-any.whl └── renderplugin-0.0.1.tar.gz /.github/workflows/codeql-analysis.yml: -------------------------------------------------------------------------------- 1 | # For most projects, this workflow file will not need changing; you simply need 2 | # to commit it to your repository. 3 | # 4 | # You may wish to alter this file to override the set of languages analyzed, 5 | # or to provide custom queries or build logic. 6 | # 7 | # ******** NOTE ******** 8 | # We have attempted to detect the languages in your repository. Please check 9 | # the `language` matrix defined below to confirm you have the correct set of 10 | # supported CodeQL languages. 11 | # 12 | name: "CodeQL" 13 | 14 | on: 15 | push: 16 | branches: [ "master" ] 17 | pull_request: 18 | # The branches below must be a subset of the branches above 19 | branches: [ "master" ] 20 | schedule: 21 | - cron: '35 22 * * 4' 22 | 23 | jobs: 24 | analyze: 25 | name: Analyze 26 | runs-on: ubuntu-latest 27 | permissions: 28 | actions: read 29 | contents: read 30 | security-events: write 31 | 32 | strategy: 33 | fail-fast: false 34 | matrix: 35 | language: [ 'python' ] 36 | # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] 37 | # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support 38 | 39 | steps: 40 | - name: Checkout repository 41 | uses: actions/checkout@v3 42 | 43 | # Initializes the CodeQL tools for scanning. 44 | - name: Initialize CodeQL 45 | uses: github/codeql-action/init@v2 46 | with: 47 | languages: ${{ matrix.language }} 48 | # If you wish to specify custom queries, you can do so here or in a config file. 49 | # By default, queries listed here will override any specified in a config file. 50 | # Prefix the list here with "+" to use these queries and those in the config file. 51 | 52 | # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs 53 | # queries: security-extended,security-and-quality 54 | 55 | 56 | # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). 57 | # If this step fails, then you should remove it and run the build manually (see below) 58 | - name: Autobuild 59 | uses: github/codeql-action/autobuild@v2 60 | 61 | # ℹ️ Command-line programs to run using the OS shell. 62 | # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun 63 | 64 | # If the Autobuild fails above, remove it and uncomment the following three lines. 65 | # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. 66 | 67 | # - run: | 68 | # echo "Run, Build Application using script" 69 | # ./location_of_script_within_repo/buildscript.sh 70 | 71 | - name: Perform CodeQL Analysis 72 | uses: github/codeql-action/analyze@v2 73 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.pyc 2 | -------------------------------------------------------------------------------- /.pre-commit-config.yaml: -------------------------------------------------------------------------------- 1 | # See https://pre-commit.com for more information 2 | # See https://pre-commit.com/hooks.html for more hooks 3 | repos: 4 | - repo: https://github.com/pre-commit/pre-commit-hooks 5 | rev: v5.0.0 6 | hooks: 7 | - id: trailing-whitespace 8 | - id: end-of-file-fixer 9 | - id: check-yaml 10 | - id: check-added-large-files 11 | - repo: https://github.com/psf/black 12 | rev: 25.1.0 13 | hooks: 14 | - id: black 15 | -------------------------------------------------------------------------------- /InitGui.py: -------------------------------------------------------------------------------- 1 | # *************************************************************************** 2 | # * * 3 | # * Copyright (c) 2017 Yorik van Havre * 4 | # * * 5 | # * This program is free software; you can redistribute it and/or modify * 6 | # * it under the terms of the GNU Lesser General Public License (LGPL) * 7 | # * as published by the Free Software Foundation; either version 2.1 of * 8 | # * the License, or (at your option) any later version. * 9 | # * for detail see the LICENCE text file. * 10 | # * * 11 | # * This program is distributed in the hope that it will be useful, * 12 | # * but WITHOUT ANY WARRANTY; without even the implied warranty of * 13 | # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 14 | # * GNU Library General Public License for more details. * 15 | # * * 16 | # * You should have received a copy of the GNU Library General Public * 17 | # * License along with this program; if not, write to the Free Software * 18 | # * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * 19 | # * USA * 20 | # * * 21 | # *************************************************************************** 22 | """Gui initialization module for Render Workbench.""" 23 | 24 | import FreeCAD as App 25 | import FreeCADGui as Gui 26 | 27 | # Caveat: do not import Render here (too early, will slow down global startup) 28 | 29 | 30 | class RenderWorkbench(Gui.Workbench): 31 | """The Render Workbench.""" 32 | 33 | def __init__(self): 34 | """Initialize object.""" 35 | # Caveat: do not import Render here 36 | # (too early, will slow down global startup) 37 | 38 | # pylint: disable=import-outside-toplevel 39 | import FreeCAD 40 | 41 | try: 42 | translate = FreeCAD.Qt.translate 43 | except AttributeError: 44 | translate = lambda _, x: x 45 | 46 | self.__class__.MenuText = "Render" 47 | self.__class__.ToolTip = translate( 48 | "Workbench", 49 | "The Render workbench is a modern replacement for " 50 | "the Raytracing workbench", 51 | ) 52 | self.__class__.Icon = """ 53 | /* XPM */ 54 | static char * Render_xpm[] = { 55 | "16 16 33 1", 56 | " c None", 57 | ". c #103F06", 58 | "+ c #224702", 59 | "@ c #1A580E", 60 | "# c #2F5600", 61 | "$ c #386402", 62 | "% c #297014", 63 | "& c #416B00", 64 | "* c #537200", 65 | "= c #3C7B0F", 66 | "- c #4B880D", 67 | "; c #579310", 68 | "> c #609702", 69 | ", c #858B13", 70 | "' c #6AA20A", 71 | ") c #92A709", 72 | "! c #9EA610", 73 | "~ c #ACA137", 74 | "{ c #86B208", 75 | "] c #B6A94A", 76 | "^ c #9DC400", 77 | "/ c #ADC50F", 78 | "( c #B4C31F", 79 | "_ c #C8BD71", 80 | ": c #C2C731", 81 | "< c #CAD51A", 82 | "[ c #D7D736", 83 | "} c #E9CD77", 84 | "| c #DCDA50", 85 | "1 c #E5DF6D", 86 | "2 c #EBE581", 87 | "3 c #F4EFA8", 88 | "4 c #F8F4C7", 89 | " ", 90 | " ", 91 | " #*)!~] ", 92 | " &^^<[|2_} ", 93 | " ${{/(|243_ ", 94 | " +;'{{(|2431~ ", 95 | " #->'{(:|11[, ", 96 | " @--;')(::[<, ", 97 | " @==-;'{)(//* ", 98 | " .%%=-;>'{^^# ", 99 | " .@%%=-;>'{; ", 100 | " .@%%=-;>>+ ", 101 | " .@%%=-&+ ", 102 | " .... ", 103 | " ", 104 | " "}; 105 | """ 106 | 107 | def Initialize(self): 108 | """Initialize GUI when the workbench is first loaded (callback). 109 | 110 | This method is called by FreeCAD framework when the workbench is first 111 | loaded. 112 | """ 113 | # pylint: disable=import-outside-toplevel 114 | from PySide.QtCore import QT_TRANSLATE_NOOP 115 | from Render.utils import translate 116 | from FreeCAD import Console 117 | from FreeCADGui import ( 118 | addIconPath, 119 | addPreferencePage, 120 | addLanguagePath, 121 | updateLocale, 122 | ) 123 | 124 | from Render import RENDER_COMMANDS, ICONDIR, TRANSDIR, PreferencesPage 125 | 126 | # Translations 127 | addLanguagePath(TRANSDIR) 128 | updateLocale() 129 | 130 | # GUI 131 | self.appendToolbar( 132 | QT_TRANSLATE_NOOP("Workbench", "Render"), RENDER_COMMANDS 133 | ) 134 | self.appendMenu( 135 | QT_TRANSLATE_NOOP("Workbench", "&Render"), RENDER_COMMANDS 136 | ) 137 | addIconPath(ICONDIR) 138 | addPreferencePage(PreferencesPage, "Render") 139 | msg = translate("Workbench", "Loading Render module... done") + "\n" 140 | Console.PrintLog(msg) 141 | 142 | def GetClassName(self): # pylint: disable=no-self-use 143 | """Provide type of workbench.""" 144 | return "Gui::PythonWorkbench" 145 | 146 | 147 | Gui.addWorkbench(RenderWorkbench) 148 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | LICENSE 2 | 3 | The Render Workbench is licensed under the terms of GNU Lesser General Public 4 | License (LGPL) version 2.1 or, at your option, any later version. 5 | 6 | By way of exception, however, the following components are subject to a 7 | different licensing policy: 8 | 9 | - Plugin `help`, located in ./Render/plugins/help, is licensed under the terms 10 | of GNU General Public License (GNU GPL) version 3 or, at your option, any 11 | later version. 12 | 13 | - Plugin `materialx`, located in ./Render/plugins/materialx, is licensed under 14 | the terms of GNU General Public License (GNU GPL) version 3 or, at your 15 | option, any later version. 16 | 17 | Each source file contains its own licensing information. Source files with no 18 | licensing information are released under the GNU Lesser General Public License, 19 | version 2.1 or, at your option, any later version. 20 | 21 | All contributions to The Render Workbench are subject to this LICENSE file. 22 | 23 | Copies of GNU LGPL and GNU GPL can be found in `licenses` directory. 24 | -------------------------------------------------------------------------------- /Render/__init__.py: -------------------------------------------------------------------------------- 1 | # *************************************************************************** 2 | # * * 3 | # * Copyright (c) 2017 Yorik van Havre * 4 | # * * 5 | # * This program is free software; you can redistribute it and/or modify * 6 | # * it under the terms of the GNU Lesser General Public License (LGPL) * 7 | # * as published by the Free Software Foundation; either version 2.1 of * 8 | # * the License, or (at your option) any later version. * 9 | # * for detail see the LICENCE text file. * 10 | # * * 11 | # * This program is distributed in the hope that it will be useful, * 12 | # * but WITHOUT ANY WARRANTY; without even the implied warranty of * 13 | # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 14 | # * GNU Library General Public License for more details. * 15 | # * * 16 | # * You should have received a copy of the GNU Library General Public * 17 | # * License along with this program; if not, write to the Free Software * 18 | # * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * 19 | # * USA * 20 | # * * 21 | # *************************************************************************** 22 | 23 | 24 | """This is Render workbench main module. 25 | 26 | It imports all the public symbols which make up the Render Workbench API. 27 | """ 28 | import FreeCAD as App 29 | 30 | App.Console.PrintLog("[Render][Init] Starting Render initialization\n") 31 | 32 | from Render.constants import ( # noqa: F401 33 | WBDIR, 34 | RDRDIR, 35 | ICONDIR, 36 | TRANSDIR, 37 | TEMPLATEDIR, 38 | PREFPAGE, 39 | TASKPAGE, 40 | RENDERERS, 41 | DEPRECATED_RENDERERS, 42 | VALID_RENDERERS, 43 | FCDVERSION, 44 | PARAMS, 45 | ) 46 | from Render.utils import ( # noqa: F401 47 | reload, 48 | last_cmd, 49 | set_dryrun, 50 | set_dryrun_on, 51 | set_dryrun_off, 52 | set_debug, 53 | set_debug_on, 54 | set_debug_off, 55 | set_memcheck, 56 | set_memcheck_on, 57 | set_memcheck_off, 58 | ) 59 | 60 | from Render.project import Project, ViewProviderProject # noqa: F401 61 | from Render.view import View, ViewProviderView # noqa: F401 62 | from Render.camera import Camera, ViewProviderCamera # noqa: F401 63 | from Render.lights import ( # noqa: F401 64 | PointLight, 65 | ViewProviderPointLight, 66 | AreaLight, 67 | ViewProviderAreaLight, 68 | SunskyLight, 69 | ViewProviderSunskyLight, 70 | ImageLight, 71 | ViewProviderImageLight, 72 | DistantLight, 73 | ViewProviderDistantLight, 74 | ) 75 | from Render.texture import Texture, ViewProviderTexture # noqa: F401 76 | from Render.material import ( # noqa: F401 77 | Material, 78 | ViewProviderMaterial, 79 | make_material, 80 | ) 81 | from Render.commands import RENDER_COMMANDS # noqa: F401 82 | from Render.prefpage import PreferencesPage # noqa: F401 83 | 84 | from Render.virtualenv import ensure_rendervenv # noqa: F401 85 | 86 | # Ensure we've got a Python virtual environment 87 | ensure_rendervenv() 88 | 89 | 90 | if App.GuiUp and PARAMS.GetBool("AutoImport"): 91 | import FreeCADGui as Gui 92 | 93 | Gui.doCommand("import Render") 94 | -------------------------------------------------------------------------------- /Render/constants.py: -------------------------------------------------------------------------------- 1 | # *************************************************************************** 2 | # * * 3 | # * Copyright (c) 2021 Howetuft * 4 | # * * 5 | # * This program is free software; you can redistribute it and/or modify * 6 | # * it under the terms of the GNU Lesser General Public License (LGPL) * 7 | # * as published by the Free Software Foundation; either version 2.1 of * 8 | # * the License, or (at your option) any later version. * 9 | # * for detail see the LICENCE text file. * 10 | # * * 11 | # * This program is distributed in the hope that it will be useful, * 12 | # * but WITHOUT ANY WARRANTY; without even the implied warranty of * 13 | # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 14 | # * GNU Library General Public License for more details. * 15 | # * * 16 | # * You should have received a copy of the GNU Library General Public * 17 | # * License along with this program; if not, write to the Free Software * 18 | # * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * 19 | # * USA * 20 | # * * 21 | # *************************************************************************** 22 | 23 | """This module implements constants for Render workbench.""" 24 | 25 | import os 26 | import re 27 | 28 | import FreeCAD as App 29 | 30 | # Paths 31 | PKGDIR = os.path.dirname(__file__) # Package directory (=this file directory) 32 | WBDIR = os.path.dirname(PKGDIR) # Workbench root directory 33 | USERAPPDIR = App.getUserAppDataDir() 34 | RDRDIR = os.path.join(PKGDIR, "renderers") 35 | ICONDIR = os.path.join(PKGDIR, "resources", "icons") 36 | TEMPLATEDIR = os.path.join(WBDIR, "templates") 37 | WBMATERIALDIR = os.path.realpath(os.path.join(WBDIR, "materials")) 38 | FCDMATERIALDIR = os.path.join( 39 | App.getResourceDir(), "Mod", "Material", "StandardMaterial" 40 | ) 41 | USERMATERIALDIR = os.path.join(App.ConfigGet("UserAppData"), "Materials") 42 | WHEELSDIR = os.path.join(WBDIR, "wheelhouse") 43 | TRANSDIR = os.path.join(PKGDIR, "resources", "translations") 44 | PREFPAGE = os.path.join(PKGDIR, "resources", "ui", "RenderSettings.ui") 45 | TASKPAGE = os.path.join(PKGDIR, "resources", "ui", "RenderMaterial.ui") 46 | PLUGINDIR = os.path.join(PKGDIR, "plugins") 47 | 48 | # Renderers lists 49 | RENDERERS = { 50 | x.group(1) 51 | for x in map(lambda x: re.match(r"^([A-Z].*)\.py$", x), os.listdir(RDRDIR)) 52 | if x 53 | } 54 | DEPRECATED_RENDERERS = {"Luxrender"} 55 | VALID_RENDERERS = sorted(RENDERERS - DEPRECATED_RENDERERS) 56 | 57 | # FreeCAD version 58 | APPVERSION = App.Version() 59 | try: 60 | subminor = int(APPVERSION[2]) 61 | except ValueError: 62 | FCDVERSION = ( 63 | int(APPVERSION[0]), 64 | int(APPVERSION[1]), 65 | ) 66 | else: 67 | FCDVERSION = ( 68 | int(APPVERSION[0]), 69 | int(APPVERSION[1]), 70 | subminor, 71 | ) 72 | 73 | 74 | # Workbench parameters 75 | PARAMS = App.ParamGet("User parameter:BaseApp/Preferences/Mod/Render") 76 | 77 | MAX_FILENAME_LEN = 256 78 | -------------------------------------------------------------------------------- /Render/groundplane.py: -------------------------------------------------------------------------------- 1 | # *************************************************************************** 2 | # * * 3 | # * Copyright (c) 2023 Howetuft * 4 | # * * 5 | # * This program is free software; you can redistribute it and/or modify * 6 | # * it under the terms of the GNU Lesser General Public License (LGPL) * 7 | # * as published by the Free Software Foundation; either version 2.1 of * 8 | # * the License, or (at your option) any later version. * 9 | # * for detail see the LICENCE text file. * 10 | # * * 11 | # * This program is distributed in the hope that it will be useful, * 12 | # * but WITHOUT ANY WARRANTY; without even the implied warranty of * 13 | # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 14 | # * GNU Library General Public License for more details. * 15 | # * * 16 | # * You should have received a copy of the GNU Library General Public * 17 | # * License along with this program; if not, write to the Free Software * 18 | # * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * 19 | # * USA * 20 | # * * 21 | # *************************************************************************** 22 | 23 | """This module implements a ground plane, as a ducktyping view.""" 24 | 25 | from types import SimpleNamespace 26 | 27 | import FreeCAD as App 28 | import Mesh 29 | 30 | from Render.rdrhandler import RenderingTypes 31 | from Render.utils import clamp 32 | 33 | 34 | def create_groundplane_view(project): 35 | """Create a (ducktyping) view on a (ducktyping) ground plane object.""" 36 | result = SimpleNamespace() 37 | result.Source = _GroundPlane(project) 38 | result.AutoSmooth = False 39 | result.AutoSmoothAngle = 0.0 40 | result.Material = None 41 | return result 42 | 43 | 44 | class _GroundPlane: 45 | """A ducktyping object that will be rendered as a ground plane.""" 46 | 47 | # pylint: disable=too-few-public-methods 48 | def __init__(self, project): 49 | """Initialize. 50 | 51 | Args: 52 | project: a Render.Project (for the bounding box and other 53 | parameters) 54 | """ 55 | # pylint: disable=invalid-name 56 | self.Name = "__ground_plane__" 57 | self.FullName = "__ground_plane__" 58 | self.Label = "__ground_plane__" 59 | 60 | self.Mesh = Mesh.Mesh() 61 | bbox = project.get_bounding_box() 62 | self.Document = project.fpo.Document 63 | self.Placement = App.Placement() 64 | 65 | color = project.fpo.GroundPlaneColor # Keep it in FCD format 66 | 67 | if bbox.isValid(): 68 | zpos = project.fpo.GroundPlaneZ 69 | sizefactor = project.fpo.GroundPlaneSizeFactor 70 | 71 | margin = bbox.DiagonalLength / 2 * sizefactor 72 | verts2d = ( 73 | (bbox.XMin - margin, bbox.YMin - margin), 74 | (bbox.XMax + margin, bbox.YMin - margin), 75 | (bbox.XMax + margin, bbox.YMax + margin), 76 | (bbox.XMin - margin, bbox.YMax + margin), 77 | ) 78 | vertices = [ 79 | App.Vector(clamp(v[0]), clamp(v[1]), zpos) for v in verts2d 80 | ] # Clamp to avoid huge dimensions... 81 | self.Mesh.addFacet(vertices[0], vertices[1], vertices[2]) 82 | self.Mesh.addFacet(vertices[0], vertices[2], vertices[3]) 83 | 84 | self.ViewObject = SimpleNamespace() 85 | self.ViewObject.Visibility = True 86 | self.ViewObject.ShapeColor = color 87 | self.ViewObject.Transparency = 0.0 88 | 89 | self.Proxy = SimpleNamespace() 90 | self.Proxy.RENDERING_TYPE = RenderingTypes.OBJECT 91 | 92 | # pylint: disable=invalid-name 93 | @staticmethod 94 | def isDerivedFrom(classname): 95 | """Mimic a Mesh::Feature.""" 96 | return classname == "Mesh::Feature" 97 | -------------------------------------------------------------------------------- /Render/plugins/README.md: -------------------------------------------------------------------------------- 1 | # Plugins 2 | 3 | ## What are Plugins in Render WB? 4 | Render Plugins are a convenient way of adding extra functionalities to Render 5 | WB that would require dependencies present neither in the FreeCAD package nor 6 | in system-level modules. 7 | 8 | Practically speaking, plugins are **small programs** written in Python that can 9 | be run as **separate subprocesses in a dedicated Python virtual environment** 10 | (fork/exec), while being **embedded in FreeCAD Gui** providing some 11 | (minimalistic) ability to interact with Render. Render workbench provides 12 | plugins a dedicated virtual environment 13 | (https://docs.python.org/3/library/venv.html) where various additional packages 14 | can be installed from PyPi, in addition to those accessible at system-level. 15 | Examples of installed packages include Qt addons (QWebEngine), MaterialX... but 16 | are not restricted to and can be extended. 17 | 18 | The major benefit of that virtual environment is that, being hosted in the user 19 | directory, it allows new dependencies to be installed and updated _without 20 | elevation of rights_, and thus in a way that is totally transparent to the 21 | user. 22 | 23 | At the moment, plugins are designed as a single-window Qt-based application, 24 | with a central widget. The customizable part of the plugin is the central 25 | widget. In the future, this could be extended to headless applications, 26 | GTK-based apps etc. (but there is no plan for that in the short term). 27 | 28 | ## How do Plugins work? 29 | Plugins are run by `subcontainer.py`. They are launched as subprocesses and are 30 | provided a framework containing a set of features to interact with Render & 31 | FreeCAD. The framework is hosted in the virtual environment, so that it can 32 | simply be imported in the plugin, like any Python module. 33 | 34 | The framework takes care of: 35 | * keeping the virtual environment available and up-to-date 36 | * embedding plugin's main window into FreeCAD Gui 37 | * establishing the means for Plugin / Render communication. 38 | 39 | Plugins can interact with Render / FreeCAD in two ways: 40 | * stdout, which is piped to FreeCAD console (log level). 41 | * a bidirectional socket, based on localhost or named pipes, according to OS. 42 | Both ways are provided by framework. 43 | 44 | The socket enables the transmission of multiple types of information: 45 | - application messages 46 | - user messages (log, warn, error...) 47 | - serialized objects 48 | in both directions: Workbench -> Plugin and Plugin -> Workbench. 49 | 50 | ## How to write a Plugin? 51 | Plugin side: 52 | Create a directory in `Render/plugins` folder and, in this directory, provide a 53 | `__main__.py` 54 | In this file: 55 | * import `renderplugin` 56 | * create a widget class corresponding to your target application - here comes all the customization 57 | * instantiate `renderplugin.RenderPluginApplication`, passing it your widget class and your parameters 58 | * call the `exec` method of the above instance 59 | 60 | Workbench side: 61 | * In `subcontainer.py`, add a `start_xxx` method based on an existing one. 62 | * In `virtualenv.py`, add any additional required modules in "Step 5". 63 | 64 | ## License 65 | Please note that plugins, as separate programs, can be licensed under different 66 | terms that The Render Workbench. Please refer to license information placed 67 | into plugin directory and license notices inserted into source file for more 68 | information. 69 | -------------------------------------------------------------------------------- /Render/plugins/console/__main__.py: -------------------------------------------------------------------------------- 1 | # *************************************************************************** 2 | # * * 3 | # * Copyright (c) 2024 Howetuft * 4 | # * * 5 | # * This program is free software; you can redistribute it and/or modify * 6 | # * it under the terms of the GNU Lesser General Public License (LGPL) * 7 | # * as published by the Free Software Foundation; either version 2.1 of * 8 | # * the License, or (at your option) any later version. * 9 | # * for detail see the LICENCE text file. * 10 | # * * 11 | # * This program is distributed in the hope that it will be useful, * 12 | # * but WITHOUT ANY WARRANTY; without even the implied warranty of * 13 | # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 14 | # * GNU Library General Public License for more details. * 15 | # * * 16 | # * You should have received a copy of the GNU Library General Public * 17 | # * License along with this program; if not, write to the Free Software * 18 | # * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * 19 | # * USA * 20 | # * * 21 | # *************************************************************************** 22 | 23 | """This module implements an embedded console (debugging purpose).""" 24 | 25 | import sys 26 | import argparse 27 | 28 | from qtpy.QtWidgets import QWidget, QVBoxLayout 29 | from qtpy.QtCore import QProcess 30 | 31 | from renderplugin import RenderPluginApplication, ARGS 32 | 33 | 34 | class Terminal(QWidget): 35 | """Terminal widget, the central widget for embedded console.""" 36 | 37 | def __init__(self, terminal): 38 | super().__init__() 39 | self.process = QProcess(self) 40 | self.terminal = QWidget(self) 41 | layout = QVBoxLayout(self) 42 | layout.addWidget(self.terminal) 43 | wid = str(int(self.terminal.winId())) 44 | if terminal == "uxrvt": 45 | options = ["-embed", wid] 46 | elif terminal == "xterm": 47 | options = ["-into", wid] 48 | else: 49 | options = ["-embed", wid] 50 | self.process.start(terminal, options) 51 | 52 | def closeEvent(self, event): 53 | self.process.terminate() 54 | self.process.waitForFinished(1000) 55 | 56 | 57 | def main(): 58 | """Entry point.""" 59 | # Get arguments 60 | parser = argparse.ArgumentParser( 61 | prog="Render help", 62 | description="Open a terminal emulator", 63 | ) 64 | parser.add_argument( 65 | "--term", 66 | help="the terminal emulator to open", 67 | type=str, 68 | ) 69 | args = parser.parse_args(ARGS) 70 | application = RenderPluginApplication(Terminal, args.term) 71 | sys.exit(application.exec()) 72 | 73 | 74 | if __name__ == "__main__": 75 | main() 76 | -------------------------------------------------------------------------------- /Render/plugins/help/3rdparty/waterdark.css: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | body { 3 | font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; 4 | line-height: 1.4; 5 | max-width: 800px; 6 | margin: 20px auto; 7 | padding: 0 10px; 8 | color: #dbdbdb; 9 | background: #202b38; 10 | text-rendering: optimizeLegibility; 11 | } 12 | 13 | button, input, textarea { 14 | transition: background-color 0.1s linear, border-color 0.1s linear, color 0.1s linear, box-shadow 0.1s linear, transform 0.1s ease; 15 | } 16 | 17 | h1 { 18 | font-size: 2.2em; 19 | margin-top: 0; 20 | } 21 | 22 | h1, 23 | h2, 24 | h3, 25 | h4, 26 | h5, 27 | h6 { 28 | margin-bottom: 12px; 29 | } 30 | 31 | h1, 32 | h2, 33 | h3, 34 | h4, 35 | h5, 36 | h6, 37 | strong { 38 | color: #ffffff; 39 | } 40 | 41 | h1, 42 | h2, 43 | h3, 44 | h4, 45 | h5, 46 | h6, 47 | b, 48 | strong, 49 | th { 50 | font-weight: 600; 51 | } 52 | 53 | blockquote { 54 | border-left: 4px solid #0096bfab; 55 | margin: 1.5em 0em; 56 | padding: 0.5em 1em; 57 | font-style: italic; 58 | } 59 | 60 | blockquote > footer { 61 | margin-top: 10px; 62 | font-style: normal; 63 | } 64 | 65 | blockquote cite { 66 | font-style: normal; 67 | } 68 | 69 | address { 70 | font-style: normal; 71 | } 72 | 73 | a[href^='mailto']::before { 74 | content: '📧 '; 75 | } 76 | 77 | a[href^='tel']::before { 78 | content: '📞 '; 79 | } 80 | 81 | a[href^='sms']::before { 82 | content: '💬 '; 83 | } 84 | 85 | button, 86 | input[type='submit'], 87 | input[type='button'], 88 | input[type='checkbox'] { 89 | cursor: pointer; 90 | } 91 | 92 | input:not([type='checkbox']):not([type='radio']), 93 | select { 94 | display: block; 95 | } 96 | 97 | input, select, button, textarea { 98 | color: #ffffff; 99 | background-color: #161f27; 100 | font-family: inherit; 101 | font-size: inherit; 102 | margin-right: 6px; 103 | margin-bottom: 6px; 104 | padding: 10px; 105 | border: none; 106 | border-radius: 6px; 107 | outline: none; 108 | } 109 | 110 | input:not([type='checkbox']):not([type='radio']), 111 | select, button, textarea { 112 | -webkit-appearance: none; 113 | } 114 | 115 | textarea { 116 | margin-right: 0; 117 | width: 100%; 118 | box-sizing: border-box; 119 | resize: vertical; 120 | } 121 | 122 | button, input[type='submit'], input[type='button'] { 123 | padding-right: 30px; 124 | padding-left: 30px; 125 | } 126 | 127 | button:hover, 128 | input[type='submit']:hover, 129 | input[type='button']:hover { 130 | background: #324759; 131 | } 132 | 133 | input:focus, 134 | select:focus, 135 | button:focus, 136 | textarea:focus { 137 | box-shadow: 0 0 0 2px #0096bfab; 138 | } 139 | 140 | input[type='checkbox']:active, 141 | input[type='radio']:active, 142 | input[type='submit']:active, 143 | input[type='button']:active, 144 | button:active { 145 | transform: translateY(2px); 146 | } 147 | 148 | input:disabled, 149 | select:disabled, 150 | button:disabled, 151 | textarea:disabled { 152 | cursor: not-allowed; 153 | opacity: .5; 154 | } 155 | 156 | ::-webkit-input-placeholder { 157 | color: #a9a9a9; 158 | } 159 | 160 | :-ms-input-placeholder { 161 | color: #a9a9a9; 162 | } 163 | 164 | ::-ms-input-placeholder { 165 | color: #a9a9a9; 166 | } 167 | 168 | ::placeholder { 169 | color: #a9a9a9; 170 | } 171 | 172 | a { 173 | text-decoration: none; 174 | color: #41adff; 175 | } 176 | 177 | a:hover { 178 | text-decoration: underline; 179 | } 180 | 181 | code, kbd { 182 | background: #161f27; 183 | color: #ffbe85; 184 | padding: 5px; 185 | border-radius: 6px; 186 | } 187 | 188 | pre > code { 189 | padding: 10px; 190 | display: block; 191 | overflow-x: auto; 192 | } 193 | 194 | img { 195 | max-width: 100%; 196 | } 197 | 198 | hr { 199 | border: none; 200 | border-top: 1px solid #dbdbdb; 201 | } 202 | 203 | table { 204 | border-collapse: collapse; 205 | margin-bottom: 10px; 206 | width: 100%; 207 | } 208 | 209 | td, th { 210 | padding: 6px; 211 | text-align: left; 212 | } 213 | 214 | th { 215 | border-bottom: 1px solid #dbdbdb; 216 | } 217 | 218 | tbody tr:nth-child(even) { 219 | background-color: #161f27; 220 | } 221 | 222 | ::-webkit-scrollbar { 223 | height: 10px; 224 | width: 10px; 225 | } 226 | 227 | ::-webkit-scrollbar-track { 228 | background: #161f27; 229 | border-radius: 6px; 230 | } 231 | 232 | ::-webkit-scrollbar-thumb { 233 | background: #324759; 234 | border-radius: 6px; 235 | } 236 | 237 | ::-webkit-scrollbar-thumb:hover { 238 | background: #415c73; 239 | } 240 | 241 | /*# sourceMappingURL=dark.css.map */ 242 | -------------------------------------------------------------------------------- /Render/plugins/help/3rdparty/waterlight.css: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | body { 3 | font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; 4 | line-height: 1.4; 5 | max-width: 800px; 6 | margin: 20px auto; 7 | padding: 0 10px; 8 | color: #363636; 9 | background: #ffffff; 10 | text-rendering: optimizeLegibility; 11 | } 12 | 13 | button, input, textarea { 14 | transition: background-color 0.1s linear, border-color 0.1s linear, color 0.1s linear, box-shadow 0.1s linear, transform 0.1s ease; 15 | } 16 | 17 | h1 { 18 | font-size: 2.2em; 19 | margin-top: 0; 20 | } 21 | 22 | h1, 23 | h2, 24 | h3, 25 | h4, 26 | h5, 27 | h6 { 28 | margin-bottom: 12px; 29 | } 30 | 31 | h1, 32 | h2, 33 | h3, 34 | h4, 35 | h5, 36 | h6, 37 | strong { 38 | color: #000000; 39 | } 40 | 41 | h1, 42 | h2, 43 | h3, 44 | h4, 45 | h5, 46 | h6, 47 | b, 48 | strong, 49 | th { 50 | font-weight: 600; 51 | } 52 | 53 | blockquote { 54 | border-left: 4px solid #0096bfab; 55 | margin: 1.5em 0em; 56 | padding: 0.5em 1em; 57 | font-style: italic; 58 | } 59 | 60 | blockquote > footer { 61 | margin-top: 10px; 62 | font-style: normal; 63 | } 64 | 65 | blockquote cite { 66 | font-style: normal; 67 | } 68 | 69 | address { 70 | font-style: normal; 71 | } 72 | 73 | a[href^='mailto']::before { 74 | content: '📧 '; 75 | } 76 | 77 | a[href^='tel']::before { 78 | content: '📞 '; 79 | } 80 | 81 | a[href^='sms']::before { 82 | content: '💬 '; 83 | } 84 | 85 | button, 86 | input[type='submit'], 87 | input[type='button'], 88 | input[type='checkbox'] { 89 | cursor: pointer; 90 | } 91 | 92 | input:not([type='checkbox']):not([type='radio']), 93 | select { 94 | display: block; 95 | } 96 | 97 | input, select, button, textarea { 98 | color: #000000; 99 | background-color: #efefef; 100 | font-family: inherit; 101 | font-size: inherit; 102 | margin-right: 6px; 103 | margin-bottom: 6px; 104 | padding: 10px; 105 | border: none; 106 | border-radius: 6px; 107 | outline: none; 108 | } 109 | 110 | input:not([type='checkbox']):not([type='radio']), 111 | select, button, textarea { 112 | -webkit-appearance: none; 113 | } 114 | 115 | textarea { 116 | margin-right: 0; 117 | width: 100%; 118 | box-sizing: border-box; 119 | resize: vertical; 120 | } 121 | 122 | button, input[type='submit'], input[type='button'] { 123 | padding-right: 30px; 124 | padding-left: 30px; 125 | } 126 | 127 | button:hover, 128 | input[type='submit']:hover, 129 | input[type='button']:hover { 130 | background: #dddddd; 131 | } 132 | 133 | input:focus, 134 | select:focus, 135 | button:focus, 136 | textarea:focus { 137 | box-shadow: 0 0 0 2px #0096bfab; 138 | } 139 | 140 | input[type='checkbox']:active, 141 | input[type='radio']:active, 142 | input[type='submit']:active, 143 | input[type='button']:active, 144 | button:active { 145 | transform: translateY(2px); 146 | } 147 | 148 | input:disabled, 149 | select:disabled, 150 | button:disabled, 151 | textarea:disabled { 152 | cursor: not-allowed; 153 | opacity: .5; 154 | } 155 | 156 | ::-webkit-input-placeholder { 157 | color: #949494; 158 | } 159 | 160 | :-ms-input-placeholder { 161 | color: #949494; 162 | } 163 | 164 | ::-ms-input-placeholder { 165 | color: #949494; 166 | } 167 | 168 | ::placeholder { 169 | color: #949494; 170 | } 171 | 172 | a { 173 | text-decoration: none; 174 | color: #0076d1; 175 | } 176 | 177 | a:hover { 178 | text-decoration: underline; 179 | } 180 | 181 | code, kbd { 182 | background: #efefef; 183 | color: #000000; 184 | padding: 5px; 185 | border-radius: 6px; 186 | } 187 | 188 | pre > code { 189 | padding: 10px; 190 | display: block; 191 | overflow-x: auto; 192 | } 193 | 194 | img { 195 | max-width: 100%; 196 | } 197 | 198 | hr { 199 | border: none; 200 | border-top: 1px solid #dbdbdb; 201 | } 202 | 203 | table { 204 | border-collapse: collapse; 205 | margin-bottom: 10px; 206 | width: 100%; 207 | } 208 | 209 | td, th { 210 | padding: 6px; 211 | text-align: left; 212 | } 213 | 214 | th { 215 | border-bottom: 1px solid #dbdbdb; 216 | } 217 | 218 | tbody tr:nth-child(even) { 219 | background-color: #efefef; 220 | } 221 | 222 | ::-webkit-scrollbar { 223 | height: 10px; 224 | width: 10px; 225 | } 226 | 227 | ::-webkit-scrollbar-track { 228 | background: #efefef; 229 | border-radius: 6px; 230 | } 231 | 232 | ::-webkit-scrollbar-thumb { 233 | background: #d5d5d5; 234 | border-radius: 6px; 235 | } 236 | 237 | ::-webkit-scrollbar-thumb:hover { 238 | background: #c4c4c4; 239 | } 240 | 241 | /*# sourceMappingURL=light.css.map */ 242 | -------------------------------------------------------------------------------- /Render/plugins/help/COPYING.txt: -------------------------------------------------------------------------------- 1 | Help plugin is licensed under the terms of GNU General Public License, version 3 or any later (at your option). 2 | -------------------------------------------------------------------------------- /Render/plugins/help/README.md: -------------------------------------------------------------------------------- 1 | # Help plugin 2 | 3 | Help plugin shows help on FreeCAD features. 4 | 5 | This plugin is designed as an independant program that can be launched 6 | separately from Render. The usual way to use it, however, is to run it from 7 | Render virtual environment and embed it into FreeCAD Gui, via subcontainer.py. 8 | 9 | The applet is based on broader dependencies than those provided by FreeCAD (for 10 | instance, QWebEngine*). These dependencies are provided by Render virtual 11 | environment. 12 | 13 | # License 14 | Help plugin is licensed under the terms of **GNU General Public License version 3** 15 | or any later, at your option. 16 | 17 | A special effort has been made and will be continued to ensure that this plugin 18 | and the workbench are not considered as a single combined program. 19 | ( https://www.gnu.org/licenses/gpl-faq.en.html#GPLPlugins) 20 | 21 | In particular: 22 | - The plugin is launched by the workbench via fork and exec. No linking occurs 23 | between plugin and workbench - neither dynamic nor static. No shared memory 24 | is used. 25 | - No back and forth complex data structures shipping occurs, as no object is 26 | exchanged between workbench and plugin. 27 | -------------------------------------------------------------------------------- /Render/plugins/materialx/COPYING.txt: -------------------------------------------------------------------------------- 1 | Materialx plugin is licensed under the terms of GNU General Public License, 2 | version 3 or any later (at your option). 3 | -------------------------------------------------------------------------------- /Render/plugins/materialx/README.md: -------------------------------------------------------------------------------- 1 | # MaterialX plugin 2 | 3 | MaterialX plugin allows to import Physically Based Rendering materials in 4 | MaterialX format into Render projects. 5 | 6 | The plugin is able to get MaterialX files from various sources: websites, local 7 | directories etc. and transform them into FCMat files, ready to be imported. 8 | It can also trigger the import via minimalistic interprocess communication. 9 | 10 | The plugin is based on broader dependencies than those provided by FreeCAD (for 11 | instance, QWebEngine*). These dependencies are provided by a Python virtual 12 | environment. 13 | 14 | # License 15 | MaterialX plugin is licensed under the terms of **GNU General Public License version 3** 16 | or any later, at your option. 17 | 18 | A special effort has been made and will be continued to ensure that this plugin 19 | and the workbench are not considered as a single combined program. 20 | ( https://www.gnu.org/licenses/gpl-faq.en.html#GPLPlugins) 21 | 22 | In particular: 23 | - The plugin is launched by the workbench via fork and exec. No linking occurs 24 | between plugin and workbench - neither dynamic nor static. No shared memory 25 | is used. 26 | - No back and forth complex data structures shipping occurs, as no object is 27 | sent from workbench to plugin. Exchanges between plugin and workbench are 28 | limited to the providing of a file in FCMat format by the plugin, to be 29 | imported by the workbench via FreeCAD's standard API. 30 | -------------------------------------------------------------------------------- /Render/plugins/materialx/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreeCAD/FreeCAD-render/5e33146bcf18166846cd88ec3fc28cc97df4f8bb/Render/plugins/materialx/__init__.py -------------------------------------------------------------------------------- /Render/plugins/materialx/downloader/__init__.py: -------------------------------------------------------------------------------- 1 | # *************************************************************************** 2 | # * * 3 | # * Copyright (c) 2024 Howetuft * 4 | # * * 5 | # * This program is free software: you can redistribute it and/or modify * 6 | # * it under the terms of the GNU General Public License as published by * 7 | # * the Free Software Foundation, either version 3 of the License, or * 8 | # * (at your option) any later version. * 9 | # * * 10 | # * This program is distributed in the hope that it will be useful, * 11 | # * but WITHOUT ANY WARRANTY; without even the implied warranty of * 12 | # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * 13 | # * See the GNU General Public License for more details. * 14 | # * * 15 | # * You should have received a copy of the GNU General Public License * 16 | # * along with this program. If not, see . * 17 | # * * 18 | # *************************************************************************** 19 | 20 | """This module implements a downloader for MaterialX and HDRI in Render.""" 21 | 22 | from .materialx_downloader import MaterialXDownloadWindow, HdriDownloadWindow 23 | -------------------------------------------------------------------------------- /Render/plugins/materialx/importer/__init__.py: -------------------------------------------------------------------------------- 1 | # *************************************************************************** 2 | # * * 3 | # * Copyright (c) 2024 Howetuft * 4 | # * * 5 | # * This program is free software: you can redistribute it and/or modify * 6 | # * it under the terms of the GNU General Public License as published by * 7 | # * the Free Software Foundation, either version 3 of the License, or * 8 | # * (at your option) any later version. * 9 | # * * 10 | # * This program is distributed in the hope that it will be useful, * 11 | # * but WITHOUT ANY WARRANTY; without even the implied warranty of * 12 | # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * 13 | # * See the GNU General Public License for more details. * 14 | # * * 15 | # * You should have received a copy of the GNU General Public License * 16 | # * along with this program. If not, see . * 17 | # * * 18 | # *************************************************************************** 19 | 20 | """This module implements an importer from MaterialX to FreeCAD.""" 21 | 22 | from .materialx_importer import MaterialXImporter 23 | -------------------------------------------------------------------------------- /Render/plugins/materialx/importer/converter/render_libraries/displacement_to_render_disp.mtlx: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /Render/plugins/materialx/importer/converter/render_libraries/render_disp.mtlx: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /Render/plugins/materialx/importer/materialx_importer.py: -------------------------------------------------------------------------------- 1 | # *************************************************************************** 2 | # * * 3 | # * Copyright (c) 2024 Howetuft * 4 | # * * 5 | # * This program is free software: you can redistribute it and/or modify * 6 | # * it under the terms of the GNU General Public License as published by * 7 | # * the Free Software Foundation, either version 3 of the License, or * 8 | # * (at your option) any later version. * 9 | # * * 10 | # * This program is distributed in the hope that it will be useful, * 11 | # * but WITHOUT ANY WARRANTY; without even the implied warranty of * 12 | # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * 13 | # * See the GNU General Public License for more details. * 14 | # * * 15 | # * You should have received a copy of the GNU General Public License * 16 | # * along with this program. If not, see . * 17 | # * * 18 | # *************************************************************************** 19 | 20 | """This module provides features to import MaterialX materials in Render WB.""" 21 | 22 | import os 23 | import threading 24 | from typing import Callable 25 | import subprocess 26 | import json 27 | import sys 28 | 29 | from renderplugin import log, msg, warn, error, SERVERNAME 30 | 31 | 32 | class MaterialXImporter: 33 | """A class to import a MaterialX material into a FCMat file.""" 34 | 35 | def __init__( 36 | self, 37 | filename: str, 38 | progress_hook: Callable[[int, int], None] = None, 39 | disp2bump: bool = False, 40 | polyhaven_size: float = None, 41 | ): 42 | """Initialize importer. 43 | 44 | Args: 45 | filename -- the name of the file to import 46 | progress_hook -- a hook to call to report progress (current, max) 47 | disp2bump -- a flag to set bump with displacement 48 | polyhaven_size -- the size of the textures, from polyhaven.com 49 | """ 50 | self._filename = filename 51 | self._baker_ready = threading.Event() 52 | self._request_halt = threading.Event() 53 | self._progress_hook = progress_hook 54 | self._disp2bump = disp2bump 55 | self._polyhaven_size = polyhaven_size 56 | self._proc = None 57 | 58 | def run(self, working_dir): 59 | """Import a MaterialX archive as Render material.""" 60 | executable = sys.executable 61 | script = os.path.join( 62 | os.path.dirname(__file__), "converter", "materialx_converter.py" 63 | ) 64 | 65 | msg("STARTING MATERIALX IMPORT") 66 | 67 | # Prepare converter call 68 | args = [executable, "-u", script, self._filename, working_dir] 69 | if self._polyhaven_size: 70 | args += ["--polyhaven-size", str(self._polyhaven_size)] 71 | if self._disp2bump: 72 | args += ["--disp2bump"] 73 | args += ["--hostpipe", SERVERNAME] 74 | log(" ".join(args)) 75 | 76 | # Run converter 77 | with subprocess.Popen( 78 | args, 79 | stdout=subprocess.PIPE, 80 | stderr=subprocess.STDOUT, 81 | bufsize=0, # Unbuffered 82 | universal_newlines=True, 83 | ) as proc: 84 | self._proc = proc 85 | for line in proc.stdout: 86 | try: 87 | decode = json.loads(line) 88 | except json.JSONDecodeError: 89 | # Undecodable: write as-is 90 | for subline in line.splitlines(): 91 | msg(subline) 92 | else: 93 | # Report progress 94 | if self._progress_hook: 95 | self._progress_hook(decode["value"], decode["maximum"]) 96 | 97 | # Check result 98 | if (returncode := proc.returncode) != 0: 99 | if returncode == 255: 100 | warn("IMPORT - INTERRUPTED") 101 | else: 102 | error(f"IMPORT - ABORTED ({returncode})") 103 | return returncode 104 | 105 | return 0 106 | 107 | def cancel(self): 108 | """Request process to halt. 109 | 110 | This command is designed to be executed in another thread than run. 111 | """ 112 | if self._proc: 113 | self._proc.terminate() 114 | -------------------------------------------------------------------------------- /Render/plugins/materialx/polyhaven/__init__.py: -------------------------------------------------------------------------------- 1 | # *************************************************************************** 2 | # * * 3 | # * Copyright (c) 2024 Howetuft * 4 | # * * 5 | # * This program is free software: you can redistribute it and/or modify * 6 | # * it under the terms of the GNU General Public License as published by * 7 | # * the Free Software Foundation, either version 3 of the License, or * 8 | # * (at your option) any later version. * 9 | # * * 10 | # * This program is distributed in the hope that it will be useful, * 11 | # * but WITHOUT ANY WARRANTY; without even the implied warranty of * 12 | # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * 13 | # * See the GNU General Public License for more details. * 14 | # * * 15 | # * You should have received a copy of the GNU General Public License * 16 | # * along with this program. If not, see . * 17 | # * * 18 | # *************************************************************************** 19 | 20 | 21 | """This module implements a hook for polyhaven materials in gpuopen. 22 | 23 | For polyhaven materials (polyhaven.com), texture size is usually wrong on 24 | gpuopen web site. This hook fetches the right dimension from original 25 | site. 26 | """ 27 | 28 | from .materialx_polyhaven import polyhaven_getsize 29 | -------------------------------------------------------------------------------- /Render/renderers/__init__.py: -------------------------------------------------------------------------------- 1 | """Renderers plugins module.""" 2 | -------------------------------------------------------------------------------- /Render/renderers/as_shaders/README.md: -------------------------------------------------------------------------------- 1 | # OSL Shaders directory 2 | 3 | This directory contains OSL shaders that are useful/necessary for the Appleseed plugin. 4 | The shaders were essentially copied from the Appleseed application, in compiled (oso) format. 5 | Exception: 6 | The PyLa shader was obtained from http://vadrouillegraphique.blogspot.com/2013/05/pyla-physically-correct-layer-shader.html, in osl format, and compiled here (thanks to `oslc` compiler, see [here](https://github.com/AcademySoftwareFoundation/OpenShadingLanguage)). 7 | -------------------------------------------------------------------------------- /Render/renderers/as_shaders/as_closure2surface.oso: -------------------------------------------------------------------------------- 1 | OpenShadingLanguage 1.00 2 | # Compiled by oslc 1.11.14 3 | # options: -O2 -DNDEBUG -I/var/cache/private/pikaur/build/appleseed-git/src/appleseed-git/sandbox/shaders/ -I/var/cache/private/pikaur/build/appleseed-git/src/appleseed-git/src/appleseed.shaders/include -o /var/cache/private/pikaur/build/appleseed-git/src/appleseed-git/sandbox/shaders/appleseed/as_closure2surface.oso 4 | surface as_closure2surface %meta{string,as_node_name,"asClosure2Surface"} %meta{string,as_category,"surface"} 5 | param closure color in_input %meta{string,label,"Input"} %read{0,0} %write{2147483647,-1} 6 | global closure color Ci %read{2147483647,-1} %write{0,0} 7 | code ___main___ 8 | # /var/cache/private/pikaur/build/appleseed-git/src/appleseed-git/src/appleseed.shaders/src/appleseed/as_closure2surface.osl:41 9 | # Ci = in_input; 10 | assign Ci in_input %filename{"/var/cache/private/pikaur/build/appleseed-git/src/appleseed-git/src/appleseed.shaders/src/appleseed/as_closure2surface.osl"} %line{41} %argrw{"wr"} 11 | end 12 | -------------------------------------------------------------------------------- /Render/renderers/as_shaders/as_double_shade.oso: -------------------------------------------------------------------------------- 1 | OpenShadingLanguage 1.00 2 | # Compiled by oslc 1.11.14 3 | # options: -O2 -DNDEBUG -I/var/cache/private/pikaur/build/appleseed-git/src/appleseed-git/sandbox/shaders/ -I/var/cache/private/pikaur/build/appleseed-git/src/appleseed-git/src/appleseed.shaders/include -o /var/cache/private/pikaur/build/appleseed-git/src/appleseed-git/sandbox/shaders/appleseed/as_double_shade.oso 4 | shader as_double_shade %meta{string,help,"Shades a different color on front or back faces."} %meta{string,icon,"asDoubleShade.png"} %meta{string,URL,"https://appleseed.readthedocs.io/projects/appleseed-maya/en/latest/shaders/utilities/as_double_shade.html"} %meta{string,as_node_name,"asDoubleShade"} %meta{string,as_category,"utility"} %meta{string,as_max_class_id,"2002473132 6900182"} %meta{string,as_max_plugin_type,"texture"} %meta{int,as_maya_type_id,1210843} %meta{string,as_maya_classification,"drawdb/shader:rendernode/appleseed/utility"} 5 | param color in_color 1 1 1 %meta{string,as_maya_attribute_name,"color"} %meta{string,as_maya_attribute_short_name,"c"} %meta{string,label,"Front Color"} %meta{string,page,"Color"} %read{3,3} %write{2147483647,-1} 6 | param color in_color2 0 0 0 %meta{string,as_maya_attribute_name,"color2"} %meta{string,as_maya_attribute_short_name,"c2"} %meta{string,label,"Back Color"} %meta{string,page,"Color"} %read{2,2} %write{2147483647,-1} 7 | oparam color out_color 0 0 0 %meta{string,as_maya_attribute_name,"outColor"} %meta{string,as_maya_attribute_short_name,"oc"} %meta{string,label,"Output Color"} %read{2147483647,-1} %write{2,3} 8 | temp int $tmp1 %read{1,1} %write{0,0} 9 | code ___main___ 10 | # /var/cache/private/pikaur/build/appleseed-git/src/appleseed-git/src/appleseed.shaders/src/appleseed/as_double_shade.osl:68 11 | # out_color = backfacing() ? in_color2 : in_color; 12 | backfacing $tmp1 %filename{"/var/cache/private/pikaur/build/appleseed-git/src/appleseed-git/src/appleseed.shaders/src/appleseed/as_double_shade.osl"} %line{68} %argrw{"w"} 13 | if $tmp1 3 4 %argrw{"r"} 14 | assign out_color in_color2 %argrw{"wr"} 15 | assign out_color in_color %argrw{"wr"} 16 | end 17 | -------------------------------------------------------------------------------- /Render/renderers/as_shaders/as_matte.oso: -------------------------------------------------------------------------------- 1 | OpenShadingLanguage 1.00 2 | # Compiled by oslc 1.11.14 3 | # options: -O2 -DNDEBUG -I/var/cache/private/pikaur/build/appleseed-git/src/appleseed-git/sandbox/shaders/ -I/var/cache/private/pikaur/build/appleseed-git/src/appleseed-git/src/appleseed.shaders/include -o /var/cache/private/pikaur/build/appleseed-git/src/appleseed-git/sandbox/shaders/appleseed/as_matte.oso 4 | shader as_matte %meta{string,help,"Matte Material"} %meta{string,icon,"asMatte.png"} %meta{string,URL,"https://appleseed.readthedocs.io/projects/appleseed-maya/en/latest/shaders/material/as_matte_surface.html"} %meta{string,as_node_name,"asMatte"} %meta{string,as_category,"shader"} %meta{string,as_max_class_id,"1941913893 1167117385"} %meta{string,as_max_plugin_type,"material"} %meta{int,as_maya_type_id,1210862} %meta{string,as_maya_classification,"drawdb/shader/surface:rendernode/appleseed/surface:shader/surface:swatch/AppleseedMatte"} 5 | param closure color in_color %meta{string,as_maya_attribute_name,"color"} %meta{string,as_maya_attribute_short_name,"c"} %meta{string,label,"Surface Passthrough"} %meta{string,page,"Matte"} %read{9,9} %write{2147483647,-1} 6 | param int in_enable_matte 1 %meta{string,as_maya_attribute_name,"enableMatte"} %meta{string,as_maya_attribute_short_name,"ema"} %meta{string,widget,"checkBox"} %meta{string,label,"Enable Matte Opacity"} %meta{string,page,"Matte"} %meta{int,as_maya_attribute_connectable,0} %meta{int,as_maya_attribute_keyable,0} %meta{int,as_maya_attribute_hidden,1} %meta{int,as_blender_input_socket,0} %meta{int,gafferNoduleLayoutVisible,0} %meta{int,divider,1} %read{3,3} %write{2147483647,-1} 7 | param float in_matte_opacity 0 %meta{string,as_maya_attribute_name,"matteOpacity"} %meta{string,as_maya_attribute_short_name,"mao"} %meta{float,min,0} %meta{float,max,1} %meta{string,label,"Matte Opacity"} %meta{string,page,"Matte"} %meta{int,as_blender_input_socket,0} %meta{int,gafferNoduleLayoutVisible,0} %read{6,6} %write{2147483647,-1} 8 | param color in_matte_opacity_color 1 0.5 0 %meta{string,as_maya_attribute_name,"matteOpacityColor"} %meta{string,as_maya_attribute_short_name,"mac"} %meta{string,label,"Matte Opacity Color"} %meta{string,page,"Matte"} %meta{int,as_blender_input_socket,0} %meta{int,gafferNoduleLayoutVisible,0} %read{6,6} %write{2147483647,-1} 9 | oparam closure color out_outColor %meta{string,as_maya_attribute_name,"outColor"} %meta{string,as_maya_attribute_short_name,"oc"} %meta{string,widget,"null"} %read{2147483647,-1} %write{7,9} 10 | oparam closure color out_outMatteOpacity %meta{string,as_maya_attribute_name,"outMatteOpacity"} %meta{string,as_maya_attribute_short_name,"om"} %meta{string,label,"Matte Opacity"} %meta{string,widget,"null"} %read{7,7} %write{6,6} 11 | temp int $tmp1 %read{1,1} %write{0,0} 12 | const string $const1 "transparency" %read{0,0} %write{2147483647,-1} 13 | temp int $tmp2 %read{2,5} %write{1,4} 14 | const int $const2 0 %read{1,3} %write{2147483647,-1} 15 | temp int $tmp3 %read{4,4} %write{3,3} 16 | const string $const3 "as_matte" %read{6,6} %write{2147483647,-1} 17 | code ___main___ 18 | # /var/cache/private/pikaur/build/appleseed-git/src/appleseed-git/src/appleseed.shaders/src/appleseed/as_matte.osl:101 19 | # if (raytype("transparency") && in_enable_matte) 20 | raytype $tmp1 $const1 %filename{"/var/cache/private/pikaur/build/appleseed-git/src/appleseed-git/src/appleseed.shaders/src/appleseed/as_matte.osl"} %line{101} %argrw{"wr"} 21 | neq $tmp2 $tmp1 $const2 %argrw{"wrr"} 22 | if $tmp2 5 5 %argrw{"r"} 23 | neq $tmp3 in_enable_matte $const2 %argrw{"wrr"} 24 | assign $tmp2 $tmp3 %argrw{"wr"} 25 | if $tmp2 9 9 %argrw{"r"} 26 | # /var/cache/private/pikaur/build/appleseed-git/src/appleseed-git/src/appleseed.shaders/src/appleseed/as_matte.osl:103 27 | # out_outMatteOpacity = as_matte( 28 | closure out_outMatteOpacity $const3 in_matte_opacity_color in_matte_opacity %line{103} %argrw{"wrrr"} 29 | # /var/cache/private/pikaur/build/appleseed-git/src/appleseed-git/src/appleseed.shaders/src/appleseed/as_matte.osl:107 30 | # out_outColor = out_outMatteOpacity; 31 | assign out_outColor out_outMatteOpacity %line{107} %argrw{"wr"} 32 | # /var/cache/private/pikaur/build/appleseed-git/src/appleseed-git/src/appleseed.shaders/src/appleseed/as_matte.osl:108 33 | # return; 34 | exit %line{108} 35 | # /var/cache/private/pikaur/build/appleseed-git/src/appleseed-git/src/appleseed.shaders/src/appleseed/as_matte.osl:111 36 | # out_outColor = in_color; 37 | assign out_outColor in_color %line{111} %argrw{"wr"} 38 | end 39 | -------------------------------------------------------------------------------- /Render/renderers/as_shaders/as_texture2surface.oso: -------------------------------------------------------------------------------- 1 | OpenShadingLanguage 1.00 2 | # Compiled by oslc 1.11.14 3 | # options: -O2 -DNDEBUG -I/var/cache/private/pikaur/build/appleseed-git/src/appleseed-git/sandbox/shaders/ -I/var/cache/private/pikaur/build/appleseed-git/src/appleseed-git/src/appleseed.shaders/include -o /var/cache/private/pikaur/build/appleseed-git/src/appleseed-git/sandbox/shaders/appleseed/as_texture2surface.oso 4 | surface as_texture2surface 5 | param color in_color 1 1 1 %read{1,1} %write{2147483647,-1} 6 | param float in_scalar 1 %read{1,1} %write{2147483647,-1} 7 | global closure color Ci %read{2147483647,-1} %write{2,2} 8 | temp closure color $tmp1 %read{2,2} %write{0,0} 9 | const string $const1 "emission" %read{0,0} %write{2147483647,-1} 10 | temp color $tmp2 %read{2,2} %write{1,1} 11 | code ___main___ 12 | # /var/cache/private/pikaur/build/appleseed-git/src/appleseed-git/src/appleseed.shaders/src/appleseed/as_texture2surface.osl:35 13 | # Ci = in_color * in_scalar * emission(); 14 | closure $tmp1 $const1 %filename{"/var/cache/private/pikaur/build/appleseed-git/src/appleseed-git/src/appleseed.shaders/src/appleseed/as_texture2surface.osl"} %line{35} %argrw{"wr"} 15 | mul $tmp2 in_color in_scalar %argrw{"wrr"} 16 | mul Ci $tmp1 $tmp2 %argrw{"wrr"} 17 | end 18 | -------------------------------------------------------------------------------- /Render/renderers/as_shaders/fc_add_normal.osl: -------------------------------------------------------------------------------- 1 | //*************************************************************************** 2 | //* * 3 | //* Copyright (c) 2022 Howetuft * 4 | //* * 5 | //* This program is free software; you can redistribute it and/or modify * 6 | //* it under the terms of the GNU Lesser General Public License (LGPL) * 7 | //* as published by the Free Software Foundation; either version 2.1 of * 8 | //* the License, or (at your option) any later version. * 9 | //* for detail see the LICENCE text file. * 10 | //* * 11 | //* This program is distributed in the hope that it will be useful, * 12 | //* but WITHOUT ANY WARRANTY; without even the implied warranty of * 13 | //* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 14 | //* GNU Library General Public License for more details. * 15 | //* * 16 | //* You should have received a copy of the GNU Library General Public * 17 | //* License along with this program; if not, write to the Free Software * 18 | //* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * 19 | //* USA * 20 | //* * 21 | //*************************************************************************** 22 | 23 | // Additive osl shader for normals 24 | // 25 | // Input normals must be unsigned 26 | 27 | shader fc_add_normal( 28 | normal in_normal1 = N, 29 | normal in_normal2 = N, 30 | float in_factor = 0.5, 31 | output normal out_normal = N 32 | ) 33 | { 34 | out_normal = normal(in_factor) * in_normal1 + normal(1.0 - in_factor) * in_normal2; 35 | out_normal = normalize(out_normal); 36 | } 37 | -------------------------------------------------------------------------------- /Render/renderers/as_shaders/fc_add_normal.oso: -------------------------------------------------------------------------------- 1 | OpenShadingLanguage 1.00 2 | # Compiled by oslc 1.12.6.2 3 | # options: 4 | shader fc_add_normal 5 | param normal in_normal1 0 0 0 %read{4,4} %write{0,0} %initexpr 6 | param normal in_normal2 0 0 0 %read{7,7} %write{1,1} %initexpr 7 | param float in_factor 0.5 %read{3,5} %write{2147483647,-1} 8 | oparam normal out_normal 0 0 0 %read{9,9} %write{2,9} %initexpr 9 | global normal N %read{0,2} %write{2147483647,-1} 10 | temp normal $tmp1 %read{4,4} %write{3,3} 11 | temp normal $tmp2 %read{8,8} %write{4,4} 12 | temp normal $tmp3 %read{7,7} %write{6,6} 13 | const float $const1 1 %read{5,5} %write{2147483647,-1} 14 | temp float $tmp4 %read{6,6} %write{5,5} 15 | temp normal $tmp5 %read{8,8} %write{7,7} 16 | code in_normal1 17 | # fc_add_normal.osl:28 18 | # normal in_normal1 = N, 19 | assign in_normal1 N %filename{"fc_add_normal.osl"} %line{28} %argrw{"wr"} 20 | code in_normal2 21 | # fc_add_normal.osl:29 22 | # normal in_normal2 = N, 23 | assign in_normal2 N %filename{"fc_add_normal.osl"} %line{29} %argrw{"wr"} 24 | code out_normal 25 | # fc_add_normal.osl:31 26 | # output normal out_normal = N 27 | assign out_normal N %filename{"fc_add_normal.osl"} %line{31} %argrw{"wr"} 28 | code ___main___ 29 | # fc_add_normal.osl:34 30 | # out_normal = normal(in_factor) * in_normal1 + normal(1.0 - in_factor) * in_normal2; 31 | assign $tmp1 in_factor %filename{"fc_add_normal.osl"} %line{34} %argrw{"wr"} 32 | mul $tmp2 $tmp1 in_normal1 %argrw{"wrr"} 33 | sub $tmp4 $const1 in_factor %argrw{"wrr"} 34 | assign $tmp3 $tmp4 %argrw{"wr"} 35 | mul $tmp5 $tmp3 in_normal2 %argrw{"wrr"} 36 | add out_normal $tmp2 $tmp5 %argrw{"wrr"} 37 | # fc_add_normal.osl:35 38 | # out_normal = normalize(out_normal); 39 | normalize out_normal out_normal %line{35} %argrw{"wr"} 40 | end 41 | -------------------------------------------------------------------------------- /Render/renderers/as_shaders/fc_bump.osl: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * * 3 | * Copyright (c) 2022 Howetuft * 4 | * * 5 | * This program is free software; you can redistribute it and/or modify * 6 | * it under the terms of the GNU Lesser General Public License (LGPL) * 7 | * as published by the Free Software Foundation; either version 2.1 of * 8 | * the License, or (at your option) any later version. * 9 | * for detail see the LICENCE text file. * 10 | * * 11 | * This program is distributed in the hope that it will be useful, * 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 14 | * GNU Library General Public License for more details. * 15 | * * 16 | * You should have received a copy of the GNU Library General Public * 17 | * License along with this program; if not, write to the Free Software * 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * 19 | * USA * 20 | * * 21 | ***************************************************************************/ 22 | 23 | /* "Bump Mapping Unparameterized Surfaces on the GPU" 24 | * Morten S. Mikkelsen, 2010 */ 25 | 26 | shader fc_bump( 27 | float in_bump_value = 0.0, 28 | float in_bump_factor = 1.0, 29 | 30 | output normal out_normal = N 31 | ) 32 | { 33 | // Surface tangents 34 | vector dPdx = Dx(P); 35 | vector dPdy = Dy(P); 36 | vector Rx = cross(dPdy, N); 37 | vector Ry = cross(N, dPdx); 38 | 39 | // Surface determinant 40 | float det = dot(dPdx, Rx); 41 | 42 | // Surface gradient 43 | float dBx = Dx(in_bump_value); 44 | float dBy = Dy(in_bump_value); 45 | vector surfgrad = sign(det) * (dBx * Rx + dBy * Ry); 46 | 47 | out_normal = normalize(abs(det) * N - in_bump_factor * surfgrad); 48 | 49 | } 50 | -------------------------------------------------------------------------------- /Render/renderers/as_shaders/fc_bump.oso: -------------------------------------------------------------------------------- 1 | OpenShadingLanguage 1.00 2 | # Compiled by oslc 1.12.6.2 3 | # options: 4 | shader fc_bump 5 | param float in_bump_value 0 %read{9,10} %write{2147483647,-1} %derivs 6 | param float in_bump_factor 1 %read{18,18} %write{2147483647,-1} 7 | oparam normal out_normal 0 0 0 %read{2147483647,-1} %write{0,20} %initexpr 8 | global point P %read{1,2} %write{2147483647,-1} %derivs 9 | global normal N %read{0,17} %write{2147483647,-1} 10 | local vector dPdx %read{3,8} %write{1,1} 11 | local vector dPdy %read{4,6} %write{2,2} 12 | local vector Rx %read{8,12} %write{6,6} 13 | local vector Ry %read{13,13} %write{7,7} 14 | local float det %read{11,16} %write{8,8} 15 | local float dBx %read{12,12} %write{9,9} 16 | local float dBy %read{13,13} %write{10,10} 17 | local vector surfgrad %read{18,18} %write{15,15} 18 | const string $const1 "dPdx.N: %f, dPdx.dPdy: %f" %read{5,5} %write{2147483647,-1} 19 | temp float $tmp1 %read{5,5} %write{3,3} 20 | temp float $tmp2 %read{5,5} %write{4,4} 21 | temp float $tmp3 %read{15,15} %write{11,11} 22 | temp vector $tmp4 %read{14,14} %write{12,12} 23 | temp vector $tmp5 %read{14,14} %write{13,13} 24 | temp vector $tmp6 %read{15,15} %write{14,14} 25 | temp float $tmp7 %read{17,17} %write{16,16} 26 | temp normal $tmp8 %read{19,19} %write{17,17} 27 | temp vector $tmp9 %read{19,19} %write{18,18} 28 | temp normal $tmp10 %read{20,20} %write{19,19} 29 | code out_normal 30 | # fc_bump.osl:30 31 | # output normal out_normal = N 32 | assign out_normal N %filename{"fc_bump.osl"} %line{30} %argrw{"wr"} 33 | code ___main___ 34 | # fc_bump.osl:34 35 | # vector dPdx = Dx(P); 36 | Dx dPdx P %filename{"fc_bump.osl"} %line{34} %argrw{"wr"} %argderivs{1} 37 | # fc_bump.osl:35 38 | # vector dPdy = Dy(P); 39 | Dy dPdy P %line{35} %argrw{"wr"} %argderivs{1} 40 | # fc_bump.osl:36 41 | # printf("dPdx.N: %f, dPdx.dPdy: %f", dot(dPdx, N), dot(dPdx, dPdy)); 42 | dot $tmp1 dPdx N %line{36} %argrw{"wrr"} 43 | dot $tmp2 dPdx dPdy %argrw{"wrr"} 44 | printf $const1 $tmp1 $tmp2 %argrw{"rrr"} 45 | # fc_bump.osl:37 46 | # vector Rx = cross(dPdy, N); 47 | cross Rx dPdy N %line{37} %argrw{"wrr"} 48 | # fc_bump.osl:38 49 | # vector Ry = cross(N, dPdx); 50 | cross Ry N dPdx %line{38} %argrw{"wrr"} 51 | # fc_bump.osl:41 52 | # float det = dot(dPdx, Rx); 53 | dot det dPdx Rx %line{41} %argrw{"wrr"} 54 | # fc_bump.osl:44 55 | # float dBx = Dx(in_bump_value); 56 | Dx dBx in_bump_value %line{44} %argrw{"wr"} %argderivs{1} 57 | # fc_bump.osl:45 58 | # float dBy = Dy(in_bump_value); 59 | Dy dBy in_bump_value %line{45} %argrw{"wr"} %argderivs{1} 60 | # fc_bump.osl:46 61 | # vector surfgrad = sign(det) * (dBx * Rx + dBy * Ry); 62 | sign $tmp3 det %line{46} %argrw{"wr"} 63 | mul $tmp4 dBx Rx %argrw{"wrr"} 64 | mul $tmp5 dBy Ry %argrw{"wrr"} 65 | add $tmp6 $tmp4 $tmp5 %argrw{"wrr"} 66 | mul surfgrad $tmp3 $tmp6 %argrw{"wrr"} 67 | # fc_bump.osl:48 68 | # out_normal = normalize(abs(det) * N - in_bump_factor * surfgrad); 69 | abs $tmp7 det %line{48} %argrw{"wr"} 70 | mul $tmp8 $tmp7 N %argrw{"wrr"} 71 | mul $tmp9 in_bump_factor surfgrad %argrw{"wrr"} 72 | sub $tmp10 $tmp8 $tmp9 %argrw{"wrr"} 73 | normalize out_normal $tmp10 %argrw{"wr"} 74 | end 75 | -------------------------------------------------------------------------------- /Render/renderers/utils/misc.py: -------------------------------------------------------------------------------- 1 | # *************************************************************************** 2 | # * * 3 | # * Copyright (c) 2023 Howetuft * 4 | # * * 5 | # * This program is free software; you can redistribute it and/or modify * 6 | # * it under the terms of the GNU Lesser General Public License (LGPL) * 7 | # * as published by the Free Software Foundation; either version 2.1 of * 8 | # * the License, or (at your option) any later version. * 9 | # * for detail see the LICENCE text file. * 10 | # * * 11 | # * This program is distributed in the hope that it will be useful, * 12 | # * but WITHOUT ANY WARRANTY; without even the implied warranty of * 13 | # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 14 | # * GNU Library General Public License for more details. * 15 | # * * 16 | # * You should have received a copy of the GNU Library General Public * 17 | # * License along with this program; if not, write to the Free Software * 18 | # * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * 19 | # * USA * 20 | # * * 21 | # *************************************************************************** 22 | 23 | """Miscellaneous utilities for renderers.""" 24 | 25 | from math import radians, degrees, tan, atan 26 | 27 | 28 | def fovy_to_fovx(fovy, width, height): 29 | """Convert vertical field of view (fovy) to horizontal (fovx). 30 | 31 | This function is useful for renderers that expect horizontal field of view, 32 | like Luxcore, Appleseed and Povray. Indeed, FreeCAD camera fov is a 33 | vertical one... 34 | 35 | Args: 36 | fovy -- Vertical field of view, in degrees (float) 37 | width -- Width of frame (float) 38 | height -- Height of frame (float) 39 | 40 | Returns: 41 | Horizontal field of view, in degrees (float) 42 | """ 43 | assert width > 0 44 | assert height > 0 45 | aspect_ratio = width / height 46 | fovy = radians(fovy) 47 | fovx = 2 * atan(tan(fovy / 2) * aspect_ratio) 48 | fovx = degrees(fovx) 49 | return fovx 50 | -------------------------------------------------------------------------------- /Render/rendermesh_mp/README.md: -------------------------------------------------------------------------------- 1 | This directory contains multiprocessing scripts for rendermesh.py 2 | -------------------------------------------------------------------------------- /Render/resources/icons/Appleseed.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 19 | 21 | 41 | 43 | 44 | 46 | image/svg+xml 47 | 49 | 50 | 51 | 52 | 53 | 58 | 62 | 67 | 68 | 72 | 77 | 78 | 82 | 87 | 88 | 92 | 97 | 98 | 102 | 107 | 108 | 109 | 110 | -------------------------------------------------------------------------------- /Render/resources/icons/AreaLight.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | image/svg+xml 44 | 46 | 47 | 49 | 55 | 56 | 58 | 59 | 67 | 68 | 70 | 71 | 79 | 80 | 82 | 83 | 91 | 92 | 94 | 95 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 115 | 152 | 154 | 155 | 157 | 158 | 160 | 161 | 163 | 164 | 166 | 167 | 169 | 170 | 172 | 173 | 175 | 176 | 178 | 179 | 181 | 182 | 184 | 185 | 187 | 188 | 190 | 191 | 193 | 194 | 196 | 197 | 198 | -------------------------------------------------------------------------------- /Render/resources/icons/Cycles.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Render/resources/icons/DistantLight.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Created with Fabric.js 5.2.4 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /Render/resources/icons/Help.svg: -------------------------------------------------------------------------------- 1 | 2 | 15 | 17 | 36 | 42 | 50 | 57 | 63 | 64 | -------------------------------------------------------------------------------- /Render/resources/icons/Ospray.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 19 | 21 | 22 | 24 | image/svg+xml 25 | 27 | 28 | 29 | 30 | 32 | 39 | 40 | 59 | 64 | 68 | 72 | 73 | -------------------------------------------------------------------------------- /Render/resources/icons/Pbrt.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 19 | 21 | 40 | 43 | 44 | 46 | 47 | 49 | image/svg+xml 50 | 52 | 53 | 54 | 55 | 56 | 60 | 66 | Pbrt 78 | 79 | 80 | -------------------------------------------------------------------------------- /Render/resources/icons/PointLight.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | image/svg+xml 44 | 46 | 50 | 52 | 58 | 59 | 61 | 62 | 70 | 71 | 73 | 74 | 82 | 83 | 85 | 86 | 94 | 95 | 97 | 98 | 106 | 107 | 111 | 118 | 125 | 132 | 136 | 142 | 143 | 145 | 146 | 148 | 149 | 151 | 152 | 154 | 155 | 157 | 158 | 160 | 161 | 163 | 164 | 166 | 167 | 169 | 170 | 172 | 173 | 175 | 176 | 178 | 179 | 181 | 182 | 184 | 185 | 187 | 188 | 189 | -------------------------------------------------------------------------------- /Render/resources/icons/Render.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 20 | 22 | 25 | 29 | 33 | 34 | 37 | 41 | 45 | 46 | 55 | 66 | 67 | 86 | 88 | 89 | 91 | image/svg+xml 92 | 94 | 95 | 96 | 97 | 98 | 103 | 109 | 115 | 116 | 117 | -------------------------------------------------------------------------------- /Render/resources/icons/Texture.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Render/resources/icons/ambientcg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreeCAD/FreeCAD-render/5e33146bcf18166846cd88ec3fc28cc97df4f8bb/Render/resources/icons/ambientcg.png -------------------------------------------------------------------------------- /Render/resources/icons/amdgpuopen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreeCAD/FreeCAD-render/5e33146bcf18166846cd88ec3fc28cc97df4f8bb/Render/resources/icons/amdgpuopen.png -------------------------------------------------------------------------------- /Render/resources/icons/preferences-render.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 20 | 22 | 25 | 29 | 33 | 34 | 37 | 41 | 45 | 46 | 55 | 66 | 67 | 86 | 88 | 89 | 91 | image/svg+xml 92 | 94 | 95 | 96 | 97 | 98 | 103 | 109 | 115 | 116 | 117 | -------------------------------------------------------------------------------- /Render/resources/icons/settings.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Render/resources/translations/README.md: -------------------------------------------------------------------------------- 1 | # About translating Render Workbench 2 | 3 | > [!NOTE] 4 | > All commands **must** be run in `./Render/resources/translations/` directory. 5 | 6 | > [!IMPORTANT] 7 | > If you want to update/release the files you need to have installed 8 | > `lupdate` and `lrelease` from **Qt6** version. Using the versions from 9 | > Qt5 is not advised because they're buggy. 10 | 11 | ## Updating translations template file 12 | 13 | To update the template file from source files you should use this command: 14 | 15 | ```shell 16 | ./update_translation.sh -U 17 | ``` 18 | 19 | Once done you can commit the changes and upload the new file to CrowdIn platform 20 | at webpage and find the **Render** project. 21 | 22 | ## Creating file for missing locale 23 | 24 | ### Using script 25 | 26 | To create a file for a new language with all **Render** translatable strings execute 27 | the script with `-u` flag plus your locale: 28 | 29 | ```shell 30 | ./update_translation.sh -u fr 31 | ``` 32 | 33 | ### Renaming file 34 | 35 | Also you can rename new `Render.ts` file by appending the locale code, 36 | for example, `Render_fr.ts` for French and change 37 | 38 | ```xml 39 | 40 | ``` 41 | 42 | to 43 | 44 | ```xml 45 | 46 | ``` 47 | 48 | As of 2024/10/28 the supported locales on FreeCAD 49 | (according to `FreeCADGui.supportedLocales()`) are 44: 50 | 51 | ```python 52 | {'English': 'en', 'Afrikaans': 'af', 'Arabic': 'ar', 'Basque': 'eu', 53 | 'Belarusian': 'be', 'Bulgarian': 'bg', 'Catalan': 'ca', 54 | 'Chinese Simplified': 'zh-CN', 'Chinese Traditional': 'zh-TW', 'Croatian': 'hr', 55 | 'Czech': 'cs', 'Danish': 'da', 'Dutch': 'nl', 'Filipino': 'fil', 'Finnish': 'fi', 56 | 'French': 'fr', 'Galician': 'gl', 'Georgian': 'ka', 'German': 'de', 'Greek': 'el', 57 | 'Hungarian': 'hu', 'Indonesian': 'id', 'Italian': 'it', 'Japanese': 'ja', 58 | 'Kabyle': 'kab', 'Korean': 'ko', 'Lithuanian': 'lt', 'Norwegian': 'no', 59 | 'Polish': 'pl', 'Portuguese': 'pt-PT', 'Portuguese, Brazilian': 'pt-BR', 60 | 'Romanian': 'ro', 'Russian': 'ru', 'Serbian': 'sr', 'Serbian, Latin': 'sr-CS', 61 | 'Slovak': 'sk', 'Slovenian': 'sl', 'Spanish': 'es-ES', 'Spanish, Argentina': 'es-AR', 62 | 'Swedish': 'sv-SE', 'Turkish': 'tr', 'Ukrainian': 'uk', 'Valencian': 'val-ES', 63 | 'Vietnamese': 'vi'} 64 | ``` 65 | 66 | ## Translating 67 | 68 | To edit your language file open your file in `Qt Linguist` from `qt5-tools`/`qt6-tools` 69 | package or in a text editor like `xed`, `mousepad`, `gedit`, `nano`, `vim`/`nvim`, 70 | `geany` etc. and translate it. 71 | 72 | Alternatively you can visit the **FreeCAD-addons** project on CrowdIn platform 73 | at webpage and find your language, 74 | once done, look for the **Render** project. 75 | 76 | ## Compiling translations 77 | 78 | To convert all `.ts` files to `.qm` files (merge) you can use this command: 79 | 80 | ```shell 81 | ./update_translation.sh -R 82 | ``` 83 | 84 | If you are a translator that wants to update only their language file 85 | to test it on **FreeCAD** before doing a PR you can use this command: 86 | 87 | ```shell 88 | ./update_translation.sh -r fr 89 | ``` 90 | 91 | This will update the `.qm` file for your language (French in this case). 92 | 93 | ## Sending translations 94 | 95 | Now you can contribute your translated `.ts` file to **Render** repository, 96 | also include the `.qm` file. 97 | 98 | 99 | 100 | ## More information 101 | 102 | You can read more about translating external workbenches here: 103 | 104 | 105 | -------------------------------------------------------------------------------- /Render/resources/translations/Render_de.qm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreeCAD/FreeCAD-render/5e33146bcf18166846cd88ec3fc28cc97df4f8bb/Render/resources/translations/Render_de.qm -------------------------------------------------------------------------------- /Render/resources/translations/Render_es-AR.qm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreeCAD/FreeCAD-render/5e33146bcf18166846cd88ec3fc28cc97df4f8bb/Render/resources/translations/Render_es-AR.qm -------------------------------------------------------------------------------- /Render/resources/translations/Render_es-ES.qm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreeCAD/FreeCAD-render/5e33146bcf18166846cd88ec3fc28cc97df4f8bb/Render/resources/translations/Render_es-ES.qm -------------------------------------------------------------------------------- /Render/resources/translations/Render_fr.qm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreeCAD/FreeCAD-render/5e33146bcf18166846cd88ec3fc28cc97df4f8bb/Render/resources/translations/Render_fr.qm -------------------------------------------------------------------------------- /Render/resources/translations/Render_it.qm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreeCAD/FreeCAD-render/5e33146bcf18166846cd88ec3fc28cc97df4f8bb/Render/resources/translations/Render_it.qm -------------------------------------------------------------------------------- /Render/resources/translations/Render_ka.qm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreeCAD/FreeCAD-render/5e33146bcf18166846cd88ec3fc28cc97df4f8bb/Render/resources/translations/Render_ka.qm -------------------------------------------------------------------------------- /Render/resources/translations/Render_pl.qm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreeCAD/FreeCAD-render/5e33146bcf18166846cd88ec3fc28cc97df4f8bb/Render/resources/translations/Render_pl.qm -------------------------------------------------------------------------------- /Render/resources/translations/Render_sl.qm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreeCAD/FreeCAD-render/5e33146bcf18166846cd88ec3fc28cc97df4f8bb/Render/resources/translations/Render_sl.qm -------------------------------------------------------------------------------- /docs/Appleseed_glass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreeCAD/FreeCAD-render/5e33146bcf18166846cd88ec3fc28cc97df4f8bb/docs/Appleseed_glass.png -------------------------------------------------------------------------------- /docs/CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | This project is covered by FreeCAD [Code of 2 | Conduct](https://github.com/FreeCAD/FreeCAD/blob/master/CODE_OF_CONDUCT.md). 3 | Please comply to this code in all your contributions (issue openings, pull 4 | requests...). 5 | -------------------------------------------------------------------------------- /docs/Cameras.md: -------------------------------------------------------------------------------- 1 | # Cameras 2 | 3 | A camera allows to define a specific point of view for a rendering. It defines 4 | which portion of a scene is visible in the rendered image. 5 | 6 | # Zero, one or more cameras 7 | 8 | The rendering process in the external renderer will always need one (and 9 | only one) camera as an input: the active camera. That being said: 10 | 11 | Cameras are optional in FreeCAD rendering projects. Indeed, if no camera is 12 | defined in a project, the current point of view in FreeCAD viewport will be 13 | used instead to create a virtual camera on-the-fly and export it to the 14 | renderer. 15 | 16 | More than one camera can also be added into a project. In this case, all the 17 | cameras will be exported to the renderer, which will retain one (usually the 18 | last one) as active camera. 19 | 20 | Please note that `Visibility` matters also: only visible cameras (meaning their 21 | `Visibility` parameters are `True`) will be exported to the renderer. 22 | 23 | Tip: if you want to make various renderings of a scene from different points of 24 | views (left view, right view etc.), you can create the corresponding cameras, 25 | add them all to your project, and then play on `Visibility` parameters, keeping 26 | only one camera visible at a time, to get each of the renderings. 27 | 28 | 29 | # How to create a camera 30 | 31 | The general method to add a camera to your rendering project is the following: 32 | 1. Create the camera object: press 34 | 3. If necessary, tweak the camera's position and orientation in your scene 35 | 4. **Add a view of the camera in your project**. This is a mandatory step to 36 | have the camera eventually exported to the renderer! Use button, like for 38 | objects... 39 | 40 | Please note that the camera will be created using the current point of view in 41 | FreeCAD viewport (i.e. the current internal Coin camera). Thus painful 42 | reorientation/repositioning effort can be avoided by carefully positioning your 43 | point of view in viewport before creating your camera. You may also prefer to set view to 44 | perspective in the viewport, which will usually be closer to final 45 | rendering. 46 | 47 | The camera will be represented in viewport by the following symbol: 48 | 49 | 50 | 51 | 52 | # Parameters 53 | 54 | Render Camera records the internal camera parameters used in FreeCAD 55 | viewport. This viewport relies on 56 | [Pivy/Coin](https://wiki.freecadweb.org/Pivy), a 3D-rendering library 57 | implementing the [Open 58 | Inventor](https://web.archive.org/web/20041120092542/http://oss.sgi.com/projects/inventor/) 59 | standard. This is why we refer you to [Open 60 | Inventor](https://developer.openinventor.com/UserGuides/10.12/Inventor_Mentor/Cameras_and_Lights/Cameras.html) 61 | and [Coin](https://grey.colorado.edu/coin3d/classSoCamera.html#pub-attribs) 62 | camera documentations for more details about Render Camera parameters. 63 | 64 | # Context menu 65 | 66 | You will find, in Camera context menu, a few features to help positioning and 67 | orienting a Camera: 68 | * `Set GUI to this camera`: resets the GUI camera (the camera from which the 69 | scene is seen in FreeCAD viewport) to the selected Camera. 70 | * `Set this camera to GUI`: sets the selected Camera to the GUI camera. 71 | * `Point at...`: allows to orient the camera so that it looks at a specific 72 | object. Trigger this action, click on the target object in the viewport, and 73 | the camera will be automatically oriented towards the selected object. 74 | 75 | You can access the context menu by right-clicking on the Camera in the tree 76 | view. 77 | -------------------------------------------------------------------------------- /docs/Contributing.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | Any contributions are welcome, feel free to post pull requests to this project! 4 | 5 | Beforehand, you may find below some useful information to make your code more 6 | easily accepted. 7 | 8 | ## Code Quality 9 | 10 | In order to make this module easy to read, maintain and extend by everyone, we 11 | strive to sustain a good level of code quality. In particular, we try to 12 | ensure that the code complies with 13 | [PEP8](https://www.python.org/dev/peps/pep-0008/) and 14 | [PEP257](https://www.python.org/dev/peps/pep-0257/). Therefore, 15 | * If you post contributions (thank you very much!), please enforce PEP8 / 16 | PEP257 on your production, and **run [pylint](www.pylint.org), 17 | [flake8](flake8.pycqa.org) and [pydocstyle](www.pydocstyle.org)** on your 18 | code before sending your PR. A specific pylintrc file, with general PEP8 19 | rules and some specific tweaks related to FreeCAD framework, is provided for 20 | that purpose in the project directory. 21 | * If you see anything that could be improved in terms of code quality (PEP 22 | compliance, pythonicity, coding best practices...), or simply readability 23 | (comments, documentation...), do not hesitate to post propositions! 24 | 25 | ## Writing a new renderer plugin 26 | 27 | You may find [here](../Render/renderers/README.md) some useful guidelines to write a 28 | new renderer plugin. 29 | 30 | ## Translating 31 | Render Workbench is translated following the [general 32 | guidelines](https://wiki.freecadweb.org/Translating_an_external_workbench) 33 | provided by FreeCAD documentation. 34 | Please note we do not translate: 35 | * Debug messages (calls to debug()), as they are supposed to be hidden in 36 | normal functioning. 37 | * Assert messages, as they are supposed not to appear in normal functioning, 38 | and to be reported as is to developers if they occur. 39 | 40 | ## To Do (not exhaustive) 41 | 42 | * Add some more lighting functionalities: 43 | - Spot lights 44 | - Directional lights 45 | * Add UV-textures to material support 46 | * Currently the external (open the file to be rendered in the Renderer's 47 | GUI)/internal (render directly inside FreeCAD) render mode is not 48 | implemented, the external mode will always be used. 49 | * Add support for more renderers: 50 | - Yafaray 51 | - OpenCasCade's [CadRays](https://www.opencascade.com/content/cadrays) 52 | - Kerkythea (adapt the existing macro) 53 | - Blender's Eevee 54 | -------------------------------------------------------------------------------- /docs/Projects.md: -------------------------------------------------------------------------------- 1 | # Project options 2 | 3 | Project options allow to control rendering process and result. 4 | 5 | ## Rendering process options 6 | 7 | Parameter | Type | Description 8 | ----------|------|------------ 9 | `Renderer` | String | The name of the raytracing engine to use 10 | `Template` | String | The template to be used by the rendering 11 | `Delayed Build` | Boolean | If true, the views will be updated at render time only 12 | `Page Result` | Included File | The exported file to be sent to the external renderer 13 | `Output Image` | File | The image file saved by the rendering 14 | `Open After Render` | Boolean | If true, the rendered image is opened in FreeCAD when the rendering is done 15 | 16 | Comments: 17 | * The Render workbench uses the same 18 | [template](https://www.freecadweb.org/wiki/Raytracing_Module#Templates) 19 | logic as the Raytracing workbench, and templates are fully compatible. 20 | Templates usually contain: 21 | - Lighting presets 22 | - Renderer specific options (resolution, sampler, thread counts, GPU use...) 23 | 24 | We provide a few default templates, but you can write and use your own ones, 25 | if necessary.\ 26 | Template file is defined by `Template` parameter. It contains the *relative* 27 | path to the template, starting from the workbench's templates subdirectory. 28 | The use of the relative path, instead of the absolute path, makes the FreeCAD 29 | file fully portable from one computer to another. By default, the `Template` 30 | parameter is read-only in the GUI: the recommended way to modify it is to use 31 | the context menu of the Project. 32 | 33 | * Like the builtin Raytracing workbench, the Render workbench offers the 34 | possibility to update the View objects whenever its source object changes, 35 | which costs extra processing time every time the source object changes, but 36 | quickens the final export. However it also offers a mode where the views are 37 | updated all at once, only when the render is performed. This makes the render 38 | slower, but adds virtually no slowdown during the work with FreeCAD, no 39 | matter the size of a Render project. This behaviour is controlled by the `Delayed Build` parameter. 40 | 41 | ## Rendering result options 42 | 43 | Parameter | Type | Description 44 | ----------|------|------------ 45 | `Render Width` | Integer | The width of the rendered image (in pixels) 46 | `Render Height` | Integer | The height of the rendered image (in pixels) 47 | `Ground Plane` | Boolean | If true, a default ground plane is added to the scene 48 | `Ground Plane Z` | Float | Z position of ground plane 49 | `Ground Plane Color` | RGB | Color of ground plane 50 | `Ground Plane Size Factor` | Float | A factor to control the size of the ground plane. Default value 1.0 makes the ground plane fit the scene bounding box. 51 | `Transparency Sensitivity` | Integer | A factor to augment transparency in whole scene. This affects only implicit materials (materials generated from shape color and transparency), it will have no effect on explicit materials (materials generated from material cards). 52 | 53 | ## Mesher options 54 | 55 | These parameters controls mesher behaviour. Render uses FreeCAD standard 56 | mesher, you may find some more information in [FreeCAD 57 | documentation](https://wiki.freecadweb.org/Mesh_FromPartShape#Standard_mesher) 58 | 59 | Parameter | Type | Description 60 | ----------|------|------------ 61 | `Linear Deflection` | Float | The maximum linear deviation of a mesh section from the surface of the object (the lower the finer). 62 | `Angular Deflection` | Float | The maximum angular deviation from one mesh section to the next, in radians. This setting is used when meshing curved surfaces (the lower the finer). 63 | 64 | **Warning:** Be careful when setting those parameters. Unappropriate values can lead to extremely long processing duration. 65 | -------------------------------------------------------------------------------- /docs/UVProjection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreeCAD/FreeCAD-render/5e33146bcf18166846cd88ec3fc28cc97df4f8bb/docs/UVProjection.png -------------------------------------------------------------------------------- /docs/View.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreeCAD/FreeCAD-render/5e33146bcf18166846cd88ec3fc28cc97df4f8bb/docs/View.png -------------------------------------------------------------------------------- /docs/Views.md: -------------------------------------------------------------------------------- 1 | # View options 2 | 3 | View options allow to adjust the way a particular object is rendered. 4 | 5 | As a reminder, the View is what you create to incorporate a FreeCAD object in a 6 | rendering project. 7 | 8 | 9 | 10 | 11 | ## Material & Textures options 12 | 13 | These options are related to rendering material. 14 | 15 | Parameter | Type | Description 16 | ----------|------|------------ 17 | `Material` | Link | A link to the rendering material to use to render this object. If set, this parameter overrides the object's one. Nota: the preferred way should remain to assign material to the object, not to the view. 18 | `Uv mapping` | [Cubic, Spherical, Cylindric] | The type of projection to use for uv mapping. 19 | 20 | Nota: Uv mapping will be used only if the material contains textures. For now, we support 3 types of projections: 21 | - Cubic: this projection maps the mesh onto the faces of a cube, which is then unfolded. 22 | - Cylindric: this projection maps the mesh onto a cyclinder. The "up" is on Z 23 | axis in the object local coordinates. 24 | - Spherical: the same with a sphere (up on Z axis) 25 | 26 | 27 | ## Smooth options 28 | 29 | These options are related to mesh smoothing. 30 | 31 | Parameter | Type | Description 32 | ----------|------|------------ 33 | `Auto Smooth` | Boolean | A flag to enable/disable mesh smoothing during rendering. 34 | `Auto Smooth Angle` | Angle (in degrees) | The angle above which an edge will not be smoothed. 35 | 36 | 37 | Please note that smoothing is enabled by default, to avoid disgraceful 38 | tessellation at rendering. In most cases, it should not be disabled. However, 39 | smoothing involves calculations that can be lengthy, especially for large 40 | meshes, and in some cases, may bring only a small benefit, if the mesh is dense 41 | enough. In this case, you may disable smoothing here. 42 | -------------------------------------------------------------------------------- /docs/arealight.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreeCAD/FreeCAD-render/5e33146bcf18166846cd88ec3fc28cc97df4f8bb/docs/arealight.jpg -------------------------------------------------------------------------------- /docs/camera.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreeCAD/FreeCAD-render/5e33146bcf18166846cd88ec3fc28cc97df4f8bb/docs/camera.jpg -------------------------------------------------------------------------------- /docs/fileset_texture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreeCAD/FreeCAD-render/5e33146bcf18166846cd88ec3fc28cc97df4f8bb/docs/fileset_texture.png -------------------------------------------------------------------------------- /docs/freecad-june-09.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreeCAD/FreeCAD-render/5e33146bcf18166846cd88ec3fc28cc97df4f8bb/docs/freecad-june-09.jpg -------------------------------------------------------------------------------- /docs/manyimages_texture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreeCAD/FreeCAD-render/5e33146bcf18166846cd88ec3fc28cc97df4f8bb/docs/manyimages_texture.png -------------------------------------------------------------------------------- /docs/material_texture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreeCAD/FreeCAD-render/5e33146bcf18166846cd88ec3fc28cc97df4f8bb/docs/material_texture.png -------------------------------------------------------------------------------- /docs/pointlight.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreeCAD/FreeCAD-render/5e33146bcf18166846cd88ec3fc28cc97df4f8bb/docs/pointlight.jpg -------------------------------------------------------------------------------- /docs/preferences.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreeCAD/FreeCAD-render/5e33146bcf18166846cd88ec3fc28cc97df4f8bb/docs/preferences.jpg -------------------------------------------------------------------------------- /docs/textures.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreeCAD/FreeCAD-render/5e33146bcf18166846cd88ec3fc28cc97df4f8bb/docs/textures.png -------------------------------------------------------------------------------- /materials/Aluminium.FCMat: -------------------------------------------------------------------------------- 1 | ; Aluminium 2 | ; Howetuft 3 | 4 | [General] 5 | Name = RenderAluminium 6 | Description = Aluminium Material for Render 7 | UseObjectColor = False 8 | 9 | [Architectural] 10 | Color = (0.96, 0.96, 0.96) 11 | DiffuseColor = (0.96, 0.96, 0.97) 12 | SectionColor = (0.96, 0.96, 0.97) 13 | 14 | [Render] 15 | Render.Type = Disney 16 | Render.Disney.Anisotropic = 0.0 17 | Render.Disney.BaseColor = (0.96, 0.96, 0.97) 18 | Render.Disney.ClearCoat = 0.0 19 | Render.Disney.ClearCoatGloss = 0.0 20 | Render.Disney.Metallic = 1.0 21 | Render.Disney.Roughness = 0.3 22 | Render.Disney.Sheen = 0.0 23 | Render.Disney.SheenTint = 0.0 24 | Render.Disney.Specular = 0.0 25 | Render.Disney.SpecularTint = 0.0 26 | Render.Disney.Subsurface = 0.0 27 | Render.Luxcore.0001 = scene.textures.%NAME%.type = fresnelpreset 28 | Render.Luxcore.0002 = scene.textures.%NAME%.name = aluminium 29 | Render.Luxcore.0003 = scene.materials.%NAME%.type = metal2 30 | Render.Luxcore.0004 = scene.materials.%NAME%.fresnel = %NAME% 31 | Render.Ospray.0001 = # https://refractiveindex.info/ 32 | Render.Ospray.0002 = type metal 33 | Render.Ospray.0003 = eta 1.5 0.98 0.6 34 | Render.Ospray.0004 = k 7.6 6.6 5.4 35 | Render.Ospray.0005 = roughness 0.1 36 | Render.Pbrt.0001 = Material "conductor" 37 | Render.Pbrt.0002 = "spectrum eta" [ 38 | Render.Pbrt.0003 = 304.994 0.38 39 | Render.Pbrt.0004 = 309.95 0.34 40 | Render.Pbrt.0005 = 312.292 0.287 41 | Render.Pbrt.0006 = 334.178 0.089 42 | Render.Pbrt.0007 = 364.647 0.052 43 | Render.Pbrt.0008 = 405.163 0.041 44 | Render.Pbrt.0009 = 420.271 0.041 45 | Render.Pbrt.0010 = 439.64502 0.043 46 | Render.Pbrt.0011 = 469.621 0.043 47 | Render.Pbrt.0012 = 506.04102 0.046 48 | Render.Pbrt.0013 = 546.167 0.049 49 | Render.Pbrt.0014 = 598.937 0.053 50 | Render.Pbrt.0015 = 662.99506 0.05 51 | Render.Pbrt.0016 = 751.394 0.044 52 | Render.Pbrt.0017 = 860.972 0.04 53 | Render.Pbrt.0018 = ] 54 | Render.Pbrt.0019 = "spectrum k" [ 55 | Render.Pbrt.0020 = 304.994 0.07 56 | Render.Pbrt.0021 = 309.95 0.08 57 | Render.Pbrt.0022 = 312.292 0.091 58 | Render.Pbrt.0023 = 334.178 0.288 59 | Render.Pbrt.0024 = 364.647 0.549 60 | Render.Pbrt.0025 = 405.163 0.799 61 | Render.Pbrt.0026 = 420.271 0.898 62 | Render.Pbrt.0027 = 439.64502 1.02 63 | Render.Pbrt.0028 = 469.621 1.14 64 | Render.Pbrt.0029 = 506.04102 1.28 65 | Render.Pbrt.0030 = 546.167 1.43 66 | Render.Pbrt.0031 = 598.937 1.62 67 | Render.Pbrt.0032 = 662.99506 1.84 68 | Render.Pbrt.0033 = 751.394 2.19 69 | Render.Pbrt.0034 = 860.972 2.56 70 | Render.Pbrt.0035 = ] 71 | Render.Pbrt.0036 = "float roughness" [ 0.01 ] 72 | Render.Povray.0001 = finish { 73 | Render.Povray.0002 = brilliance 4 74 | Render.Povray.0003 = diffuse 0 75 | Render.Povray.0004 = ambient <0.96, 0.96, 0.97> 76 | Render.Povray.0005 = reflection <0.96, 0.96, 0.97> 77 | Render.Povray.0006 = metallic 1 78 | Render.Povray.0007 = specular 0.60 79 | Render.Povray.0008 = roughness 1/20 80 | Render.Povray.0009 = } 81 | 82 | ; vi: ft=dosini 83 | -------------------------------------------------------------------------------- /materials/Brass.FCMat: -------------------------------------------------------------------------------- 1 | ; Brass 2 | ; Howetuft 3 | 4 | [General] 5 | Name = RenderBrass 6 | Description = Brass Material for Render 7 | UseObjectColor = False 8 | 9 | [Architectural] 10 | Color = (0.96, 0.89, 0.68) 11 | DiffuseColor = (0.96, 0.89, 0.68) 12 | SectionColor = (0.96, 0.89, 0.68) 13 | 14 | [Render] 15 | Render.Type = Disney 16 | Render.Disney.Anisotropic = 0.0 17 | Render.Disney.BaseColor = (0.96, 0.89, 0.68) 18 | Render.Disney.ClearCoat = 0.0 19 | Render.Disney.ClearCoatGloss = 0.0 20 | Render.Disney.Metallic = 1.0 21 | Render.Disney.Roughness = 0.3 22 | Render.Disney.Sheen = 0.0 23 | Render.Disney.SheenTint = 0.0 24 | Render.Disney.Specular = 0.0 25 | Render.Disney.SpecularTint = 0.0 26 | Render.Disney.Subsurface = 0.0 27 | Render.Ospray.0001 = type metal 28 | Render.Ospray.0002 = # from refractiveindex.info, for wl 700, 550, 450 29 | Render.Ospray.0003 = eta 0.44600 0.52700 1.0940 30 | Render.Ospray.0004 = k 4.1060 2.7650 1.8290 31 | Render.Ospray.0005 = roughness 0.1 32 | Render.Pbrt.0001 = Material "conductor" 33 | Render.Pbrt.0002 = "spectrum eta" [ "metal-CuZn-eta" ] 34 | Render.Pbrt.0003 = "spectrum k" [ "metal-CuZn-k" ] 35 | Render.Pbrt.0004 = "float roughness" [ 0.01 ] 36 | Render.Povray.0001 = finish { 37 | Render.Povray.0002 = brilliance 4 38 | Render.Povray.0003 = diffuse 0 39 | Render.Povray.0004 = ambient <0.96 0.89 0.68> 40 | Render.Povray.0005 = reflection <0.96 0.89 0.68> 41 | Render.Povray.0006 = metallic 1 42 | Render.Povray.0007 = specular 0.60 43 | Render.Povray.0008 = roughness 1/20 44 | Render.Povray.0009 = } 45 | ; vi: ft=dosini 46 | -------------------------------------------------------------------------------- /materials/Carpaint.FCMat: -------------------------------------------------------------------------------- 1 | ; Carpaint 2 | ; Howetuft 3 | 4 | [General] 5 | Name = RenderCarpaint 6 | Description = Carpaint Material for Render 7 | UseObjectColor = True 8 | 9 | [Render] 10 | Render.Type = Carpaint 11 | Render.Carpaint.BaseColor = Object 12 | 13 | ; vi: ft=dosini 14 | -------------------------------------------------------------------------------- /materials/Disney.FCMat: -------------------------------------------------------------------------------- 1 | ; Disney 2 | ; Howetuft 3 | 4 | [General] 5 | Name = RenderDisney 6 | Description = Disney Material for Render 7 | UseObjectColor = True 8 | 9 | [Render] 10 | Render.Type = Disney 11 | ; vi: ft=dosini 12 | -------------------------------------------------------------------------------- /materials/Emission.FCMat: -------------------------------------------------------------------------------- 1 | ; Emission 2 | ; Howetuft 3 | 4 | [General] 5 | ; General name 6 | Name = RenderEmission 7 | Description = Emission Material for Render 8 | UseObjectColor = True 9 | 10 | [Rendering] 11 | Render.Type = Emission 12 | Render.Emission.Power = 60.0 13 | Render.Emission.Color = (1.0, 1.0, 1.0) 14 | 15 | 16 | ; vi: ft=dosini 17 | -------------------------------------------------------------------------------- /materials/Glass.FCMat: -------------------------------------------------------------------------------- 1 | ; Glass 2 | ; Howetuft 3 | 4 | [General] 5 | ; General name 6 | Name = RenderGlass 7 | Description = Glass Material for Render 8 | UseObjectColor = True 9 | 10 | [Render] 11 | Render.Type = Glass 12 | Render.Glass.IOR = 1.5 13 | Render.Glass.Color = (1.0, 1.0, 1.0) 14 | ; vi: ft=dosini 15 | -------------------------------------------------------------------------------- /materials/GlossyPlastic.FCMat: -------------------------------------------------------------------------------- 1 | ; GlossyPlastic 2 | ; Howetuft 3 | 4 | [General] 5 | Name = RenderGlossyPlastic 6 | Description = Glossy Plastic Material for Render 7 | UseObjectColor = True 8 | 9 | [Render] 10 | Render.Type = Disney 11 | Render.Disney.Anisotropic = 0.0 12 | Render.Disney.BaseColor = Object 13 | Render.Disney.ClearCoat = 0.0 14 | Render.Disney.ClearCoatGloss = 0.0 15 | Render.Disney.Metallic = 0.0 16 | Render.Disney.Roughness = 0.1 17 | Render.Disney.Sheen = 0.0 18 | Render.Disney.SheenTint = 0.0 19 | Render.Disney.Specular = 0.5 20 | Render.Disney.SpecularTint = 0.0 21 | Render.Disney.Subsurface = 0.0 22 | Render.Ospray.0001 = # use coat instead of specular 23 | Render.Ospray.0002 = type principled 24 | Render.Ospray.0003 = baseColor %RED% %GREEN% %BLUE% 25 | Render.Ospray.0004 = roughness 0.4 26 | Render.Ospray.0005 = coat 0.8 27 | Render.Ospray.0006 = coatRoughness 0.1 28 | Render.Pbrt.0001 = Material "coateddiffuse" 29 | Render.Pbrt.0002 = "rgb reflectance" [ %RED% %GREEN% %BLUE% ] 30 | Render.Pbrt.0003 = "float roughness" [ 0.1 ] 31 | ; vi: ft=dosini 32 | -------------------------------------------------------------------------------- /materials/GreenMarble.FCMat: -------------------------------------------------------------------------------- 1 | ; GreenMarble 2 | ; Howetuft 3 | 4 | [General] 5 | Name = RenderGreenMarble 6 | Description = Green Marble 7 | ProductURL = https://ambientcg.com/view?id=Marble009 8 | UseObjectColor = False 9 | 10 | [Render] 11 | Render.Type = Substance_PBR 12 | Render.Substance_PBR.BaseColor = Texture('GreenMarble', 0);(0.5,0.5,0.5) 13 | Render.Substance_PBR.Bump = Texture('GreenMarble', 3, 0.001) 14 | Render.Substance_PBR.Metallic = 0.2 15 | Render.Substance_PBR.Normal = Texture('GreenMarble', 2, 0.001) 16 | Render.Substance_PBR.Roughness = Texture('GreenMarble',1);0.5 17 | Render.Substance_PBR.Specular = 0.0 18 | Render.Textures.GreenMarble.Images.0 = GreenMarble/Marble009_1K_Color_Light.jpg 19 | Render.Textures.GreenMarble.Images.1 = GreenMarble/Marble009_1K_Roughness.jpg 20 | Render.Textures.GreenMarble.Images.2 = GreenMarble/Marble009_1K_NormalGL.jpg 21 | Render.Textures.GreenMarble.Images.3 = GreenMarble/Marble009_1K_Displacement.jpg 22 | Render.Textures.GreenMarble.Scale = 1.0 23 | ; vi: ft=dosini 24 | -------------------------------------------------------------------------------- /materials/GreenMarble/Marble009_1K-JPG.usda: -------------------------------------------------------------------------------- 1 | #usda 1.0 2 | ( 3 | customLayerData = { 4 | string author = "ambientCG (ambientCG.com)" 5 | string copyright = "CC0 1.0 Public Domain Dedication (https://creativecommons.org/publicdomain/zero/1.0/)" 6 | string generator = "ambientCG USD Script (v2)" 7 | string title = "Marble009 by ambientCG" 8 | string url = "https://ambientcg.com/a/Marble009" 9 | } 10 | defaultPrim = "ambientCG_Marble009_1K_JPG" 11 | ) 12 | 13 | def Material "ambientCG_Marble009_1K_JPG" 14 | { 15 | token outputs:surface.connect = 16 | 17 | def Shader "TextureCoordinateReader" 18 | { 19 | uniform token info:id = "UsdPrimvarReader_float2" 20 | token inputs:varname = "st" 21 | float2 outputs:result 22 | } 23 | 24 | def Shader "PBRShader" 25 | { 26 | uniform token info:id = "UsdPreviewSurface" 27 | color3f inputs:diffuseColor.connect = 28 | float inputs:displacement.connect = 29 | normal3f inputs:normal.connect = 30 | float inputs:roughness.connect = 31 | int inputs:useSpecularWorkflow = 0 32 | token outputs:surface 33 | } 34 | 35 | def Shader "diffuseColor" 36 | { 37 | uniform token info:id = "UsdUVTexture" 38 | float4 inputs:fallback = (0.8, 0.8, 0.8, 1) 39 | asset inputs:file = @Marble009_1K_Color.jpg@ 40 | float2 inputs:st.connect = 41 | token inputs:sourceColorSpace = "sRGB" 42 | token inputs:wrapS = "repeat" 43 | token inputs:wrapT = "repeat" 44 | float3 outputs:rgb 45 | } 46 | 47 | def Shader "displacement" 48 | { 49 | uniform token info:id = "UsdUVTexture" 50 | float4 inputs:fallback = (0.5, 0.5, 0.5, 1) 51 | asset inputs:file = @Marble009_1K_Displacement.jpg@ 52 | float2 inputs:st.connect = 53 | token inputs:sourceColorSpace = "raw" 54 | token inputs:wrapS = "repeat" 55 | token inputs:wrapT = "repeat" 56 | float outputs:r 57 | } 58 | 59 | def Shader "roughness" 60 | { 61 | uniform token info:id = "UsdUVTexture" 62 | float4 inputs:fallback = (1, 1, 1, 1) 63 | asset inputs:file = @Marble009_1K_Roughness.jpg@ 64 | float2 inputs:st.connect = 65 | token inputs:sourceColorSpace = "raw" 66 | token inputs:wrapS = "repeat" 67 | token inputs:wrapT = "repeat" 68 | float outputs:r 69 | } 70 | 71 | def Shader "normal" 72 | { 73 | uniform token info:id = "UsdUVTexture" 74 | float4 inputs:fallback = (0, 0, 1, 1) 75 | asset inputs:file = @Marble009_1K_NormalGL.jpg@ 76 | float2 inputs:st.connect = 77 | float4 inputs:bias = (-1, -1, -1, 0) 78 | float4 inputs:scale = (2, 2, 2, 1) 79 | token inputs:sourceColorSpace = "raw" 80 | token inputs:wrapS = "repeat" 81 | token inputs:wrapT = "repeat" 82 | float3 outputs:rgb 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /materials/GreenMarble/Marble009_1K-JPG.usdc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreeCAD/FreeCAD-render/5e33146bcf18166846cd88ec3fc28cc97df4f8bb/materials/GreenMarble/Marble009_1K-JPG.usdc -------------------------------------------------------------------------------- /materials/GreenMarble/Marble009_1K-JPG.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreeCAD/FreeCAD-render/5e33146bcf18166846cd88ec3fc28cc97df4f8bb/materials/GreenMarble/Marble009_1K-JPG.zip -------------------------------------------------------------------------------- /materials/GreenMarble/Marble009_1K_Color.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreeCAD/FreeCAD-render/5e33146bcf18166846cd88ec3fc28cc97df4f8bb/materials/GreenMarble/Marble009_1K_Color.jpg -------------------------------------------------------------------------------- /materials/GreenMarble/Marble009_1K_Color_Light.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreeCAD/FreeCAD-render/5e33146bcf18166846cd88ec3fc28cc97df4f8bb/materials/GreenMarble/Marble009_1K_Color_Light.jpg -------------------------------------------------------------------------------- /materials/GreenMarble/Marble009_1K_Displacement.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreeCAD/FreeCAD-render/5e33146bcf18166846cd88ec3fc28cc97df4f8bb/materials/GreenMarble/Marble009_1K_Displacement.jpg -------------------------------------------------------------------------------- /materials/GreenMarble/Marble009_1K_NormalDX.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreeCAD/FreeCAD-render/5e33146bcf18166846cd88ec3fc28cc97df4f8bb/materials/GreenMarble/Marble009_1K_NormalDX.jpg -------------------------------------------------------------------------------- /materials/GreenMarble/Marble009_1K_NormalGL.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreeCAD/FreeCAD-render/5e33146bcf18166846cd88ec3fc28cc97df4f8bb/materials/GreenMarble/Marble009_1K_NormalGL.jpg -------------------------------------------------------------------------------- /materials/GreenMarble/Marble009_1K_Roughness.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreeCAD/FreeCAD-render/5e33146bcf18166846cd88ec3fc28cc97df4f8bb/materials/GreenMarble/Marble009_1K_Roughness.jpg -------------------------------------------------------------------------------- /materials/GreenMarble/Marble009_PREVIEW.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreeCAD/FreeCAD-render/5e33146bcf18166846cd88ec3fc28cc97df4f8bb/materials/GreenMarble/Marble009_PREVIEW.jpg -------------------------------------------------------------------------------- /materials/Iron.FCMat: -------------------------------------------------------------------------------- 1 | ; Iron 2 | ; Howetuft 3 | 4 | [General] 5 | Name = RenderIron 6 | Description = Iron Material for Render 7 | UseObjectColor = False 8 | 9 | [Architectural] 10 | Color = (0.77, 0.78, 0.78) 11 | DiffuseColor = (0.77, 0.78, 0.78) 12 | SectionColor = (0.77, 0.78, 0.78) 13 | 14 | [Render] 15 | Render.Type = Disney 16 | Render.Disney.Anisotropic = 0.0 17 | Render.Disney.BaseColor = (0.77, 0.78, 0.78) 18 | Render.Disney.ClearCoat = 0.0 19 | Render.Disney.ClearCoatGloss = 0.0 20 | Render.Disney.Metallic = 1.0 21 | Render.Disney.Roughness = 0.3 22 | Render.Disney.Sheen = 0.0 23 | Render.Disney.SheenTint = 0.0 24 | Render.Disney.Specular = 0.0 25 | Render.Disney.SpecularTint = 0.0 26 | Render.Disney.Subsurface = 0.0 27 | Render.Ospray.0001 = type metal 28 | Render.Ospray.0002 = # from refractiveindex.info, for wl 700, 550, 450 29 | Render.Ospray.0003 = eta 2.8653 2.9497 2.5845 30 | Render.Ospray.0004 = k 3.1820 2.9318 2.7670 31 | Render.Ospray.0005 = roughness 0.1 32 | Render.Pbrt.0001 = Material "conductor" 33 | Render.Pbrt.0002 = "spectrum eta" [ "metal-Ag-eta" ] 34 | Render.Pbrt.0003 = "spectrum k" [ "metal-Ag-k" ] 35 | Render.Pbrt.0004 = "float roughness" [ 0.01 ] 36 | Render.Povray.0001 = finish { 37 | Render.Povray.0002 = brilliance 4 38 | Render.Povray.0003 = diffuse 0 39 | Render.Povray.0004 = ambient <0.77 0.78 0.78> 40 | Render.Povray.0005 = reflection <0.77 0.78 0.78> 41 | Render.Povray.0006 = metallic 1 42 | Render.Povray.0007 = specular 0.60 43 | Render.Povray.0008 = roughness 1/20 44 | Render.Povray.0009 = } 45 | ; vi: ft=dosini 46 | -------------------------------------------------------------------------------- /materials/Magnetite.FCMat: -------------------------------------------------------------------------------- 1 | ; Magnetite 2 | ; Howetuft 3 | 4 | [General] 5 | Name = RenderMagnetite 6 | Description = Magnetite Material for Render 7 | UseObjectColor = False 8 | 9 | [Architectural] 10 | Color = (0.117, 0.115, 0.111) 11 | DiffuseColor = (0.117, 0.115, 0.111) 12 | SectionColor = (0.117, 0.115, 0.111) 13 | 14 | [Render] 15 | Render.Type = Disney 16 | Render.Disney.Anisotropic = 0.0 17 | Render.Disney.BaseColor = (0.117, 0.115, 0.111) 18 | Render.Disney.ClearCoat = 0.0 19 | Render.Disney.ClearCoatGloss = 0.0 20 | Render.Disney.Metallic = 1.0 21 | Render.Disney.Roughness = 0.3 22 | Render.Disney.Sheen = 0.0 23 | Render.Disney.SheenTint = 0.0 24 | Render.Disney.Specular = 0.0 25 | Render.Disney.SpecularTint = 0.0 26 | Render.Disney.Subsurface = 0.0 27 | Render.Luxcore.0001 = scene.materials.%NAME%.type = metal2 28 | Render.Luxcore.0002 = scene.materials.%NAME%.fresnel = %NAME% 29 | Render.Luxcore.0003 = scene.textures.%NAME%.type = fresnelluxpop 30 | Render.Luxcore.0004 = scene.textures.%NAME%.file = %TEXTURE(Image)% 31 | Render.Textures.Magnetite.Images.0 = Magnetite/magnetite.nk 32 | ; vi: ft=dosini 33 | -------------------------------------------------------------------------------- /materials/Matte.FCMat: -------------------------------------------------------------------------------- 1 | ; Matte 2 | ; Howetuft 3 | 4 | [General] 5 | Name = RenderMatte 6 | Description = Matte Material for Render 7 | UseObjectColor = True 8 | 9 | [Render] 10 | Render.Type = Diffuse 11 | Render.Diffuse.Color = Object 12 | ; vi: ft=dosini 13 | -------------------------------------------------------------------------------- /materials/RoughPlastic.FCMat: -------------------------------------------------------------------------------- 1 | ; RoughPlastic 2 | ; Howetuft 3 | 4 | [General] 5 | Name = RenderRoughPlastic 6 | Description = Rough Plastic Material for Render 7 | ; Don't use material color 8 | UseObjectColor = True 9 | 10 | [Render] 11 | Render.Type = Disney 12 | Render.Disney.Anisotropic = 0.0 13 | Render.Disney.BaseColor = Object 14 | Render.Disney.ClearCoat = 0.0 15 | Render.Disney.ClearCoatGloss = 0.0 16 | Render.Disney.Metallic = 0.0 17 | Render.Disney.Roughness = 0.5 18 | Render.Disney.Sheen = 0.0 19 | Render.Disney.SheenTint = 0.0 20 | Render.Disney.Specular = 0.5 21 | Render.Disney.SpecularTint = 0.0 22 | Render.Disney.Subsurface = 0.0 23 | Render.Ospray.0001 = # use coat instead of specular 24 | Render.Ospray.0002 = type principled 25 | Render.Ospray.0003 = baseColor %RED% %GREEN% %BLUE% 26 | Render.Ospray.0004 = roughness 0.4 27 | Render.Ospray.0005 = coat 0.8 28 | Render.Ospray.0006 = coatRoughness 0.5 29 | Render.Pbrt.0001 = Material "coateddiffuse" 30 | Render.Pbrt.0002 = "rgb reflectance" [ %RED% %GREEN% %BLUE% ] 31 | Render.Pbrt.0003 = "float roughness" [ 0.8 ] 32 | ; vi: ft=dosini 33 | -------------------------------------------------------------------------------- /materials/Terrazzo.FCMat: -------------------------------------------------------------------------------- 1 | ; Terrazzo 2 | ; Howetuft 3 | 4 | [General] 5 | Name = RenderTerrazzo 6 | Description = Terrazzo lime stone 7 | ProductURL = https://ambientcg.com/view?id=Terrazzo019M 8 | UseObjectColor = False 9 | 10 | [Render] 11 | Render.Type = Substance_PBR 12 | Render.Substance_PBR.BaseColor = Texture('Terrazzo', 0);(0.5,0.5,0.5) 13 | Render.Substance_PBR.Bump = Texture('Terrazzo', 3, 0.001) 14 | Render.Substance_PBR.Metallic = 0.3 15 | Render.Substance_PBR.Normal = Texture('Terrazzo', 2, 0.001) 16 | Render.Substance_PBR.Roughness = Texture('Terrazzo',1);0.5 17 | Render.Substance_PBR.Specular = 0.1 18 | Render.Textures.Terrazzo.Images.0 = Terrazzo019/Terrazzo019M_1K_Color_Light.jpg 19 | Render.Textures.Terrazzo.Images.1 = Terrazzo019/Terrazzo019M_1K_Roughness.jpg 20 | Render.Textures.Terrazzo.Images.2 = Terrazzo019/Terrazzo019M_1K_NormalGL.jpg 21 | Render.Textures.Terrazzo.Images.3 = Terrazzo019/Terrazzo019M_1K_Displacement.jpg 22 | Render.Textures.Terrazzo.Scale = 0.2 23 | ; vi: ft=dosini 24 | -------------------------------------------------------------------------------- /materials/Terrazzo019/Terrazzo019M_1K_Color_Light.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreeCAD/FreeCAD-render/5e33146bcf18166846cd88ec3fc28cc97df4f8bb/materials/Terrazzo019/Terrazzo019M_1K_Color_Light.jpg -------------------------------------------------------------------------------- /materials/Terrazzo019/Terrazzo019M_1K_Displacement.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreeCAD/FreeCAD-render/5e33146bcf18166846cd88ec3fc28cc97df4f8bb/materials/Terrazzo019/Terrazzo019M_1K_Displacement.jpg -------------------------------------------------------------------------------- /materials/Terrazzo019/Terrazzo019M_1K_NormalGL.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreeCAD/FreeCAD-render/5e33146bcf18166846cd88ec3fc28cc97df4f8bb/materials/Terrazzo019/Terrazzo019M_1K_NormalGL.jpg -------------------------------------------------------------------------------- /materials/Terrazzo019/Terrazzo019M_1K_Roughness.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreeCAD/FreeCAD-render/5e33146bcf18166846cd88ec3fc28cc97df4f8bb/materials/Terrazzo019/Terrazzo019M_1K_Roughness.jpg -------------------------------------------------------------------------------- /materials/Terrazzo019/Terrazzo019M_PREVIEW.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreeCAD/FreeCAD-render/5e33146bcf18166846cd88ec3fc28cc97df4f8bb/materials/Terrazzo019/Terrazzo019M_PREVIEW.jpg -------------------------------------------------------------------------------- /package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Render 4 | A workbench to produce high-quality rendered images from your FreeCAD document, using open-source external rendering engines. 5 | 6 | Designed as a modern replacement for deprecated internal Raytracing Workbench. 7 | 2024.12.15 8 | 2024-12-15 9 | howetuft 10 | Yorik Van Havre 11 | LGPL-2.1-or-later 12 | https://github.com/FreeCAD/FreeCAD-render 13 | https://github.com/FreeCAD/FreeCAD-render/issues 14 | https://github.com/FreeCAD/FreeCAD-render/blob/master/README.md 15 | Render/resources/icons/Render.svg 16 | 3.8 17 | 18 | 19 | 20 | Render Workbench 21 | ./ 22 | Render/resources/icons/Render.svg 23 | RenderWorkbench 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.black] 2 | line-length = 79 3 | target-version = ['py37'] 4 | include = '\.pyi?$' 5 | extend-exclude = '''''' 6 | -------------------------------------------------------------------------------- /renderplugin/.gitignore: -------------------------------------------------------------------------------- 1 | plugin_framework.egg-info 2 | build 3 | -------------------------------------------------------------------------------- /renderplugin/README.md: -------------------------------------------------------------------------------- 1 | # renderplugin 2 | 3 | A framework for Render plugin 4 | 5 | To be built with hatch: 6 | 7 | `hatch build` 8 | -------------------------------------------------------------------------------- /renderplugin/pyproject.toml: -------------------------------------------------------------------------------- 1 | [build-system] 2 | requires = ["hatchling"] 3 | build-backend = "hatchling.build" 4 | 5 | [project] 6 | name = "renderplugin" 7 | description = "" 8 | version = "0.0.1" 9 | 10 | [tool.hatch.build] 11 | directory = "../wheelhouse" 12 | target_config = "wheel" 13 | 14 | [tool.hatch.build.targets.wheel] 15 | packages = ["src/renderplugin"] 16 | exclude = ["README.md"] 17 | 18 | [tool.hatch.build.targets.sdist] 19 | packages = ["src/renderplugin"] 20 | exclude = ["README.md"] 21 | -------------------------------------------------------------------------------- /renderplugin/src/renderplugin/__init__.py: -------------------------------------------------------------------------------- 1 | # *************************************************************************** 2 | # * * 3 | # * Copyright (c) 2024 Howetuft * 4 | # * * 5 | # * This program is free software; you can redistribute it and/or modify * 6 | # * it under the terms of the GNU Lesser General Public License (LGPL) * 7 | # * as published by the Free Software Foundation; either version 2.1 of * 8 | # * the License, or (at your option) any later version. * 9 | # * for detail see the LICENCE text file. * 10 | # * * 11 | # * This program is distributed in the hope that it will be useful, * 12 | # * but WITHOUT ANY WARRANTY; without even the implied warranty of * 13 | # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 14 | # * GNU Library General Public License for more details. * 15 | # * * 16 | # * You should have received a copy of the GNU Library General Public * 17 | # * License along with this program; if not, write to the Free Software * 18 | # * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * 19 | # * USA * 20 | # * * 21 | # *************************************************************************** 22 | 23 | """This module implements framework for Render plugins. 24 | 25 | The framework gives ability to plugins: 26 | - to be embedded into FreeCAD Gui 27 | - to communicate with Render and therefore with FreeCAD 28 | """ 29 | 30 | from .plugin_framework import ( 31 | ARGS, 32 | RenderPluginApplication, 33 | PluginMessageEvent, 34 | log, 35 | msg, 36 | warn, 37 | error, 38 | SOCKET, 39 | SERVERNAME, 40 | ) 41 | -------------------------------------------------------------------------------- /templates/appleseed_flat.appleseed: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /templates/appleseed_sunlight.appleseed: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | -------------------------------------------------------------------------------- /templates/cycles_flat.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /templates/cycles_standard.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /templates/cycles_studio_dark.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 27 | 28 | 29 | 30 | 35 | 36 | 37 | 38 | 45 | 46 | 47 | 55 | 56 | 57 | 66 | 67 | 68 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /templates/cycles_studio_light.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 27 | 28 | 29 | 30 | 35 | 36 | 37 | 38 | 45 | 46 | 47 | 55 | 56 | 57 | 65 | 66 | 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /templates/cycles_sunlight.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 26 | 27 | 28 | 29 | 30 | 31 | 36 | 37 | 38 | 39 | 46 | 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /templates/luxcore_flat.cfg: -------------------------------------------------------------------------------- 1 | # LuxCore sunlight template for FreeCAD-render (predefined sun and sky) 2 | # 3 | # LuxCore requires 2 input files: 4 | # - a configuration file, with rendering parameters (engine, sampler...) 5 | # - a scene file, with the scene objects (camera, lights, meshes...) 6 | # For more convenience, our template file is all-in-one, with 2 sections 7 | # that will be split up at rendering. 8 | 9 | [Configuration] 10 | 11 | [Scene] 12 | # RaytracingContent 13 | # vi: ft=cfg 14 | -------------------------------------------------------------------------------- /templates/luxcore_standard.cfg: -------------------------------------------------------------------------------- 1 | # LuxCore standard template for FreeCAD-render 2 | # 3 | # LuxCore requires 2 input files: 4 | # - a configuration file, with rendering parameters (engine, sampler...) 5 | # - a scene file, with the scene objects (camera, lights, meshes...) 6 | # For more convenience, our template file is all-in-one, with 2 sections 7 | # that will be split up at rendering. 8 | 9 | [Configuration] 10 | film.imagepipelines.1.1.type = TONEMAP_REINHARD02 11 | film.imagepipelines.1.2.type = GAMMA_CORRECTION 12 | film.imagepipelines.1.2.gamma = 2.2 13 | film.imagepipelines.2.0.type = NOP 14 | film.imagepipelines.2.1.type = GAMMA_CORRECTION 15 | film.imagepipelines.2.1.gamma = 2.2 16 | 17 | [Scene] 18 | scene.lights.__BACKGROUND__.type = "constantinfinite" 19 | scene.lights.__BACKGROUND__.color = nop 0.3 0.3 0.3 20 | scene.lights.__BACKGROUND__.gain = 2.0 2.0 2.0 21 | # RaytracingContent 22 | # vi: ft=cfg 23 | -------------------------------------------------------------------------------- /templates/luxcore_studio_dark.cfg: -------------------------------------------------------------------------------- 1 | # LuxCore standard template for FreeCAD-render 2 | # 3 | # LuxCore requires 2 input files: 4 | # - a configuration file, with rendering parameters (engine, sampler...) 5 | # - a scene file, with the scene objects (camera, lights, meshes...) 6 | # For more convenience, our template file is all-in-one, with 2 sections 7 | # that will be split up at rendering. 8 | 9 | [Configuration] 10 | path.clamping.variance.maxvalue = 0.8 11 | 12 | [Scene] 13 | scene.lights.__BACKGROUND__.type = "constantinfinite" 14 | scene.lights.__BACKGROUND__.color = 0.01 0.01 0.01 15 | scene.lights.__BACKGROUND__.gain = 1.0 1.0 1.0 16 | scene.lights.KEY.type = "distant" 17 | scene.lights.KEY.color = 1.0 1.0 1.0 18 | scene.lights.KEY.direction = -1 1 -1.5 19 | scene.lights.KEY.theta = 5 20 | scene.lights.KEY.gain = 200.0 200.0 200.0 21 | scene.lights.FILL.type = "distant" 22 | scene.lights.FILL.color = 0.8 1.0 1.0 23 | scene.lights.FILL.direction = 1 1 -0.5 24 | scene.lights.FILL.theta = 30 25 | scene.lights.FILL.gain = 10.0 10.0 10.0 26 | scene.lights.RIM.type = "distant" 27 | scene.lights.RIM.color = 1.0 1.0 1.0 28 | scene.lights.RIM.direction = 0 -1 0 29 | scene.lights.RIM.theta = 90 30 | scene.lights.RIM.gain = 50.0 50.0 50.0 31 | # RaytracingContent 32 | # vi: ft=cfg 33 | -------------------------------------------------------------------------------- /templates/luxcore_studio_light.cfg: -------------------------------------------------------------------------------- 1 | # LuxCore standard template for FreeCAD-render 2 | # 3 | # LuxCore requires 2 input files: 4 | # - a configuration file, with rendering parameters (engine, sampler...) 5 | # - a scene file, with the scene objects (camera, lights, meshes...) 6 | # For more convenience, our template file is all-in-one, with 2 sections 7 | # that will be split up at rendering. 8 | 9 | [Configuration] 10 | path.clamping.variance.maxvalue = 0.8 11 | 12 | [Scene] 13 | scene.lights.__BACKGROUND__.type = "constantinfinite" 14 | scene.lights.__BACKGROUND__.color = 0.3 0.3 0.3 15 | scene.lights.__BACKGROUND__.gain = 1.0 1.0 1.0 16 | scene.lights.KEY.type = "distant" 17 | scene.lights.KEY.color = 1.0 1.0 1.0 18 | scene.lights.KEY.direction = -1 1 -1.5 19 | scene.lights.KEY.theta = 5 20 | scene.lights.KEY.gain = 100.0 100.0 100.0 21 | scene.lights.FILL.type = "distant" 22 | scene.lights.FILL.color = 1.0 1.0 1.0 23 | scene.lights.FILL.direction = 1 1 -0.5 24 | scene.lights.FILL.theta = 30 25 | scene.lights.FILL.gain = 5.0 5.0 5.0 26 | scene.lights.RIM.type = "distant" 27 | scene.lights.RIM.color = 1.0 1.0 1.0 28 | scene.lights.RIM.direction = 0 -1 0 29 | scene.lights.RIM.theta = 90 30 | scene.lights.RIM.gain = 25.0 25.0 25.0 31 | # RaytracingContent 32 | # vi: ft=cfg 33 | -------------------------------------------------------------------------------- /templates/luxcore_sunlight.cfg: -------------------------------------------------------------------------------- 1 | # LuxCore flat template for FreeCAD-render (no predefined light) 2 | # 3 | # LuxCore requires 2 input files: 4 | # - a configuration file, with rendering parameters (engine, sampler...) 5 | # - a scene file, with the scene objects (camera, lights, meshes...) 6 | # For more convenience, our template file is all-in-one, with 2 sections 7 | # that will be split up at rendering. 8 | 9 | [Configuration] 10 | renderengine.seed = 1 11 | film.imagepipelines.1.1.type = NOP 12 | film.imagepipelines.1.2.type = GAMMA_CORRECTION 13 | film.imagepipelines.1.2.gamma = 2.2 14 | film.imagepipelines.2.0.type = NOP 15 | film.imagepipelines.2.1.type = GAMMA_CORRECTION 16 | film.imagepipelines.2.1.gamma = 2.2 17 | 18 | [Scene] 19 | scene.lights.__SUN__.type = sun 20 | scene.lights.__SUN__.dir = 0.028625251725316 -0.011037390679121 0.040162373334169 21 | scene.lights.__SUN__.turbidity = 2.2 22 | scene.lights.__SUN__.gain = 0.002 0.002 0.002 23 | scene.lights.__SKY__.type = sky2 24 | scene.lights.__SKY__.dir = 0.028625251725316 -0.011037390679121 0.040162373334169 25 | scene.lights.__SKY__.turbidity = 2.2 26 | scene.lights.__SKY__.gain = 0.0001 0.0001 0.0001 27 | # RaytracingContent 28 | # vi: ft=cfg 29 | -------------------------------------------------------------------------------- /templates/luxrender_flat.lxs: -------------------------------------------------------------------------------- 1 | # Main Scene File 2 | 3 | Renderer "sampler" 4 | 5 | Sampler "lowdiscrepancy" 6 | "integer pixelsamples" [16] 7 | "string pixelsampler" ["lowdiscrepancy"] 8 | "bool noiseaware" ["false"] 9 | 10 | Accelerator "qbvh" 11 | 12 | SurfaceIntegrator "bidirectional" 13 | "integer eyedepth" [16] 14 | "integer lightdepth" [16] 15 | "integer lightraycount" [1] 16 | "string lightpathstrategy" ["auto"] 17 | "string lightstrategy" ["auto"] 18 | 19 | VolumeIntegrator "single" 20 | 21 | PixelFilter "mitchell" 22 | "bool supersample" ["true"] 23 | "float B" [0.333333343267441] 24 | "float C" [0.333333343267441] 25 | "float xwidth" [2.000000000000000] 26 | "float ywidth" [2.000000000000000] 27 | 28 | #RaytracingCamera 29 | 30 | Camera "perspective" 31 | "float fov" [49.134342077604479] 32 | "float screenwindow" [-1.000000000000000 1.000000000000000 -0.562500000000000 0.562500000000000] 33 | "bool autofocus" ["false"] 34 | "float shutteropen" [0.000000000000000] 35 | "float shutterclose" [0.041666666666667] 36 | 37 | Film "fleximage" 38 | "integer xresolution" [960] 39 | "integer yresolution" [540] 40 | "float gamma" [2.200000000000000] 41 | "float colorspace_white" [0.314275000000000 0.329411000000000] 42 | "float colorspace_red" [0.630000000000000 0.340000000000000] 43 | "float colorspace_green" [0.310000000000000 0.595000000000000] 44 | "float colorspace_blue" [0.155000000000000 0.070000000000000] 45 | "string filename" ["outdoor.Scene.00001"] 46 | "bool write_resume_flm" ["false"] 47 | "bool restart_resume_flm" ["false"] 48 | "bool write_flm_direct" ["false"] 49 | "bool write_exr_halftype" ["false"] 50 | "bool write_exr_applyimaging" ["true"] 51 | "bool write_exr_ZBuf" ["false"] 52 | "string write_exr_compressiontype" ["PIZ (lossless)"] 53 | "string write_exr_zbuf_normalizationtype" ["None"] 54 | "bool write_exr" ["false"] 55 | "string write_exr_channels" ["RGB"] 56 | "bool write_png" ["true"] 57 | "string write_png_channels" ["RGB"] 58 | "bool write_png_16bit" ["false"] 59 | "bool write_tga" ["false"] 60 | "string write_tga_channels" ["RGB"] 61 | "string ldr_clamp_method" ["cut"] 62 | "integer displayinterval" [10] 63 | "integer writeinterval" [180] 64 | "integer flmwriteinterval" [900] 65 | "integer outlierrejection_k" [2] 66 | "integer tilecount" [0] 67 | "string tonemapkernel" ["nop"] 68 | 69 | WorldBegin 70 | 71 | # Materials File 72 | 73 | MakeNamedMaterial "ground" 74 | "float uroughness" [0.075000002980232] 75 | "float vroughness" [0.075000002980232] 76 | "string name" ["amorphous carbon"] 77 | "string type" ["metal"] 78 | 79 | # Geometry File 80 | 81 | #RaytracingContent 82 | 83 | 84 | # Volume File 85 | 86 | WorldEnd 87 | -------------------------------------------------------------------------------- /templates/luxrender_standard.lxs: -------------------------------------------------------------------------------- 1 | # Main Scene File 2 | 3 | Renderer "sampler" 4 | 5 | Sampler "lowdiscrepancy" 6 | "integer pixelsamples" [16] 7 | "string pixelsampler" ["lowdiscrepancy"] 8 | "bool noiseaware" ["false"] 9 | 10 | Accelerator "qbvh" 11 | 12 | SurfaceIntegrator "bidirectional" 13 | "integer eyedepth" [16] 14 | "integer lightdepth" [16] 15 | "integer lightraycount" [1] 16 | "string lightpathstrategy" ["auto"] 17 | "string lightstrategy" ["auto"] 18 | 19 | VolumeIntegrator "single" 20 | 21 | PixelFilter "mitchell" 22 | "bool supersample" ["true"] 23 | "float B" [0.333333343267441] 24 | "float C" [0.333333343267441] 25 | "float xwidth" [2.000000000000000] 26 | "float ywidth" [2.000000000000000] 27 | 28 | #RaytracingCamera 29 | 30 | Camera "perspective" 31 | "float fov" [49.134342077604479] 32 | "float screenwindow" [-1.000000000000000 1.000000000000000 -0.562500000000000 0.562500000000000] 33 | "bool autofocus" ["false"] 34 | "float shutteropen" [0.000000000000000] 35 | "float shutterclose" [0.041666666666667] 36 | 37 | Film "fleximage" 38 | "integer xresolution" [960] 39 | "integer yresolution" [540] 40 | "float gamma" [2.200000000000000] 41 | "float colorspace_white" [0.314275000000000 0.329411000000000] 42 | "float colorspace_red" [0.630000000000000 0.340000000000000] 43 | "float colorspace_green" [0.310000000000000 0.595000000000000] 44 | "float colorspace_blue" [0.155000000000000 0.070000000000000] 45 | "string filename" ["outdoor.Scene.00001"] 46 | "bool write_resume_flm" ["false"] 47 | "bool restart_resume_flm" ["false"] 48 | "bool write_flm_direct" ["false"] 49 | "bool write_exr_halftype" ["false"] 50 | "bool write_exr_applyimaging" ["true"] 51 | "bool write_exr_ZBuf" ["false"] 52 | "string write_exr_compressiontype" ["PIZ (lossless)"] 53 | "string write_exr_zbuf_normalizationtype" ["None"] 54 | "bool write_exr" ["false"] 55 | "string write_exr_channels" ["RGB"] 56 | "bool write_png" ["true"] 57 | "string write_png_channels" ["RGB"] 58 | "bool write_png_16bit" ["false"] 59 | "bool write_tga" ["false"] 60 | "string write_tga_channels" ["RGB"] 61 | "string ldr_clamp_method" ["cut"] 62 | "integer displayinterval" [10] 63 | "integer writeinterval" [180] 64 | "integer flmwriteinterval" [900] 65 | "integer outlierrejection_k" [2] 66 | "integer tilecount" [0] 67 | "string tonemapkernel" ["autolinear"] 68 | #"string tonemapkernel" ["nop"] # alternative 69 | 70 | WorldBegin 71 | 72 | # Materials File 73 | 74 | MakeNamedMaterial "ground" 75 | "float uroughness" [0.075000002980232] 76 | "float vroughness" [0.075000002980232] 77 | "string name" ["amorphous carbon"] 78 | "string type" ["metal"] 79 | 80 | # Geometry File 81 | 82 | #RaytracingContent 83 | 84 | 85 | # Volume File 86 | 87 | AttributeBegin # "Lamp" 88 | 89 | LightGroup "Sky" 90 | 91 | LightSource "infinite" 92 | "float gain" [0.5] 93 | "float color" [0.3 0.3 0.3] 94 | 95 | AttributeEnd # "" 96 | WorldEnd 97 | -------------------------------------------------------------------------------- /templates/luxrender_sunlight.lxs: -------------------------------------------------------------------------------- 1 | # Main Scene File 2 | 3 | Renderer "sampler" 4 | 5 | Sampler "lowdiscrepancy" 6 | "integer pixelsamples" [16] 7 | "string pixelsampler" ["lowdiscrepancy"] 8 | "bool noiseaware" ["false"] 9 | 10 | Accelerator "qbvh" 11 | 12 | SurfaceIntegrator "bidirectional" 13 | "integer eyedepth" [16] 14 | "integer lightdepth" [16] 15 | "integer lightraycount" [1] 16 | "string lightpathstrategy" ["auto"] 17 | "string lightstrategy" ["auto"] 18 | 19 | VolumeIntegrator "single" 20 | 21 | PixelFilter "mitchell" 22 | "bool supersample" ["true"] 23 | "float B" [0.333333343267441] 24 | "float C" [0.333333343267441] 25 | "float xwidth" [2.000000000000000] 26 | "float ywidth" [2.000000000000000] 27 | 28 | #RaytracingCamera 29 | 30 | Camera "perspective" 31 | "float fov" [49.134342077604479] 32 | "float screenwindow" [-1.000000000000000 1.000000000000000 -0.562500000000000 0.562500000000000] 33 | "bool autofocus" ["false"] 34 | "float shutteropen" [0.000000000000000] 35 | "float shutterclose" [0.041666666666667] 36 | 37 | Film "fleximage" 38 | "integer xresolution" [960] 39 | "integer yresolution" [540] 40 | "float gamma" [2.200000000000000] 41 | "float colorspace_white" [0.314275000000000 0.329411000000000] 42 | "float colorspace_red" [0.630000000000000 0.340000000000000] 43 | "float colorspace_green" [0.310000000000000 0.595000000000000] 44 | "float colorspace_blue" [0.155000000000000 0.070000000000000] 45 | "string filename" ["outdoor.Scene.00001"] 46 | "bool write_resume_flm" ["false"] 47 | "bool restart_resume_flm" ["false"] 48 | "bool write_flm_direct" ["false"] 49 | "bool write_exr_halftype" ["false"] 50 | "bool write_exr_applyimaging" ["true"] 51 | "bool write_exr_ZBuf" ["false"] 52 | "string write_exr_compressiontype" ["PIZ (lossless)"] 53 | "string write_exr_zbuf_normalizationtype" ["None"] 54 | "bool write_exr" ["false"] 55 | "string write_exr_channels" ["RGB"] 56 | "bool write_png" ["true"] 57 | "string write_png_channels" ["RGB"] 58 | "bool write_png_16bit" ["false"] 59 | "bool write_tga" ["false"] 60 | "string write_tga_channels" ["RGB"] 61 | "string ldr_clamp_method" ["cut"] 62 | "integer displayinterval" [10] 63 | "integer writeinterval" [180] 64 | "integer flmwriteinterval" [900] 65 | "integer outlierrejection_k" [2] 66 | "integer tilecount" [0] 67 | "string tonemapkernel" ["autolinear"] 68 | 69 | WorldBegin 70 | 71 | # Materials File 72 | 73 | MakeNamedMaterial "ground" 74 | "float uroughness" [0.075000002980232] 75 | "float vroughness" [0.075000002980232] 76 | "string name" ["amorphous carbon"] 77 | "string type" ["metal"] 78 | 79 | # Geometry File 80 | 81 | #RaytracingContent 82 | 83 | 84 | # Volume File 85 | 86 | AttributeBegin # "Lamp" 87 | 88 | LightGroup "Sunlight" 89 | 90 | LightSource "sunsky2" 91 | "float gain" [1.000000000000000] 92 | "float importance" [2.000000000000000] 93 | "integer nsamples" [1] 94 | "float turbidity" [2.200000047683716] 95 | "vector sundir" [0.028625251725316 -0.011037390679121 0.040162373334169] 96 | 97 | AttributeEnd # "" 98 | WorldEnd 99 | -------------------------------------------------------------------------------- /templates/ospray_flat.sg: -------------------------------------------------------------------------------- 1 | { 2 | "world": { 3 | "type": "WORLD", 4 | "children": [ 5 | %RaytracingCamera% 6 | %RaytracingContent% 7 | {"type": 9999, "name": "End-of-world"} 8 | ] 9 | }, 10 | "lightsManager": { 11 | "name": "lights", 12 | "type": "LIGHTS", 13 | "subType": "lights", 14 | "children": [] 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /templates/ospray_standard.sg: -------------------------------------------------------------------------------- 1 | { 2 | "world": { 3 | "type": "WORLD", 4 | "children": [ 5 | %RaytracingCamera% 6 | %RaytracingContent% 7 | {"type": 9999, "name": "End-of-world"} 8 | ] 9 | }, 10 | "lightsManager": { 11 | "name": "lights", 12 | "type": "LIGHTS", 13 | "subType": "lights", 14 | "children": [ 15 | { 16 | "name": "template_ambient", 17 | "description": "Ambient light", 18 | "type": 15, 19 | "subType": "ambient", 20 | "children": [ 21 | { 22 | "description": "whether the light can be seen directly", 23 | "name": "visible", 24 | "sgOnly": false, 25 | "subType": "bool", 26 | "type": 1, 27 | "value": true 28 | }, 29 | { 30 | "description": "intensity of the light (a factor)", 31 | "name": "intensity", 32 | "sgOnly": false, 33 | "subType": "float", 34 | "type": 1, 35 | "value": 1.0 36 | }, 37 | { 38 | "description": "color of the light", 39 | "name": "color", 40 | "sgOnly": false, 41 | "subType": "rgb", 42 | "type": 1, 43 | "value": [0.2, 0.2, 0.2] 44 | }, 45 | { 46 | "description": "OSPRay light type", 47 | "name": "type", 48 | "sgOnly": true, 49 | "subType": "string", 50 | "type": 1, 51 | "value": "ambient" 52 | } 53 | ] 54 | } 55 | ] 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /templates/ospray_studio_dark.sg: -------------------------------------------------------------------------------- 1 | { 2 | "world": { 3 | "type": "WORLD", 4 | "children": [ 5 | %RaytracingCamera% 6 | %RaytracingContent% 7 | {"type": 9999, "name": "End-of-world"} 8 | ] 9 | }, 10 | "lightsManager": { 11 | "name": "lights", 12 | "type": "LIGHTS", 13 | "subType": "lights", 14 | "children": [ 15 | { 16 | "name": "template_ambient", 17 | "description": "Ambient light", 18 | "type": 15, 19 | "subType": "ambient", 20 | "children": [ 21 | { 22 | "description": "whether the light can be seen directly", 23 | "name": "visible", 24 | "sgOnly": false, 25 | "subType": "bool", 26 | "type": 1, 27 | "value": true 28 | }, 29 | { 30 | "description": "intensity of the light (a factor)", 31 | "name": "intensity", 32 | "sgOnly": false, 33 | "subType": "float", 34 | "type": 1, 35 | "value": 1.0 36 | }, 37 | { 38 | "description": "color of the light", 39 | "name": "color", 40 | "sgOnly": false, 41 | "subType": "rgb", 42 | "type": 1, 43 | "value": [0.01, 0.01, 0.01] 44 | }, 45 | { 46 | "description": "OSPRay light type", 47 | "name": "type", 48 | "sgOnly": true, 49 | "subType": "string", 50 | "type": 1, 51 | "value": "ambient" 52 | } 53 | ] 54 | }, 55 | { 56 | "name": "KEY", 57 | "description": "Key light", 58 | "type": 15, 59 | "subType": "distant", 60 | "children": [ 61 | { 62 | "name": "color", 63 | "subType": "rgb", 64 | "type": "PARAMETER", 65 | "value": [1.0, 1.0, 1.0] 66 | }, 67 | { 68 | "name": "direction", 69 | "subType": "vec3f", 70 | "type": "PARAMETER", 71 | "value": [-1.0, -1.5, -1.0] 72 | }, 73 | { 74 | "name": "intensity", 75 | "subType": "float", 76 | "type": "PARAMETER", 77 | "value": 3.0 78 | }, 79 | { 80 | "name": "angularDiameter", 81 | "subType": "float", 82 | "type": "PARAMETER", 83 | "value": 5.0 84 | }, 85 | { 86 | "name": "visible", 87 | "subType": "bool", 88 | "type": "PARAMETER", 89 | "value": false 90 | } 91 | ] 92 | }, 93 | { 94 | "name": "FILL", 95 | "description": "Fill light", 96 | "type": 15, 97 | "subType": "distant", 98 | "children": [ 99 | { 100 | "name": "color", 101 | "subType": "rgb", 102 | "type": "PARAMETER", 103 | "value": [1.0, 1.0, 1.0] 104 | }, 105 | { 106 | "name": "direction", 107 | "subType": "vec3f", 108 | "type": "PARAMETER", 109 | "value": [1.0, -0.5, -1.0] 110 | }, 111 | { 112 | "name": "intensity", 113 | "subType": "float", 114 | "type": "PARAMETER", 115 | "value": 1.0 116 | }, 117 | { 118 | "name": "angularDiameter", 119 | "subType": "float", 120 | "type": "PARAMETER", 121 | "value": 90.0 122 | }, 123 | { 124 | "name": "visible", 125 | "subType": "bool", 126 | "type": "PARAMETER", 127 | "value": false 128 | } 129 | ] 130 | }, 131 | { 132 | "name": "RIM", 133 | "description": "Rim light", 134 | "type": 15, 135 | "subType": "distant", 136 | "children": [ 137 | { 138 | "name": "color", 139 | "subType": "rgb", 140 | "type": "PARAMETER", 141 | "value": [1.0, 1.0, 1.0] 142 | }, 143 | { 144 | "name": "direction", 145 | "subType": "vec3f", 146 | "type": "PARAMETER", 147 | "value": [0.0, 0.0, 1.0] 148 | }, 149 | { 150 | "name": "intensity", 151 | "subType": "float", 152 | "type": "PARAMETER", 153 | "value": 0.3 154 | }, 155 | { 156 | "name": "angularDiameter", 157 | "subType": "float", 158 | "type": "PARAMETER", 159 | "value": 20.0 160 | }, 161 | { 162 | "name": "visible", 163 | "subType": "bool", 164 | "type": "PARAMETER", 165 | "value": false 166 | } 167 | ] 168 | } 169 | ] 170 | } 171 | } 172 | -------------------------------------------------------------------------------- /templates/ospray_studio_light.sg: -------------------------------------------------------------------------------- 1 | { 2 | "world": { 3 | "type": "WORLD", 4 | "children": [ 5 | %RaytracingCamera% 6 | %RaytracingContent% 7 | {"type": 9999, "name": "End-of-world"} 8 | ] 9 | }, 10 | "lightsManager": { 11 | "name": "lights", 12 | "type": "LIGHTS", 13 | "subType": "lights", 14 | "children": [ 15 | { 16 | "name": "template_ambient", 17 | "description": "Ambient light", 18 | "type": 15, 19 | "subType": "ambient", 20 | "children": [ 21 | { 22 | "description": "whether the light can be seen directly", 23 | "name": "visible", 24 | "sgOnly": false, 25 | "subType": "bool", 26 | "type": 1, 27 | "value": true 28 | }, 29 | { 30 | "description": "intensity of the light (a factor)", 31 | "name": "intensity", 32 | "sgOnly": false, 33 | "subType": "float", 34 | "type": 1, 35 | "value": 2.0 36 | }, 37 | { 38 | "description": "color of the light", 39 | "name": "color", 40 | "sgOnly": false, 41 | "subType": "rgb", 42 | "type": 1, 43 | "value": [0.58, 0.58, 0.58] 44 | }, 45 | { 46 | "description": "OSPRay light type", 47 | "name": "type", 48 | "sgOnly": true, 49 | "subType": "string", 50 | "type": 1, 51 | "value": "ambient" 52 | } 53 | ] 54 | }, 55 | { 56 | "name": "KEY", 57 | "description": "Key light", 58 | "type": 15, 59 | "subType": "distant", 60 | "children": [ 61 | { 62 | "name": "color", 63 | "subType": "rgb", 64 | "type": "PARAMETER", 65 | "value": [1.0, 1.0, 1.0] 66 | }, 67 | { 68 | "name": "direction", 69 | "subType": "vec3f", 70 | "type": "PARAMETER", 71 | "value": [-1.0, -1.5, -1.0] 72 | }, 73 | { 74 | "name": "intensity", 75 | "subType": "float", 76 | "type": "PARAMETER", 77 | "value": 3.0 78 | }, 79 | { 80 | "name": "angularDiameter", 81 | "subType": "float", 82 | "type": "PARAMETER", 83 | "value": 5.0 84 | }, 85 | { 86 | "name": "visible", 87 | "subType": "bool", 88 | "type": "PARAMETER", 89 | "value": false 90 | } 91 | ] 92 | }, 93 | { 94 | "name": "FILL", 95 | "description": "Fill light", 96 | "type": 15, 97 | "subType": "distant", 98 | "children": [ 99 | { 100 | "name": "color", 101 | "subType": "rgb", 102 | "type": "PARAMETER", 103 | "value": [1.0, 1.0, 1.0] 104 | }, 105 | { 106 | "name": "direction", 107 | "subType": "vec3f", 108 | "type": "PARAMETER", 109 | "value": [1.0, -0.5, -1.0] 110 | }, 111 | { 112 | "name": "intensity", 113 | "subType": "float", 114 | "type": "PARAMETER", 115 | "value": 1.0 116 | }, 117 | { 118 | "name": "angularDiameter", 119 | "subType": "float", 120 | "type": "PARAMETER", 121 | "value": 90.0 122 | }, 123 | { 124 | "name": "visible", 125 | "subType": "bool", 126 | "type": "PARAMETER", 127 | "value": false 128 | } 129 | ] 130 | }, 131 | { 132 | "name": "RIM", 133 | "description": "Rim light", 134 | "type": 15, 135 | "subType": "distant", 136 | "children": [ 137 | { 138 | "name": "color", 139 | "subType": "rgb", 140 | "type": "PARAMETER", 141 | "value": [1.0, 1.0, 1.0] 142 | }, 143 | { 144 | "name": "direction", 145 | "subType": "vec3f", 146 | "type": "PARAMETER", 147 | "value": [0.0, 0.0, 1.0] 148 | }, 149 | { 150 | "name": "intensity", 151 | "subType": "float", 152 | "type": "PARAMETER", 153 | "value": 0.3 154 | }, 155 | { 156 | "name": "angularDiameter", 157 | "subType": "float", 158 | "type": "PARAMETER", 159 | "value": 20.0 160 | }, 161 | { 162 | "name": "visible", 163 | "subType": "bool", 164 | "type": "PARAMETER", 165 | "value": false 166 | } 167 | ] 168 | } 169 | ] 170 | } 171 | } 172 | -------------------------------------------------------------------------------- /templates/ospray_sunlight.sg: -------------------------------------------------------------------------------- 1 | { 2 | "world": { 3 | "type": "WORLD", 4 | "children": [ 5 | %RaytracingCamera% 6 | %RaytracingContent% 7 | {"type": 9999, "name": "End-of-world"} 8 | ] 9 | }, 10 | "lightsManager": { 11 | "name": "lights", 12 | "type": "LIGHTS", 13 | "subType": "lights", 14 | "children": [ 15 | { 16 | "name": "template_sunsky", 17 | "description": "Sunsky light", 18 | "type": "LIGHT", 19 | "subType": "sunSky", 20 | "children": [ 21 | { 22 | "description": "whether the light can be seen directly", 23 | "name": "visible", 24 | "sgOnly": false, 25 | "subType": "bool", 26 | "type": "PARAMETER", 27 | "value": true 28 | }, 29 | { 30 | "description": "intensity of the light (a factor)", 31 | "name": "intensity", 32 | "sgOnly": false, 33 | "subType": "float", 34 | "type": "PARAMETER", 35 | "value": 0.05 36 | }, 37 | { 38 | "description": "color of the light", 39 | "name": "color", 40 | "sgOnly": false, 41 | "subType": "rgb", 42 | "type": "PARAMETER", 43 | "value": [1.0, 1.0, 1.0] 44 | }, 45 | { 46 | "description": "OSPRay light type", 47 | "name": "type", 48 | "sgOnly": true, 49 | "subType": "string", 50 | "type": "PARAMETER", 51 | "value": "sunSky" 52 | }, 53 | { 54 | "description": "Up direction", 55 | "name": "up", 56 | "sgOnly": false, 57 | "subType": "vec3f", 58 | "type": "PARAMETER", 59 | "value": [0.0, 1.0, 0.0] 60 | }, 61 | { 62 | "description": "Right direction", 63 | "name": "right", 64 | "sgOnly": true, 65 | "subType": "vec3f", 66 | "type": "PARAMETER", 67 | "value": [1.0, 0.0, 0.0] 68 | }, 69 | { 70 | "description": "Angle to horizon", 71 | "name": "elevation", 72 | "sgOnly": true, 73 | "subType": "float", 74 | "type": "PARAMETER", 75 | "value": 52.62431376309268 76 | }, 77 | { 78 | "description": "Angle to North", 79 | "name": "azimuth", 80 | "sgOnly": true, 81 | "subType": "float", 82 | "type": "PARAMETER", 83 | "value": 111.08575684686511 84 | }, 85 | { 86 | "description": "Turbidity", 87 | "name": "turbidity", 88 | "sgOnly": false, 89 | "subType": "float", 90 | "type": "PARAMETER", 91 | "value": 2.0 92 | } 93 | ] 94 | } 95 | ] 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /templates/pbrt_flat.pbrt: -------------------------------------------------------------------------------- 1 | # RaytracingCamera (do not remove) 2 | 3 | Sampler "halton" "integer pixelsamples" [32] 4 | Integrator "path" "integer maxdepth" [6] 5 | ColorSpace "srgb" 6 | Film "rgb" 7 | "integer xresolution" [@@WIDTH@@] 8 | "integer yresolution" [@@HEIGHT@@] 9 | 10 | WorldBegin 11 | 12 | # RaytracingContent (do not remove) 13 | 14 | 15 | # Generated by FreeCAD (http://www.freecadweb.org/) 16 | -------------------------------------------------------------------------------- /templates/pbrt_standard.pbrt: -------------------------------------------------------------------------------- 1 | # RaytracingCamera (do not remove) 2 | 3 | Sampler "halton" "integer pixelsamples" [32] 4 | Integrator "path" "integer maxdepth" [6] 5 | ColorSpace "srgb" 6 | Film "rgb" 7 | "integer xresolution" [@@WIDTH@@] 8 | "integer yresolution" [@@HEIGHT@@] 9 | 10 | WorldBegin 11 | 12 | # Uniform grayish illumination from all directions 13 | LightSource "infinite" "rgb L" [.4 .4 .4] 14 | 15 | # RaytracingContent (do not remove) 16 | 17 | 18 | # Generated by FreeCAD (http://www.freecadweb.org/) 19 | -------------------------------------------------------------------------------- /templates/pbrt_studio_dark.pbrt: -------------------------------------------------------------------------------- 1 | # RaytracingCamera (do not remove) 2 | 3 | Sampler "halton" "integer pixelsamples" [32] 4 | Integrator "path" "integer maxdepth" [6] 5 | ColorSpace "srgb" 6 | Film "rgb" 7 | "integer xresolution" [@@WIDTH@@] 8 | "integer yresolution" [@@HEIGHT@@] 9 | 10 | WorldBegin 11 | 12 | # Uniform grayish illumination from all directions 13 | LightSource "infinite" "rgb L" [.01 .01 .01] 14 | LightSource "distant" 15 | # KEY 16 | "blackbody L" [6500] 17 | "float scale" 4 18 | "point3 from" [0 0 0] 19 | "point3 to" [-1 1 -1.5] 20 | LightSource "distant" 21 | # FILL 22 | "blackbody L" [6500] 23 | "float scale" 1 24 | "point3 from" [0 0 0] 25 | "point3 to" [1 1 -0.5] 26 | LightSource "distant" 27 | # RIM 28 | "blackbody L" [6500] 29 | "float scale" 1 30 | "point3 from" [0 0 0] 31 | "point3 to" [0 -1 0] 32 | LightSource "distant" 33 | # UP (additional) 34 | "blackbody L" [6500] 35 | "float scale" 1 36 | "point3 from" [0 0 0] 37 | "point3 to" [0 0 -1] 38 | LightSource "distant" 39 | # DOWN (additional) 40 | "blackbody L" [6500] 41 | "float scale" 1 42 | "point3 from" [0 0 0] 43 | "point3 to" [0 0 1] 44 | # RaytracingContent (do not remove) 45 | 46 | 47 | # Generated by FreeCAD (http://www.freecadweb.org/) 48 | -------------------------------------------------------------------------------- /templates/pbrt_studio_light.pbrt: -------------------------------------------------------------------------------- 1 | # RaytracingCamera (do not remove) 2 | 3 | Sampler "halton" "integer pixelsamples" [32] 4 | Integrator "path" "integer maxdepth" [6] 5 | ColorSpace "srgb" 6 | Film "rgb" 7 | "integer xresolution" [@@WIDTH@@] 8 | "integer yresolution" [@@HEIGHT@@] 9 | 10 | WorldBegin 11 | 12 | # Uniform grayish illumination from all directions 13 | LightSource "infinite" "rgb L" [.3 .3 .3] 14 | LightSource "distant" 15 | # KEY 16 | "blackbody L" [6500] 17 | "float scale" 4 18 | "point3 from" [0 0 0] 19 | "point3 to" [-1 1 -1.5] 20 | LightSource "distant" 21 | # FILL 22 | "blackbody L" [6500] 23 | "float scale" 1 24 | "point3 from" [0 0 0] 25 | "point3 to" [1 1 -0.5] 26 | LightSource "distant" 27 | # RIM 28 | "blackbody L" [6500] 29 | "float scale" 1 30 | "point3 from" [0 0 0] 31 | "point3 to" [0 -1 0] 32 | LightSource "distant" 33 | # UP (additional) 34 | "blackbody L" [6500] 35 | "float scale" 1 36 | "point3 from" [0 0 0] 37 | "point3 to" [0 0 -1] 38 | LightSource "distant" 39 | # DOWN (additional) 40 | "blackbody L" [6500] 41 | "float scale" 1 42 | "point3 from" [0 0 0] 43 | "point3 to" [0 0 1] 44 | # RaytracingContent (do not remove) 45 | 46 | 47 | # Generated by FreeCAD (http://www.freecadweb.org/) 48 | -------------------------------------------------------------------------------- /templates/pbrt_sunlight.pbrt: -------------------------------------------------------------------------------- 1 | # RaytracingCamera (do not remove) 2 | 3 | Sampler "halton" "integer pixelsamples" [32] 4 | Integrator "path" "integer maxdepth" [6] 5 | ColorSpace "srgb" 6 | Film "rgb" 7 | "integer xresolution" [@@WIDTH@@] 8 | "integer yresolution" [@@HEIGHT@@] 9 | 10 | WorldBegin 11 | 12 | # Sun-sky light (approximation) 13 | LightSource "infinite" 14 | "rgb L" [0.53 0.81 0.92] 15 | "float scale" 0.5 16 | LightSource "distant" 17 | "blackbody L" [6500] 18 | "float scale" 4 19 | "point3 from" [0 0 0] 20 | "point3 to" [-0.5663931812853344 0.21839119110025676 -0.7946722921074382] 21 | 22 | # RaytracingContent (do not remove) 23 | 24 | 25 | # Generated by FreeCAD (http://www.freecadweb.org/) 26 | -------------------------------------------------------------------------------- /templates/povray_flat.pov: -------------------------------------------------------------------------------- 1 | // Persistence of Vision Ray Tracer Scene Description File 2 | // for FreeCAD (http://www.freecadweb.org) 3 | 4 | #version 3.6; 5 | 6 | #include "colors.inc" 7 | #include "metals.inc" 8 | #include "rad_def.inc" 9 | 10 | global_settings { 11 | radiosity { 12 | Rad_Settings(Radiosity_OutdoorHQ,off,off) 13 | } 14 | assumed_gamma 1.0 15 | subsurface {} 16 | } 17 | 18 | #default {finish{ambient 0}} 19 | 20 | 21 | // Standard finish 22 | #declare StdFinish = finish {}; 23 | 24 | //RaytracingCamera 25 | //RaytracingContent 26 | -------------------------------------------------------------------------------- /templates/povray_standard.pov: -------------------------------------------------------------------------------- 1 | // Persistence of Vision Ray Tracer Scene Description File 2 | // for FreeCAD (http://www.freecadweb.org) 3 | 4 | #version 3.6; 5 | 6 | #include "colors.inc" 7 | #include "metals.inc" 8 | #include "rad_def.inc" 9 | 10 | global_settings { 11 | radiosity { 12 | Rad_Settings(Radiosity_OutdoorHQ,off,off) 13 | } 14 | assumed_gamma 1.0 15 | subsurface {} 16 | } 17 | 18 | #default {finish{ambient 0}} 19 | 20 | sky_sphere { 21 | pigment { 22 | gradient y 23 | color_map { 24 | [0.0 color LightGray] 25 | [0.3 color White] 26 | [0.7 color LightGray] 27 | } 28 | } 29 | } 30 | 31 | // Standard finish 32 | #declare StdFinish = finish {}; 33 | 34 | //RaytracingCamera 35 | //RaytracingContent 36 | -------------------------------------------------------------------------------- /templates/povray_studio_dark.pov: -------------------------------------------------------------------------------- 1 | // Persistence of Vision Ray Tracer Scene Description File 2 | // for FreeCAD (http://www.freecadweb.org) 3 | 4 | #version 3.6; 5 | 6 | #include "colors.inc" 7 | #include "metals.inc" 8 | #include "rad_def.inc" 9 | 10 | global_settings { 11 | radiosity { 12 | Rad_Settings(Radiosity_OutdoorHQ,off,off) 13 | } 14 | assumed_gamma 1.0 15 | subsurface {} 16 | } 17 | 18 | #default {finish{ambient 0}} 19 | 20 | sky_sphere { 21 | pigment { 22 | gradient y 23 | color_map { 24 | [0.0 color rgb <0.02, 0.02, 0.02>] 25 | [0.3 color rgb <0.02, 0.02, 0.02>] 26 | [0.7 color rgb <0.02, 0.02, 0.02>] 27 | } 28 | } 29 | } 30 | light_source { 31 | <+1e9,+1.5e9,-1e9> 32 | color rgb <0.5,0.5,0.5> 33 | parallel 34 | point_at <0,0,0> 35 | adaptive 1 36 | } 37 | light_source { 38 | <-1e9,+0.5e9,-1e9> 39 | color rgb <0.2,0.2,0.2> shadowless 40 | parallel 41 | point_at <0,0,0> 42 | adaptive 1 43 | } 44 | light_source { 45 | <0e9,0e9,+1e9> 46 | color rgb <0.2,0.2,0.2> shadowless 47 | parallel 48 | point_at <0,0,0> 49 | adaptive 1 50 | } 51 | // Standard finish 52 | #declare StdFinish = finish {}; 53 | 54 | //RaytracingCamera 55 | //RaytracingContent 56 | -------------------------------------------------------------------------------- /templates/povray_studio_light.pov: -------------------------------------------------------------------------------- 1 | // Persistence of Vision Ray Tracer Scene Description File 2 | // for FreeCAD (http://www.freecadweb.org) 3 | 4 | #version 3.6; 5 | 6 | #include "colors.inc" 7 | #include "metals.inc" 8 | #include "rad_def.inc" 9 | 10 | global_settings { 11 | radiosity { 12 | Rad_Settings(Radiosity_OutdoorHQ,off,off) 13 | } 14 | assumed_gamma 1.0 15 | subsurface {} 16 | } 17 | 18 | #default {finish{ambient 0}} 19 | 20 | sky_sphere { 21 | pigment { 22 | gradient y 23 | color_map { 24 | [0.0 color rgb <0.3, 0.3, 0.3>] 25 | [0.3 color rgb <0.3, 0.3, 0.3>] 26 | [0.7 color rgb <0.3, 0.3, 0.3>] 27 | } 28 | } 29 | } 30 | light_source { 31 | <+1e9,+1.5e9,-1e9> 32 | color rgb <0.5,0.5,0.5> 33 | parallel 34 | point_at <0,0,0> 35 | adaptive 1 36 | } 37 | light_source { 38 | <-1e9,+0.5e9,-1e9> 39 | color rgb <0.1,0.1,0.1> shadowless 40 | parallel 41 | point_at <0,0,0> 42 | adaptive 1 43 | } 44 | light_source { 45 | <0e9,0e9,+1e9> 46 | color rgb <0.1,0.1,0.1> shadowless 47 | parallel 48 | point_at <0,0,0> 49 | adaptive 1 50 | } 51 | // Standard finish 52 | #declare StdFinish = finish {}; 53 | 54 | //RaytracingCamera 55 | //RaytracingContent 56 | -------------------------------------------------------------------------------- /templates/povray_sunlight.pov: -------------------------------------------------------------------------------- 1 | // Persistence of Vision Ray Tracer Scene Description File 2 | // for FreeCAD (http://www.freecadweb.org) 3 | 4 | #version 3.6; 5 | 6 | #include "colors.inc" 7 | #include "metals.inc" 8 | #include "rad_def.inc" 9 | 10 | global_settings { 11 | radiosity { 12 | Rad_Settings(Radiosity_Normal,off,off) 13 | } 14 | assumed_gamma 1.0 15 | subsurface {} 16 | } 17 | 18 | #default {finish{ambient 0}} 19 | 20 | // Sky 21 | sky_sphere{ 22 | pigment{ gradient y 23 | color_map{ 24 | [0.0 color rgb<1,1,1> ] 25 | [0.8 color rgb<0.18,0.28,0.75>] 26 | [1.0 color rgb<0.75,0.75,0.75>]} 27 | //[1.0 color rgb<0.15,0.28,0.75>]} 28 | scale 2 29 | translate -1 30 | } // end pigment 31 | } // end sky_sphere 32 | 33 | // Sun 34 | global_settings { ambient_light rgb<1, 1, 1> } 35 | light_source { 36 | <85525370374085.5,119995516108223.16,-32977069856138.77> 37 | color rgb <1,1,1> 38 | parallel 39 | point_at <0,0,0> 40 | adaptive 1 41 | } 42 | 43 | 44 | // Standard finish 45 | #declare StdFinish = finish { crand 0.01 diffuse 0.8 }; 46 | 47 | //RaytracingContent 48 | -------------------------------------------------------------------------------- /wheelhouse/README.md: -------------------------------------------------------------------------------- 1 | Additional wheels for missing wheels in PyPI 2 | -------------------------------------------------------------------------------- /wheelhouse/materialx-1.38.10-cp312-cp312-macosx_11_0_arm64.whl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreeCAD/FreeCAD-render/5e33146bcf18166846cd88ec3fc28cc97df4f8bb/wheelhouse/materialx-1.38.10-cp312-cp312-macosx_11_0_arm64.whl -------------------------------------------------------------------------------- /wheelhouse/materialx-1.38.10-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreeCAD/FreeCAD-render/5e33146bcf18166846cd88ec3fc28cc97df4f8bb/wheelhouse/materialx-1.38.10-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -------------------------------------------------------------------------------- /wheelhouse/materialx-1.38.10-cp312-cp312-win_amd64.whl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreeCAD/FreeCAD-render/5e33146bcf18166846cd88ec3fc28cc97df4f8bb/wheelhouse/materialx-1.38.10-cp312-cp312-win_amd64.whl -------------------------------------------------------------------------------- /wheelhouse/materialx-1.38.10-cp313-cp313-manylinux_2_28_x86_64.whl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreeCAD/FreeCAD-render/5e33146bcf18166846cd88ec3fc28cc97df4f8bb/wheelhouse/materialx-1.38.10-cp313-cp313-manylinux_2_28_x86_64.whl -------------------------------------------------------------------------------- /wheelhouse/renderplugin-0.0.1-py2.py3-none-any.whl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreeCAD/FreeCAD-render/5e33146bcf18166846cd88ec3fc28cc97df4f8bb/wheelhouse/renderplugin-0.0.1-py2.py3-none-any.whl -------------------------------------------------------------------------------- /wheelhouse/renderplugin-0.0.1.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreeCAD/FreeCAD-render/5e33146bcf18166846cd88ec3fc28cc97df4f8bb/wheelhouse/renderplugin-0.0.1.tar.gz --------------------------------------------------------------------------------