Seeking help running the tutorial Hydra Render Delegate hdEmbree's test program

Hi folks,

I want to learn how Hydra render delegates are designed so that I can make one of my own.

To this end, I plan to study hdEmbree, which seems to be set up as a kind of tutorial render delegate. Perfect :slight_smile:

First, I need to build and run hdEmbree, which is part of OpenUSD, so that I can hack around with the code and learn what it does.

I’ve built OpenUSD on my Linux machine from the dev branch at dc01ba9c2. I’ve switched on the building of the embree plugin. I’ve first compiled the various necessary dependencies, including embree (at version 3.13.5), OpenImageIO and oneTBB (at version tbb2020Update3).

The build is fairly successful. USD has built; I can run usdview and I can use either the OpenGL or the embree renderer within usdview (embree’s output is always greyscale). I can run all of embree’s test programs as well, and they work nicely and generate images on my screen (these are not all greyscale).

However, I am finding that the hdEmbree test program, found at ./pxr/imaging/plugin/hdEmbree/testHdEmbree (relative to the cmake build location) will run, but does not display any kind of image on the screen; I just get a black box.

To check the USD build, I ran the tests with make test.

The following tests FAILED:
	1191 - testUsdImagingGLGeomSubsets_Medium (Failed)
	1196 - testUsdImagingGLGeomSubsets_Medium_SceneIndex (Failed)
	1200 - testUsdImagingGLGeomSubsets_Primvars_SceneIndex (Failed)
	1215 - testUsdImagingGLAovVisualization_Embree_normal (Failed)
	1230 - testUsdRecordSmallObject (Failed)

Of these, the test ‘testUsdImagingGLAovVisualization_Embree_normal’ seems worthy of attention:

[seb@sebg15 14:23:53 build]$ ctest -R testUsdImagingGLAovVisualization_Embree_normal --output-on-failure
Test project /home/seb/src/usd/OpenUSD/build
    Start 1215: testUsdImagingGLAovVisualization_Embree_normal
1/1 Test #1215: testUsdImagingGLAovVisualization_Embree_normal ...***Failed    0.17 sec
##############################################################################
#  HDEMBREE_SAMPLES_TO_CONVERGENCE is overridden to '1'.  Default is '100'.  #
##############################################################################
################################################################################
#  HDEMBREE_AMBIENT_OCCLUSION_SAMPLES is overridden to '0'.  Default is '16'.  #
################################################################################
###################################################################
#  HDEMBREE_JITTER_CAMERA is overridden to '0'.  Default is '1'.  #
###################################################################
registering plugins in: /usr/local/tests/UsdImagingPlugins/lib/UsdImagingTest.framework/Resources
My_TestGLDrawing::InitTest()
Supported
Supported
CreateRenderDelegate with settingsMap
Renderer plugin: HdEmbreeRendererPlugin
Error: return code 139 doesn't match expected 0 (EXPECTED_RETURN_CODE).chdir: /tmp/tmpbfvh1fqk
copying testenv dir: /usr/local/tests/ctest/testUsdImagingGLAovVisualization
cmd: ['/usr/local/tests/testUsdImagingGLBasicDrawing', '-offscreen', '-stage', 'viz_aov.usda', '-renderer', 'HdEmbreeRendererPlugin', '-rendererAov', 'normal', '-clear', '0', '0', '0', '1', '-lighting', '-camera', '/main_cam', '-write', 'testUsdImagingGLAovVisualization_Embree_normal.png']


0% tests passed, 1 tests failed out of 1

Total Test time (real) =   0.19 sec

The following tests FAILED:
	1215 - testUsdImagingGLAovVisualization_Embree_normal (Failed)
Errors while running CTest

That program simply segfaults.

Has anyone checked testHdEmbree recently to make sure it works? What about the unit tests? Can anyone suggest what might be up? Perhaps I didn’t compile a an optional dependency that’s required (if necessary I can elaborate on what deps I have and what I don’t).

Thanks for reading,

Seb James

Here’s a picture of what testHdEmbree does. Just an empty black window.

Update: looks like at least some of those unit test failures have been fixed in dev already. I’ll see if testHdEmbree works and if I still get a black screen, I’ll post an issue on github, in case it’s a genuine bug.