Difference between revisions of "Appleseed"
(Add tasks to to-do list and begin progress section) |
(updates after the fall effort) |
||
Line 15: | Line 15: | ||
== To-Do == | == To-Do == | ||
=== Separating Regions === | === Separating Regions === | ||
− | * The custom BRL-CAD plugin currently | + | * The custom BRL-CAD plugin currently tracks all BRL-CAD regions and their mappings to Appleseed instances via a single "ray trace instance pointer" (rtip). It uses a string comparison to determine if a hit is on a corresponding appleseed instance. While this works, it's incredibly inefficient. It either needs a separate rtip per object (ideal) or it needs to use pointers/integers to determine if we hit the Appleseed instance. |
=== Colors/Materials === | === Colors/Materials === | ||
− | * | + | * BRL-CAD objects are rendered by appleseed individually and can have different colors and/or materials assigned to each instance. However, there is no automatic mapping from BRL-CAD shader settings to Appleseed settings. PBR shaders are supported via BRL-CAD 'material' objects (see 'material' command and gltf import). Using more advanced materials (e.g., with textures) is untested. |
− | |||
− | |||
− | |||
=== Multithreading Support === | === Multithreading Support === | ||
Line 27: | Line 24: | ||
=== Refining CMake === | === Refining CMake === | ||
− | * Setting up the appleseed project requires a lot of hacky and manual work. | + | * Setting up the appleseed project requires a lot of hacky and manual work due to relying on a pre-built binary of Appleseed. The CMake build needs to compile Appleseed and all its dependencies using CMake's External_ProjectAdd feature in order to make the build process easier for all platforms and in order to ensure 'art' is always enabled. |
Revision as of 13:11, 12 March 2022
Contents
Appleseed Integration Project
Integration with appleseed (https://github.com/appleseedhq/appleseed) has been a long-standing BRL-CAD project. In essence, the idea is to render BRL-CAD geometry through a custom plugin to the appleseed renderer. The ultimate goal of the project is to be able to support as many rt features as possible.
Progress
The appleseed integration project takes advantage of appleseed's support for procedural objects, which allows for the creation of a custom plugin to execute custom ray-intersect logic. By linking with librt, the plugin is thus able to render BRL-CAD geometry. Aside from simply being able to render the geometry, art.exe currently supports a few select rt features. At the moment, art.exe is capable of:
- selecting the geometry model and the regions to render
- defining the render image pixel dimensions
- setting the azimuth/elevation and perspective angle
As mentioned, the goal of the project is for art.exe to implement the same features as rt.exe, so that, in a sense, they can be used interchangeably. Therefore, if possible, it would be preferred if art could reuse the same helper functions and variables used by rt. For example, much of the command-line option parsing performed by art directly comes from opt.c/usage.cpp, which was originally used by rt. This makes the code much cleaner and easier to maintain.
To-Do
Separating Regions
- The custom BRL-CAD plugin currently tracks all BRL-CAD regions and their mappings to Appleseed instances via a single "ray trace instance pointer" (rtip). It uses a string comparison to determine if a hit is on a corresponding appleseed instance. While this works, it's incredibly inefficient. It either needs a separate rtip per object (ideal) or it needs to use pointers/integers to determine if we hit the Appleseed instance.
Colors/Materials
- BRL-CAD objects are rendered by appleseed individually and can have different colors and/or materials assigned to each instance. However, there is no automatic mapping from BRL-CAD shader settings to Appleseed settings. PBR shaders are supported via BRL-CAD 'material' objects (see 'material' command and gltf import). Using more advanced materials (e.g., with textures) is untested.
Multithreading Support
- Both appleseed and librt are capable of multithreaded rendering, but at the moment, the plugin will only work on a single thread. At some point, multithreading support should be implemented in order to fully take advantage of appleseed/librt capabilities.
Refining CMake
- Setting up the appleseed project requires a lot of hacky and manual work due to relying on a pre-built binary of Appleseed. The CMake build needs to compile Appleseed and all its dependencies using CMake's External_ProjectAdd feature in order to make the build process easier for all platforms and in order to ensure 'art' is always enabled.