Skip to content

Commit

Permalink
Merge pull request #8 from treydinges/chris-appleseed-cmake-update
Browse files Browse the repository at this point in the history
Update to art with a slew of significant changes from Chris McGregor

This adds support for the set command to control the number of samples, it lets are utilize OSL shaders from appleseed that are set on objects via material objects (optical "OSL" property), and it should support most of the RTUIF commands (e.g., az/el) although the code was reverted to a +y coordinate frame which results in a 90-degree rotated output image.  Most significant in this pull is the conversion to registering each region individually as an appleseed object, so material properties and color can be applied per-object.  There is one big performance-impacting hack in the code -- a per ray string comparison.  Current librt rt_shootray() hit callback is initialized with the whole scene, but needs to report only hits for a single specific object at a time.  Hack was to check if it's the right object by way of a string path-to-region comparison.  Needs separate per-object rtip's or a numeric handle (e.g., pointer) to each region otherwise (depending on whether we think librt or appleseed's spatial partitioning is faster).  Outstanding work from Chris.
  • Loading branch information
brlcad authored Dec 15, 2021
2 parents 497b760 + 50e5cda commit 3a3daba
Show file tree
Hide file tree
Showing 5 changed files with 365 additions and 83 deletions.
6 changes: 3 additions & 3 deletions misc/CMake/FindAppleseed.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,15 @@ find_path (Appleseed_INCLUDE_DIR renderer/api/project.h
${Appleseed_ROOT}
PATH_SUFFIXES
include
appleseed/include
)

find_library (Appleseed_LIBRARY
NAMES appleseed
NAMES Appleseed
HINTS
${Appleseed_ROOT}
PATH_SUFFIXES
lib64
lib
lib64
)

# Handle the QUIETLY and REQUIRED arguments and set Appleseed_FOUND.
Expand All @@ -71,6 +70,7 @@ find_package_handle_standard_args (Appleseed DEFAULT_MSG
if (Appleseed_FOUND)
set (Appleseed_INCLUDE_DIRS ${Appleseed_INCLUDE_DIR})
set (Appleseed_LIBRARIES ${Appleseed_LIBRARY})
CONFIG_H_APPEND(BRLCAD "#define APPLESEED_ROOT \"${Appleseed_ROOT}\"\n")
else ()
set (Appleseed_INCLUDE_DIRS)
set (Appleseed_LIBRARIES)
Expand Down
3 changes: 3 additions & 0 deletions src/art/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ set(ART_INCLUDE_DIRS
${OPTICAL_INCLUDE_DIRS}
${FB_INCLUDE_DIRS}
${RT_INCLUDE_DIRS}
${GED_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}
)

Expand All @@ -10,6 +11,7 @@ BRLCAD_INCLUDE_DIRS(ART_INCLUDE_DIRS)

set(RT_STD_LIBS
Threads::Threads
libged
librt
libnmg
libdm
Expand Down Expand Up @@ -44,6 +46,7 @@ if(Appleseed_FOUND)
art.cpp
brlcadplugin.cpp
../rt/opt.c
../rt/usage.cpp
)

BRLCAD_ADDEXEC(art "${ART_SRCS}" "${RT_STD_LIBS};${Appleseed_LIBRARIES};${Appleseed_BOOST_SYSTEM_LIB};${Appleseed_OPENIMAGEIO_LIB}" TEST_USESDATA)
Expand Down
Loading

0 comments on commit 3a3daba

Please sign in to comment.