Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ list(APPEND CMAKE_MODULE_PATH "${USD_LOCATION}/lib/cmake/" 0)
# Define the project and build options
include(options)

# OpenGL must be found before importing pxrTargets (garch links OpenGL::GL)
find_package(OpenGL)

# Global required packagse
find_package(USD REQUIRED)
find_package(Arnold REQUIRED)
Expand Down
11 changes: 11 additions & 0 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,17 @@ ARNOLD_API_LIB = os.path.abspath(env.subst(env['ARNOLD_API_LIB']))
ARNOLD_BINARIES = os.path.abspath(env.subst(env['ARNOLD_BINARIES']))


## To be removed : if AiQueryAOV is defined in ai_render.h, then we enable fast viewport in this build
ai_render_h = os.path.join(ARNOLD_API_INCLUDES, 'ai_render.h')
try:
with open(ai_render_h) as f:
if 'AiQueryAOV' in f.read():
env.Append(CPPDEFINES=['FAST_VIEWPORT_SUPPORT'])
print('AiQueryAOV found: enabling FAST_VIEWPORT_SUPPORT')
except IOError:
pass


if not is_windows and env['RPATH_ADD_ARNOLD_BINARIES']:
env['RPATH'] = ARNOLD_BINARIES

Expand Down
4 changes: 2 additions & 2 deletions cmake/modules/FindUSD.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ if (HOUDINI_LOCATION)
message(STATUS "USD version: ${USD_VERSION}")

# List of usd libraries we need for this project
set(ARNOLD_USD_LIBS_ arch;tf;gf;vt;sdr;sdf;usd;plug;trace;work;hf;hd;usdImaging;usdLux;pxOsd;cameraUtil;ar;usdGeom;usdShade;pcp;usdUtils;usdVol;usdSkel;usdRender;js)
set(ARNOLD_USD_LIBS_ arch;tf;gf;vt;sdr;sdf;usd;plug;trace;work;hf;hd;usdImaging;usdLux;pxOsd;cameraUtil;ar;usdGeom;usdShade;pcp;usdUtils;usdVol;usdSkel;usdRender;js;hgi;hgiGL)
if (${USD_VERSION} VERSION_LESS "0.25.05")
list(APPEND ARNOLD_USD_LIBS_ ndr)
endif()
Expand Down Expand Up @@ -412,7 +412,7 @@ endif ()
# Look for the dynamic libraries.
# Right now this is using a hardcoded list of libraries, but in the future we should parse the installed cmake files
# and figure out the list of the names for libraries.
set(USD_LIBS ar;arch;cameraUtil;garch;gf;glf;hd;hdMtlx;hdSt;hdx;hf;hgi;hgiGL;hgInterop;hio;js;kind;pcp;plug;pxOsd;sdf;sdr;tf;trace;usd;usdAppUtils;usdGeom;usdHydra;usdImaging;usdImagingGL;usdLux;usdMedia;usdRender;usdRi;usdRiImaging;usdShade;usdSkel;usdUI;usdUtils;usdviewq;usdVol;usdVolImaging;vt;work;usd_ms)
set(USD_LIBS ar;arch;cameraUtil;garch;gf;glf;hd;hdMtlx;hdSt;hdx;hf;hgi;hgiGL;hgInterop;hio;js;kind;pcp;plug;pxOsd;sdf;sdr;tf;trace;usd;usdAppUtils;usdGeom;usdHydra;usdImaging;usdImagingGL;usdLux;usdMedia;usdRender;usdRi;usdRiImaging;usdShade;usdSkel;usdUI;usdUtils;usdviewq;usdVol;usdVolImaging;vt;work;hgi;hgiGL;js;usd_ms)
if (${USD_VERSION} VERSION_LESS "0.25.05")
list(APPEND USD_LIBS ndr)
endif()
Expand Down
3 changes: 3 additions & 0 deletions libs/common/constant_strings.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ ASTR(debug);
ASTR(desc);
ASTR(deprecated);
ASTR(driver_exr);
ASTR(fast_viewport);
ASTR(final_output);
ASTR(FLOAT);
ASTR(GI_diffuse_depth);
ASTR(GI_diffuse_samples);
Expand Down Expand Up @@ -561,6 +563,7 @@ ASTR(velocities);
ASTR(vertices);
ASTR(vidxs);
ASTR(viewMtx);
ASTR(viewport_rendering);
ASTR(visibility);
ASTR(vlist);
ASTR(volume);
Expand Down
8 changes: 8 additions & 0 deletions libs/render_delegate/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@ TF_DEFINE_ENV_SETTING(HDARNOLD_asset_searchpath, "", "Asset search path.");

TF_DEFINE_ENV_SETTING(HDARNOLD_auto_generate_tx, true, "Auto-generate Textures to TX");

#ifdef FAST_VIEWPORT_SUPPORT
TF_DEFINE_ENV_SETTING(HDARNOLD_fast_viewport, true, "Enable fast viewport");
#endif

HdArnoldConfig::HdArnoldConfig()
{
bucket_size = std::max(1, TfGetEnvSetting(HDARNOLD_bucket_size));
Expand Down Expand Up @@ -158,6 +162,10 @@ HdArnoldConfig::HdArnoldConfig()
#endif
osl_includepath = TfGetEnvSetting(HDARNOLD_osl_includepath);
auto_generate_tx = TfGetEnvSetting(HDARNOLD_auto_generate_tx);

#ifdef FAST_VIEWPORT_SUPPORT
fast_viewport = TfGetEnvSetting(HDARNOLD_fast_viewport);
#endif
}

const HdArnoldConfig& HdArnoldConfig::GetInstance() { return TfSingleton<HdArnoldConfig>::GetInstance(); }
Expand Down
3 changes: 3 additions & 0 deletions libs/render_delegate/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,9 @@ struct HdArnoldConfig {
///
bool auto_generate_tx;

/// Use HDARNOLD_fast_viewport to set the value.
///
bool fast_viewport;

private:
/// Constructor for reading the values from the environment variables.
Expand Down
Loading