Raytracing Workbench/de: Difference between revisions

From FreeCAD Documentation
(Languages in alphabetic order)
(Updating to match new version of source page)
(35 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<languages/>
{{docnav|[[Points Workbench|Points Workbench]]|[[Reverse Engineering Workbench|Reverse Engineering Workbench]]|IconL=PointsWorkbench.svg|IconR=ReverseEngineeringWorkbench.svg}}

[[Image:Workbench_Raytracing.svg|64px]]

<div class="mw-translate-fuzzy">
Dieses Modul hat zum Ziel, die Inhalte Ihrer angezeigten Scene an eine externe [http://de.wikipedia.org/wiki/Bildsynthese Render-Software] zu schicken, um so eine Foto-Realistische Darstellung Ihrer Arbeit zu erzeugen. Das Raytracing-modul ist noch in einem frühen Entwicklungsstadium, daher stehen im Moment noch nicht viele Optionen zur Verfügung. Derzeit gibt es nur einen begrenzten Satz an Werkzeugen zum Export Part-Objekte als [http://de.wikipedia.org/wiki/POV-Ray POV-ray] -dateien. Diese Dateien können dann in POV-ray geladen werden und dort gerendert werden.
Dieses Modul hat zum Ziel, die Inhalte Ihrer angezeigten Scene an eine externe [http://de.wikipedia.org/wiki/Bildsynthese Render-Software] zu schicken, um so eine Foto-Realistische Darstellung Ihrer Arbeit zu erzeugen. Das Raytracing-modul ist noch in einem frühen Entwicklungsstadium, daher stehen im Moment noch nicht viele Optionen zur Verfügung. Derzeit gibt es nur einen begrenzten Satz an Werkzeugen zum Export Part-Objekte als [http://de.wikipedia.org/wiki/POV-Ray POV-ray] -dateien. Diese Dateien können dann in POV-ray geladen werden und dort gerendert werden.
</div>

The Raytracing Workbench works with [[Raytracing templates|templates]], which are project files that define a scene for your 3D model. You can place lights and geometry such as ground planes, and it also contains placeholders for the position of the camera, and for the material information of the objects in the scene. The project can then be exported to a ready-to-render file, or be rendered directly within FreeCAD.

Currently, two renderers are supported: [http://en.wikipedia.org/wiki/POV-Ray povray] and [http://en.wikipedia.org/wiki/LuxRender luxrender]. To be able to render from within FreeCAD, at least one of these programs must be installed and configured in your system. However, if no renderer is installed, you will still be able to export a project file to be rendered at another time.

A new Render Workbench has been in development to support multiple back-ends such as Lux Renderer and Yafaray. Information for using the development version can be viewed at [[Render project|Render project]]. For development status of the Render Module look into the [[Raytracing project|Raytracing project]].

{{TOCright}}
[[Image:Raytracing_example.jpg|1024px]]

<div class="mw-translate-fuzzy">
== Typical workflow ==
# Create or open a FreeCAD project, add some [[Part Module|Part-based]] objects (meshes are currently not supported)
# Create a Raytracing project (luxrender or povray)
# Select the objects you wish to add to the raytracing project and add them to the project with the "Insert Part" tool
# Export or render directly
</div>


[[Image:Raytracing_Workbench_workflow.svg|600px]]


{{Caption|Workflow of the Raytracing Workbench; the workbench prepares a project file from a given template, and then calls an external program to produce the actual rendering of the scene. The external renderer can be used independently of FreeCAD.}}


=== GUI Werkzeuge ===
=== GUI Werkzeuge ===


===Project tools===
{{Raytracing Werkzeuge}}


These are the main tools for exporting your 3D work to external renderers.
* [[Image:Raytracing_New.png|32px]] [[Raytracing_New|New PovRay project]]: Insert new PovRay project in the document
* [[Image:Raytracing_Lux.png|32px]] [[Raytracing_Lux|New LuxRender project]]: Insert new LuxRender project in the document
* [[Image:Raytracing_InsertPart.png|32px]] [[Raytracing_InsertPart|Insert part]]: Insert a view of a Part in a raytracing project
* [[Image:Raytracing_ResetCamera.png|32px]] [[Raytracing_ResetCamera|Reset camera]]: Matches the camera position of a raytracing project to the current view
* [[Image:Raytracing_ExportProject.png|32px]] [[Raytracing_ExportProject|Export project]]: Exports a raytracing project to a scene file for rendering in an external renderer
* [[Image:Raytracing_Render.png|32px]] [[Raytracing_Render|Render]]: Renders a raytracing project with an external renderer


===Utilities===

These are helper tools to perform specific tasks manually.
* [[Image:Raytracing_Export.png|32px]] [[Raytracing_Export|Export view to povray]]: Write the active 3D view with camera and all its content to a povray file
* [[Image:Raytracing_Camera.png|32px]] [[Raytracing_Camera|Export camera to povray]]: Export the camera position of the active 3D view in POV-Ray format to a file
* [[Image:Raytracing_Part.png|32px]] [[Raytracing_Part|Export part to povray]]: Write the selected Part (object) as a povray file

== Preferences ==

* [[Image:Preferences-raytracing.svg|32px]] [[Raytracing_Preferences|Preferences]]: Preferences available in for the Raytracing tools.

== Tutorials ==
* [[Raytracing_tutorial|Basic Raytracing tutorial]]
* [[Tutorial FreeCAD POV ray|Intermediate Raytracing tutorial]]

<div class="mw-translate-fuzzy">
=== Exportieren einer Ansicht ===
=== Exportieren einer Ansicht ===


Der einfachste Weg ist, die aktuelle 3D-Ansicht mit allen Inhalten ine eine [http://www.povray.org/ Povray]-datei zu exportieren. Zuerst müssen Sie ihre CAD-Daten laden oder erstellen und deren Position und Orientierung in einer 3D-Ansicht wie gewünscht plazieren.
Der einfachste Weg ist, die aktuelle 3D-Ansicht mit allen Inhalten ine eine [http://www.povray.org/ Povray]-datei zu exportieren. Zuerst müssen Sie ihre CAD-Daten laden oder erstellen und deren Position und Orientierung in einer 3D-Ansicht wie gewünscht plazieren.
Dann wählen Sie "Ansicht nach PovRay exportieren" aus dem Raytracing Menu.
Dann wählen Sie "Ansicht nach PovRay exportieren" aus dem Raytracing Menu.
</div>


[[Image:FreeCAD_Raytracing.jpg|800px]]
[[Image:FreeCAD_Raytracing.jpg|center]]


Sie werden nach dem Ort gefragt,wo resultierende *.pov Datei gespeichert werden soll. Diese kann dann anschliessend mit [http://www.povray.org/ Povray] geöffnet und auch gerendert werden:
Sie werden nach dem Ort gefragt, wo die resultierende *.pov Datei gespeichert werden soll. Diese kann dann anschließend mit [http://www.povray.org/ Povray] geöffnet und auch gerendert werden:
[[Image:Povray.jpg|center]]

[[Image:Povray.jpg]]


Üblicherweise kann man mit einem Renderer große und schöne Bilder erstellen:
Üblicherweise kann man mit einem Renderer große und schöne Bilder erstellen:
[[Image:Scharniergreifer_render.jpg|center|800px]]

[[Image:Scharniergreifer_render.jpg|800px]]


=== Scripting ===
=== Scripting ===


Und so kann man diese Funktionen mittels Python nutzen:
Und so kann man diese Funktionen mittels Python nutzen:

import Raytracing,RaytracingGui
See the [[Raytracing API example|Raytracing API example]] for information on writing scenes programmatically.
OutFile = open('C:/Documents and Settings/jriegel/Desktop/test.pov','w')
OutFile.write(open(App.getResourceDir()+'Mod/Raytracing/Templates/ProjectStd.pov').read())
OutFile.write(RaytracingGui.povViewCamera())
OutFile.write(Raytracing.getPartAsPovray('Box',App.activeDocument().Box.Shape,0.800000,0.800000,0.800000))
OutFile.close()
del OutFile


=== Links ===
=== Links ===
Line 40: Line 87:
* http://de.wikipedia.org/wiki/POV-Ray
* http://de.wikipedia.org/wiki/POV-Ray


=== Luxrender ===
Über andere open-source-Render-Software (für spätere Implementierung):
* http://www.luxrender.net/


=== Future possible renderers to implement ===
* http://www.yafaray.org/
* http://www.yafaray.org/
* http://www.luxrender.net/
* http://www.mitsuba-renderer.org/
* http://www.kerkythea.net/
* http://www.artofillusion.org/

== Exporting to Kerkythea ==
Although direct export to the Kerkythea XML-File-Format is not supported yet, you can export your Objects as Mesh-Files (.obj) and then import them in Kerkythea.
* if using Kerkythea for Linux, remember to install the WINE-Package (needed by Kerkythea for Linux to run)
* you can convert your models with the help of the mesh workbench to meshes and then export these meshes as .obj-files
* If your mesh-export resulted in errors (flip of normals, holes ...) you may try your luck with [http://www.netfabb.com/downloadcenter.php?basic=1 netfabb studio basic]
:Free for personal use, available for Windows, Linux and Mac OSX.
:It has standard repair tools which will repair you model in most cases.
* another good program for mesh analysing/repairing is [http://sourceforge.net/projects/meshlab/ Meshlab]
:Open Source, available for Windows, Linux and Mac OSX.
:It has standard repair tools which will repair you model in most cases (fill holes, re-orient normals, etc.)
* you can use "make compound" and then "make single copy" or you can fuse solids to group them before converting to meshes
* remember to set in Kerkythea an import-factor of 0.001 for obj-modeler, since Kerkythea expects the obj-file to be in m (but standard units-scheme in FreeCAD is mm)
:Within WIndows 7 64-bit Kerkythea does not seem to be able to save these settings.
:So remember to do that each time you start Kerkythea
* if importing multiple objects in Kerkythea you can use the "File → Merge" command in Kerkythea


<div class="mw-translate-fuzzy">
{{docnav/de|Der Zeichnungs-Arbeitsbereich|Der Image Arbeitsbereich}}
==Links==
* [[Render_project/de|Render project]]
* [[Raytracing_tutorial/de|Raytracing tutorial]]
</div>


<div class="mw-translate-fuzzy">
{{languages/de | {{en|Raytracing_Module}} {{es|Raytracing_Module/es}} {{fr|Raytracing_Module/fr}} {{pl|Raytracing_Module/pl}} {{ru|Raytracing_Module/ru}} {{se|Raytracing_Module/se}} }}
{{docnav/de|[[Drawing Module/de|Drawing-Arbeitsbereich]]|[[Image Module/de|Image-Arbeitsbereich]]}}
{{Raytracing Tools navi/de}}
{{Userdocnavi/de}}
[[Category:Workbenches/de]]
</div>


{{Raytracing Tools navi}}
[[Category:User Documentation/de]]
{{Userdocnavi}}
[[Category:Workbenches]]

Revision as of 08:23, 3 May 2019

Dieses Modul hat zum Ziel, die Inhalte Ihrer angezeigten Scene an eine externe Render-Software zu schicken, um so eine Foto-Realistische Darstellung Ihrer Arbeit zu erzeugen. Das Raytracing-modul ist noch in einem frühen Entwicklungsstadium, daher stehen im Moment noch nicht viele Optionen zur Verfügung. Derzeit gibt es nur einen begrenzten Satz an Werkzeugen zum Export Part-Objekte als POV-ray -dateien. Diese Dateien können dann in POV-ray geladen werden und dort gerendert werden.

The Raytracing Workbench works with templates, which are project files that define a scene for your 3D model. You can place lights and geometry such as ground planes, and it also contains placeholders for the position of the camera, and for the material information of the objects in the scene. The project can then be exported to a ready-to-render file, or be rendered directly within FreeCAD.

Currently, two renderers are supported: povray and luxrender. To be able to render from within FreeCAD, at least one of these programs must be installed and configured in your system. However, if no renderer is installed, you will still be able to export a project file to be rendered at another time.

A new Render Workbench has been in development to support multiple back-ends such as Lux Renderer and Yafaray. Information for using the development version can be viewed at Render project. For development status of the Render Module look into the Raytracing project.

Typical workflow

  1. Create or open a FreeCAD project, add some Part-based objects (meshes are currently not supported)
  2. Create a Raytracing project (luxrender or povray)
  3. Select the objects you wish to add to the raytracing project and add them to the project with the "Insert Part" tool
  4. Export or render directly



Workflow of the Raytracing Workbench; the workbench prepares a project file from a given template, and then calls an external program to produce the actual rendering of the scene. The external renderer can be used independently of FreeCAD.

GUI Werkzeuge

Project tools

These are the main tools for exporting your 3D work to external renderers.

  • New PovRay project: Insert new PovRay project in the document
  • New LuxRender project: Insert new LuxRender project in the document
  • Insert part: Insert a view of a Part in a raytracing project
  • Reset camera: Matches the camera position of a raytracing project to the current view
  • Export project: Exports a raytracing project to a scene file for rendering in an external renderer
  • Render: Renders a raytracing project with an external renderer

Utilities

These are helper tools to perform specific tasks manually.

Preferences

  • Preferences: Preferences available in for the Raytracing tools.

Tutorials

Exportieren einer Ansicht

Der einfachste Weg ist, die aktuelle 3D-Ansicht mit allen Inhalten ine eine Povray-datei zu exportieren. Zuerst müssen Sie ihre CAD-Daten laden oder erstellen und deren Position und Orientierung in einer 3D-Ansicht wie gewünscht plazieren. Dann wählen Sie "Ansicht nach PovRay exportieren" aus dem Raytracing Menu.

Sie werden nach dem Ort gefragt, wo die resultierende *.pov Datei gespeichert werden soll. Diese kann dann anschließend mit Povray geöffnet und auch gerendert werden:

Üblicherweise kann man mit einem Renderer große und schöne Bilder erstellen:

Scripting

Und so kann man diese Funktionen mittels Python nutzen:

See the Raytracing API example for information on writing scenes programmatically.

Links

Über POV-Ray:

Luxrender

Future possible renderers to implement

Exporting to Kerkythea

Although direct export to the Kerkythea XML-File-Format is not supported yet, you can export your Objects as Mesh-Files (.obj) and then import them in Kerkythea.

  • if using Kerkythea for Linux, remember to install the WINE-Package (needed by Kerkythea for Linux to run)
  • you can convert your models with the help of the mesh workbench to meshes and then export these meshes as .obj-files
  • If your mesh-export resulted in errors (flip of normals, holes ...) you may try your luck with netfabb studio basic
Free for personal use, available for Windows, Linux and Mac OSX.
It has standard repair tools which will repair you model in most cases.
  • another good program for mesh analysing/repairing is Meshlab
Open Source, available for Windows, Linux and Mac OSX.
It has standard repair tools which will repair you model in most cases (fill holes, re-orient normals, etc.)
  • you can use "make compound" and then "make single copy" or you can fuse solids to group them before converting to meshes
  • remember to set in Kerkythea an import-factor of 0.001 for obj-modeler, since Kerkythea expects the obj-file to be in m (but standard units-scheme in FreeCAD is mm)
Within WIndows 7 64-bit Kerkythea does not seem to be able to save these settings.
So remember to do that each time you start Kerkythea
  • if importing multiple objects in Kerkythea you can use the "File → Merge" command in Kerkythea