Верстак Raytracing

From FreeCAD Documentation
Revision as of 13:47, 10 May 2020 by Baritone (talk | contribs)
Смотрите за активной разработкой, происходящей на верстаке Render FreeCADа
Raytracing workbench icon

Введение

Верстак Raytracing предназначен для создания фотореалистичной изображения ваших моделей с помощью внешних программ рендеринга.

Модуль работает с помощью шаблонов, это файлы проектов, определяющих сцену для вашей объёмной модели. Вы можете поместить свет и геометрию, вроде плоскости земли, и там содержится место для позиции камеры и для указания материалов объектов этой сцены. Проект может быть экспортирован в готовый для рендеринга файл, или отрисован напрямую в FreeCAD.

В настоящее время поддерживаются два визуализатора: povray и luxrender. Чтобы иметь возможность визуализации из FreeCAD, нужна хотя бы одна из этих программ, установленная и сконфигурированная в Вашей системе. Но даже если ни одного визуализатора не установлено, Вы можете экспортировать файл проекта для визуализации впоследствии.

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.

Типичная работа

  1. Создайте или откройте прокет FreeCAD, добавьте некоторые твердотельные объекты модулей (Part или PartDesign); сетки пока не поддерживаются.
  2. Создайте проект трассировки лучей (для povray или luxrender).
  3. Выделите объекты, которые Вы хотите добавить в проект трассировки лучей и добавьте их.
  4. Экспортируйте файл проекта или визуализируйте его напрямую.



Работа верстака Raytracing; верстак готовит файл проекта из данного шаблона, затем вызывает внешнюю программу для визуализации сцены. Внешний визуализатор может использоваться независимо от FreeCAD.

Инструменты

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

Creating a povray file manually

The utility tools described above allow you 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 "Utilities → Export View..." from the raytracing menu.

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

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

Написание сценариев

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

Ссылки

POVRay

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

Development

Drawing Module/ru
Draft Module/ru