Render project

Render Module
The render module provides a simple, straightforward way to quickly create rendered work of FreeCAD parts. It's philosophy is based on a template system so you can view your work more efficiently. The Render Module intends to hide the complicated Render Process from the user, so you can worry about designing parts.

The render module is designed to work with multiple render back ends, but currently only LuxRender is supported. The workflow as follows:


 * Create a Render Feature.


 * Select your desired presets and templates.


 * Assign materials to visible parts within your document.


 * Position your camera


 * Preview the render

A brief explanation of the parts in the Render Module:

Render Feature
The Render Feature contains the information that will be passed to the Render such as camera and render settings, and materials and also what render plugin to use. This means you can create many different features with different materials, camera settings that are independent from each other. The feature also takes control over the rendering process.

Render Material
Each Render Material is based on a Library Material which are stored in separate .XML files. These Render Materials can be assigned properties such as colour or shininess and other parameters. These materials are then attached to an object in the your document.

Using the Render Module:
First checkout the following repository [] and checkout the 'render' branch. Then ensure you can build this.

Download or install the latest 1.03 Lux Render for your system from [] and ensure this runs correctly.

Open FreeCAD and start the Raytracing workbench. You must next set the 'Executable Path' for Lux Render. This can be set in Edit->Preferences->Raytracing. This must be set to exec path of the luxconsole executable.



Create your part(s) within FreeCAD. Then return to Raytracing workbench and create a 'Render Feature'. Editing this feature a new Task View will appear:



When you create a Render Feature it will store the current position and type of Camera used in your 3D window. You can freely reposition this and click 'Save Camera' to store the current state of the camera into the feature.

You can set other render settings:

Render Preset
Render Presets are specific to the render plugin that are used. They change the render process to improve the quality of the output or it the speed that the output is generated. With Lux Render, 'MLT Unbiased' produces good quality results in reasonable time. 'Direct Lighting Preview' produces a fast but low quality result.

Render Template
Render Templates are currently specific to the render plugin. By selecting a template, it will generate a preset scene such as lighting, geometry with your parts inside it. Currently 'Lux Classic' correctly works and produces satisfactory results. It will attempt to calculate the scene based on your camera position and the overall size of visible parts.

Start a Render
Once the feature's settings have been set. You can render the scene. The 'Preview Window' button will render the current view of the 3D window. The 'Preview' button will use the saved camera position and also the size of the output.



After starting a render. A new preview view will appear. Depending on the complexity of your scene, this may take a few seconds to be created whilst exported and loaded by the external render program. If the render process is successful, the output will be automatically shown. You can freely move the image and zoom in and out.

Unbiased Rendering
Essentially the render program will simulate light rays 'bouncing' through a scene. When this light hits a camera it will be visible in the output. Over time more rays hit the camera and an image builds up. When you are happy with the output, press 'Stop Render'. You may now save the output to a desired location (currently stored in a .png format)



Render Speed
The render process are typically run on the CPU. The time taken for a satisfactory result, depends on the size of the output, the scene, the number and complexity of materials used, the lights and overall system performance. A quick preview for a simple part can take one minute, whilst a high quality output can taken several hours.