Raytracing Workbench: Difference between revisions

From FreeCAD Documentation
No edit summary
No edit summary
Line 1: Line 1:
This module is aimed at sending the contents of your scene to an external [http://en.wikipedia.org/wiki/Rendering_(computer_graphics) renderer], for generating photorealistic images of your work. The Raytracing module is still in very early stage of completion, so you have not many options available at the moment. Currently, only a basic set of tools to export Part objects as [http://en.wikipedia.org/wiki/POV-Ray POV-ray] files is implemented. Those files can then be loaded into POV-ray and rendered.
This module is aimed at sending the contents of your scene to an external [http://en.wikipedia.org/wiki/Rendering_(computer_graphics) renderer], for generating photorealistic images of your work. The Raytracing module is still in very early stage of completion, so you have not many options available at the moment. Currently, only a basic set of tools to export Part objects as [http://en.wikipedia.org/wiki/POV-Ray POV-ray] files is implemented. Those files can then be loaded into POV-ray and rendered.


== GUI Tools ==
=== GUI Tools ===


{{Raytracing Tools}}
{{Raytracing Tools}}




== Export a View ==
=== Export a View ===


The easiest way is to export the current 3D view and all of its content to a [http://www.povray.org/ Povray] file. First, you must load or create your CAD data and position the 3D View orientation as you wish. Then choose "Export View..." from the raytracing menu.
The easiest way is to export the current 3D view and all of its content to a [http://www.povray.org/ Povray] file. First, you must load or create your CAD data and position the 3D View orientation as you wish. Then choose "Export View..." from the raytracing menu.
Line 20: Line 20:
[[Image:Scharniergreifer_render.jpg|800px]]
[[Image:Scharniergreifer_render.jpg|800px]]


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


Here is how to use these features from python:
Here is how to use these features from python:
Line 31: Line 31:
del OutFile
del OutFile


== Links ==
=== Links ===


About POV-Ray:
About POV-Ray:

Revision as of 20:05, 26 May 2010

This module is aimed at sending the contents of your scene to an external renderer, for generating photorealistic images of your work. The Raytracing module is still in very early stage of completion, so you have not many options available at the moment. Currently, only a basic set of tools to export Part objects as POV-ray files is implemented. Those files can then be loaded into POV-ray and rendered.

GUI Tools

Template:Raytracing Tools


Export a View

The easiest way is to export the current 3D view and all of its content to a Povray file. First, you must load or create your CAD data and position the 3D View orientation as you wish. Then choose "Export View..." from the raytracing menu.

You get ask for a location to save the resulting *.pov file. After that you can open it in Povray and render:

As usual in a rendererer you can make big and nice pictures:

Scripting

Here is how to use these features from python:

import Raytracing,RaytracingGui
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

About POV-Ray:

About other open-source renderers (for future implementation):

Drawing Module
Draft Module