Editing Appleseed

From BRL-CAD

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 15: Line 15:
  
 
== To-Do ==
 
== 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 ===
 
=== 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.
 
* 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 ===
 
=== 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.
 
* 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.
 +
  
 
== Compiling 'art' ==
 
== Compiling 'art' ==
Line 59: Line 66:
  
 
If art has a log message saying "image saved to output/art.png" near the end of logged output, then it ran successfully (even if you still get a Heap error on Windows).
 
If art has a log message saying "image saved to output/art.png" near the end of logged output, then it ran successfully (even if you still get a Heap error on Windows).
 
== Building 'art' and Appleseed from source ==
 
 
To compile the 'art' application in BRL-CAD on Linux, follow these steps:
 
 
# git clone https://github.com/BRL-CAD/brlcad
 
# cd brlcad && rm -rf misc/tools/ext src/other
 
# cd .. && mkdir brlcad_art_build && cd brlcad_art_build
 
# cmake ../brlcad -DCMAKE_BUILD_TYPE=Debug -DENABLE_ALL=ON -DBRLCAD_ENABLE_APPLESEED=ON
 
# cmake --build . --config Debug --parallel 8
 
# ./bin/art share/db/moss.g all.g
 
 
If everything worked, you should get an output file: output/art.png
 
 
Note that Windows is still a work in progress with this build configuration.  You might try Release instead of Debug - a couple of the known issues at the moment pertain to properly specifying Debug configs to subbuilds.
 

Please note that all contributions to BRL-CAD may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see BRL-CAD:Copyrights for details). Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)