Skip to content

Commit

Permalink
Merge release v0.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
pixar-oss committed Aug 1, 2017
2 parents 95eef7c + 4ae8a56 commit 65320d2
Show file tree
Hide file tree
Showing 363 changed files with 16,933 additions and 4,748 deletions.
18 changes: 17 additions & 1 deletion BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Advanced Build Configuration
## Table of Contents
- [Building With CMake](#building-with-cmake)
- [Optional Components](#optional-components)
- [Imaging Plugins](#imaging-plugins)
- [Third Party Plugins](#third-party-plugins)
- [Tests](#tests)
- [Other Build Options](#other-build-options)
Expand Down Expand Up @@ -95,7 +96,7 @@ This component contains Hydra, a high-performance graphics rendering engine.

Disable this component by specifying the cmake flag ```PXR_BUILD_IMAGING=FALSE``` when
invoking cmake. Disabling this component will also disable the [USD Imaging](#usd-imaging)
component.
component and any [Imaging Plugins](#imaging-plugins).

Support for Ptex can optionally be disabled by specifying the cmake flag
```PXR_ENABLE_PTEX_SUPPORT=FALSE```.
Expand All @@ -110,6 +111,21 @@ Disable this component by specifying the cmake flag ```PXR_BUILD_USD_IMAGING=FAL
invoking cmake. Enabling this component will enable the [Imaging](#imaging)
component.

## Imaging Plugins

Hydra's rendering functionality can be extended with these optional plugins.

##### Embree Rendering

This component contains an example rendering backend for Hydra and usdview, based on the
embree raycasting library. Enable the plugin in the build by specifying the cmake flag
```PXR_BUILD_EMBREE_PLUGIN=TRUE``` when invoking cmake. This plugin is compatible with
Embree 2.16.1. The additional dependencies that must be supplied when invoking cmake are:

| Dependency Name | Description | Version |
| -------------- | ----------------------------------- | ------- |
| EMBREE_LOCATION | The root path to an embree library install. | 2.16.1 |

## Third Party Plugins

USD provides several plugins for integration with third-party software packages,
Expand Down
44 changes: 44 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,49 @@
# Change Log

## [0.8.0] - 2017-07-29

### Added
- Added option to build_usd.py for building monolithic shared library
and for building new sample Embree plugin.
- Added --mask option to usdcat, matching the --mask option in usdview.
- Added CPU-side external computation support to Hydra.
- Added Embree backend to serve as an example of how to add renderer
plugins to Hydra.
- Added camera gates to usdview.
- Added ability to Houdini plugin to set active state via usdactive
attribute and to write static data to default time via usdwritestatictopology,
usdwritestaticprimvars, and usdwritestaticgeo attributes.
- Added UsdExportAttributes hda to Houdini plugin for setting primitive and
detail attributes which control various USD attributes or metadata.

### Changed
- Restored export of CMake targets from shared library builds.
- Asset paths in .usda files may now contain any printable character.
(Issue #73)
- Legacy special behavior for variant sets named "standin" has been disabled
by default.
- Interpolation is now applied to time samples from clips when no sample
exists at a specified clip time.
- Removed deprecated UsdShadePShader schema.
- Enabled vertex primvar sharing in Hydra. Hydra can now use significantly
less GPU memory.
- Many internal performance improvements to Hydra.
- usdview HUD now shows the backend renderer plugin used by Hydra
- Wireframe drawing now ignores opacity.
- Katana plugin properly interprets schema-supported triangle subdivision rule
when meshes are read in and rendered.

### Fixed
- Fixed several issues in build_usd.py related to building dependencies.
(Issue #225, #230, #234)
- Fixed bug where UsdGeomPrimvar::IsIndexed() would not work for attributes
with only authored time samples. (Issue #238)
- Fixed small platform inconsistencies for Windows in Hydra.
- Fixed crash in Katana plugin when using point instancers that did not have
scales or orientations specified. (Issue #239)
- Fixed issue in Houdini plugin where the "w" attribute was not converted
to the "angularVelocities" attribute for point instancer prims.

## [0.7.6] - 2017-06-30

### Added
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ additional documentation for running cmake directly.
- gcc
- Xcode
- Microsoft Visual Studio
- NASM (required for Imaging on Windows)
- CMake
- Python
- PySide (required for USD Imaging)
Expand Down
153 changes: 126 additions & 27 deletions build_scripts/build_usd.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,13 +240,25 @@ def DownloadURL(url, context, force):
else:
PrintInfo("Downloading {0} to {1}"
.format(url, os.path.abspath(filename)))
try:
r = urllib2.urlopen(url)
with open(filename, "wb") as outfile:
outfile.write(r.read())
except Exception as e:

# To work around occasional hiccups with downloading from websites
# (SSL validation errors, etc.), retry a few times if we don't
# succeed in downloading the file.
maxRetries = 5
lastError = None
for i in xrange(maxRetries):
try:
r = urllib2.urlopen(url)
with open(filename, "wb") as outfile:
outfile.write(r.read())
break
except Exception as e:
PrintCommandOutput("Retrying download due to error: {err}\n"
.format(err=e))
lastError = e
else:
raise RuntimeError("Failed to download {url}: {err}"
.format(url=url, err=e))
.format(url=url, err=lastError))

# Open the archive and retrieve the name of the top-most directory.
# This assumes the archive contains a single directory with all
Expand Down Expand Up @@ -350,6 +362,7 @@ def InstallBoost(context, force):
'runtime-link=shared',
'threading=multi',
'variant=release',
'--with-atomic',
'--with-date_time',
'--with-filesystem',
'--with-program_options',
Expand Down Expand Up @@ -493,7 +506,7 @@ def InstallTIFF_LinuxOrMacOS(context, force):
############################################################
# PNG

PNG_URL = "http://downloads.sourceforge.net/project/libpng/libpng16/1.6.29/libpng-1.6.29.tar.gz"
PNG_URL = "http://downloads.sourceforge.net/project/libpng/libpng16/older-releases/1.6.29/libpng-1.6.29.tar.gz"

def InstallPNG(context, force):
with CurrentWorkingDirectory(DownloadURL(PNG_URL, context, force)):
Expand Down Expand Up @@ -533,7 +546,9 @@ def InstallOpenEXR(context, force):
if Windows():
GLEW_URL = "http://downloads.sourceforge.net/project/glew/glew/2.0.0/glew-2.0.0-win32.zip"
else:
GLEW_URL = "https://github.com/nigels-com/glew/archive/glew-2.0.0.tar.gz"
# Important to get source package from this URL and NOT github. This package
# contains pre-generated code that the github repo does not.
GLEW_URL = "https://downloads.sourceforge.net/project/glew/glew/2.0.0/glew-2.0.0.tgz"

def InstallGLEW(context, force):
if Windows():
Expand All @@ -554,8 +569,6 @@ def InstallGLEW_Windows(context, force):

def InstallGLEW_LinuxOrMacOS(context, force):
with CurrentWorkingDirectory(DownloadURL(GLEW_URL, context, force)):
# GLEW requires code generation in the source tree
Run("make extensions")
Run('make GLEW_DEST="{instDir}" -j{procs} install'
.format(instDir=context.instDir,
procs=multiprocessing.cpu_count()))
Expand Down Expand Up @@ -606,9 +619,16 @@ def InstallPtex_LinuxOrMacOS(context, force):

def InstallOpenImageIO(context, force):
with CurrentWorkingDirectory(DownloadURL(OIIO_URL, context, force)):
RunCMake(context, force,
['-DOIIO_BUILD_TOOLS=OFF',
'-DOIIO_BUILD_TESTS=OFF'])
extraArgs = ['-DOIIO_BUILD_TOOLS=OFF',
'-DOIIO_BUILD_TESTS=OFF']

# If Ptex support is disabled in USD, disable support in OpenImageIO
# as well. This ensures OIIO doesn't accidentally pick up a Ptex
# library outside of our build.
if not context.enablePtex:
extraArgs.append('-DUSE_PTEX=OFF')

RunCMake(context, force, extraArgs)

OPENIMAGEIO = Dependency("OpenImageIO", InstallOpenImageIO,
"include/OpenImageIO/oiioversion.h")
Expand All @@ -620,23 +640,38 @@ def InstallOpenImageIO(context, force):

def InstallOpenSubdiv(context, force):
with CurrentWorkingDirectory(DownloadURL(OPENSUBDIV_URL, context, force)):
extraArgs = [
'-DNO_EXAMPLES=ON',
'-DNO_TUTORIALS=ON',
'-DNO_REGRESSION=ON',
'-DNO_DOC=ON',
'-DNO_OMP=ON',
'-DNO_CUDA=ON',
'-DNO_OPENCL=ON',
'-DNO_DX=ON',
'-DNO_TESTS=ON',
]

# OpenSubdiv's FindGLEW module won't look in CMAKE_PREFIX_PATH, so
# we need to explicitly specify GLEW_LOCATION here.
extraArgs.append('-DGLEW_LOCATION="{instDir}"'
.format(instDir=context.instDir))

# If Ptex support is disabled in USD, disable support in OpenSubdiv
# as well. This ensures OSD doesn't accidentally pick up a Ptex
# library outside of our build.
if not context.enablePtex:
extraArgs.append('-DNO_PTEX=ON')

# NOTE: For now, we disable TBB in our OpenSubdiv build.
# This avoids an issue where OpenSubdiv will link against
# all TBB libraries it finds, including libtbbmalloc and
# libtbbmalloc_proxy. On Linux and MacOS, this has the
# unwanted effect of replacing the system allocator with
# tbbmalloc, which can cause problems with the Maya plugin.
RunCMake(context, force,
['-DNO_EXAMPLES=ON',
'-DNO_TUTORIALS=ON',
'-DNO_REGRESSION=ON',
'-DNO_DOC=ON',
'-DNO_OMP=ON',
'-DNO_CUDA=ON',
'-DNO_OPENCL=ON',
'-DNO_DX=ON',
'-DNO_TESTS=ON',
'-DNO_TBB=ON'])
extraArgs.append('-DNO_TBB=ON')

RunCMake(context, force, extraArgs)

OPENSUBDIV = Dependency("OpenSubdiv", InstallOpenSubdiv,
"include/opensubdiv/version.h")
Expand Down Expand Up @@ -722,6 +757,11 @@ def InstallAlembic(context, force):
def InstallUSD(context):
with CurrentWorkingDirectory(context.usdSrcDir):
extraArgs = []

if context.buildShared:
extraArgs.append('-DBUILD_SHARED_LIBS=ON')
elif context.buildMonolithic:
extraArgs.append('-DPXR_BUILD_MONOLITHIC=ON')

if context.buildDocs:
extraArgs.append('-DPXR_BUILD_DOCUMENTATION=ON')
Expand All @@ -739,6 +779,14 @@ def InstallUSD(context):
extraArgs.append('-DPXR_ENABLE_PTEX_SUPPORT=ON')
else:
extraArgs.append('-DPXR_ENABLE_PTEX_SUPPORT=OFF')

if context.buildEmbree:
if context.embreeLocation:
extraArgs.append('-DEMBREE_LOCATION="{location}"'
.format(location=context.embreeLocation))
extraArgs.append('-DPXR_BUILD_EMBREE_PLUGIN=ON')
else:
extraArgs.append('-DPXR_BUILD_EMBREE_PLUGIN=OFF')
else:
extraArgs.append('-DPXR_BUILD_IMAGING=OFF')

Expand Down Expand Up @@ -825,6 +873,16 @@ def InstallUSD(context):
help=("CMake generator to use when building libraries with "
"cmake"))

(SHARED_LIBS, MONOLITHIC_LIB) = (0, 1)
subgroup = group.add_mutually_exclusive_group()
subgroup.add_argument("--build-shared", dest="build_type",
action="store_const", const=SHARED_LIBS,
default=SHARED_LIBS,
help="Build individual shared libraries (default)")
subgroup.add_argument("--build-monolithic", dest="build_type",
action="store_const", const=MONOLITHIC_LIB,
help="Build a single monolithic shared library")

group = parser.add_argument_group(title="3rd Party Dependency Build Options")
group.add_argument("--src", type=str,
help=("Directory where dependencies will be downloaded "
Expand Down Expand Up @@ -871,6 +929,17 @@ def InstallUSD(context):
action="store_false",
help="Disable Ptex support in imaging (default)")

group = parser.add_argument_group(title="Imaging Plugin Options")
subgroup = group.add_mutually_exclusive_group()
subgroup.add_argument("--embree", dest="build_embree", action="store_true",
default=False,
help="Build Embree sample imaging plugin")
subgroup.add_argument("--no-embree", dest="build_embree", action="store_true",
default=False,
help="Do not build Embree sample imaging plugin (default)")
group.add_argument("--embree-location", type=str,
help="Directory where Embree is installed.")

group = parser.add_argument_group(title="Alembic Plugin Options")
subgroup = group.add_mutually_exclusive_group()
subgroup.add_argument("--alembic", dest="build_alembic", action="store_true",
Expand Down Expand Up @@ -941,6 +1010,10 @@ def __init__(self, args):
# CMake generator
self.cmakeGenerator = args.generator

# Build type
self.buildShared = (args.build_type == SHARED_LIBS)
self.buildMonolithic = (args.build_type == MONOLITHIC_LIB)

# Dependencies that are forced to be built
self.forceBuildAll = args.force_all
self.forceBuild = [dep.lower() for dep in args.force_build]
Expand All @@ -957,6 +1030,11 @@ def __init__(self, args):
# - USD Imaging
self.buildUsdImaging = (args.build_imaging == USD_IMAGING)

# - Imaging plugins
self.buildEmbree = self.buildImaging and args.build_embree
self.embreeLocation = (os.path.abspath(args.embree_location)
if args.embree_location else None)

# - Alembic Plugin
self.buildAlembic = args.build_alembic
self.enableHDF5 = self.buildAlembic and args.enable_hdf5
Expand Down Expand Up @@ -1052,7 +1130,8 @@ def MustBuildDependency(self, dep):
sys.exit(1)

if not find_executable("python"):
PrintError("python not found -- please ensure python is included in your PATH")
PrintError("python not found -- please ensure python is included in your "
"PATH")
sys.exit(1)

if not find_executable("cmake"):
Expand All @@ -1065,7 +1144,24 @@ def MustBuildDependency(self, dep):
sys.exit(1)

if not find_executable("dot"):
PrintError("dot not found -- please install graphviz and adjust your PATH")
PrintError("dot not found -- please install graphviz and adjust your "
"PATH")
sys.exit(1)

if context.buildUsdImaging:
# The USD build will skip building usdview if pyside-uic is not found,
# so check for it here to avoid confusing users. This list of PySide
# executable names comes from cmake/modules/FindPySide.cmake
pysideUic = ["pyside-uic", "python2-pyside-uic", "pyside-uic-2.7"]
if not any([find_executable(p) for p in pysideUic]):
PrintError("pyside-uic not found -- please install PySide and adjust "
"your PATH")
sys.exit(1)

if JPEG in requiredDependencies:
# NASM is required to build libjpeg-turbo
if (Windows() and not find_executable("nasm")):
PrintError("nasm not found -- please install it and adjust your PATH")
sys.exit(1)

if AnyPythonDependencies(dependenciesToBuild):
Expand All @@ -1082,7 +1178,7 @@ def MustBuildDependency(self, dep):
3rd-party install directory {instDir}
Build directory {buildDir}
Building
Building {buildType}
Imaging {buildImaging}
Ptex support: {enablePtex}
UsdImaging {buildUsdImaging}
Expand All @@ -1103,6 +1199,9 @@ def MustBuildDependency(self, dep):
instDir=context.instDir,
dependencies=("None" if not dependenciesToBuild else
", ".join([d.name for d in dependenciesToBuild])),
buildType=("Shared libraries" if context.buildShared
else "Monolithic shared library" if context.buildMonolithic
else ""),
buildImaging=("On" if context.buildImaging else "Off"),
enablePtex=("On" if context.enablePtex else "Off"),
buildUsdImaging=("On" if context.buildUsdImaging else "Off"),
Expand Down
6 changes: 6 additions & 0 deletions cmake/defaults/Options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ option(PXR_STRICT_BUILD_MODE "Turn on additional warnings. Enforce all warnings
option(PXR_VALIDATE_GENERATED_CODE "Validate script generated code" OFF)
option(PXR_BUILD_TESTS "Build tests" ON)
option(PXR_BUILD_IMAGING "Build imaging components" ON)
option(PXR_BUILD_EMBREE_PLUGIN "Build embree imaging plugin" OFF)
option(PXR_BUILD_USD_IMAGING "Build USD imaging components" ON)
option(PXR_BUILD_KATANA_PLUGIN "Build usd katana plugin" OFF)
option(PXR_BUILD_MAYA_PLUGIN "Build usd maya plugin" OFF)
Expand Down Expand Up @@ -86,6 +87,11 @@ if (${PXR_BUILD_USD_IMAGING} AND NOT ${PXR_BUILD_IMAGING})
"PXR_BUILD_IMAGING=OFF implies PXR_BUILD_USD_IMAGING=OFF"
)
endif()
if (${PXR_BUILD_EMBREE_PLUGIN} AND NOT ${PXR_BUILD_IMAGING})
message(STATUS
"PXR_BUILD_IMAGING=OFF implies PXR_BUILD_EMBREE_PLUGIN=OFF"
)
endif()

option(BUILD_SHARED_LIBS "Build shared libraries." ON)
option(PXR_BUILD_MONOLITHIC "Build a monolithic library." OFF)
Expand Down
Loading

0 comments on commit 65320d2

Please sign in to comment.