Skip to content

Commit

Permalink
Merge branch 'release-1.2.x'
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffamstutz committed Mar 13, 2017
2 parents a6798ef + c11793f commit be966e3
Show file tree
Hide file tree
Showing 44 changed files with 225 additions and 171 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Version History
---------------

### Changes in v1.2.1:

- Various bugfixes related to MPI distributed rendering, ISPC issues
on Windows, and other build related issues.

### Changes in v1.2.0:

- Added support for volumes with voxelType `short` (16-bit signed
Expand Down
93 changes: 48 additions & 45 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
OSPRay
======

This is release v1.2.0 of OSPRay. For changes and new features see the
This is release v1.2.1 of OSPRay. For changes and new features see the
[changelog](CHANGELOG.md). Also visit http://www.ospray.org for more
information.

Expand Down Expand Up @@ -56,9 +56,8 @@ branch should always point to the latest tested bugfix release.
Prerequisites
-------------

OSPRay currently supports both Linux and Mac OS X (and experimentally
Windows). In addition, before you can build OSPRay you need the
following prerequisites:
OSPRay currently supports Linux, Mac OS X, and Windows. In addition,
before you can build OSPRay you need the following prerequisites:

- You can clone the latest OSPRay sources via:

Expand Down Expand Up @@ -157,9 +156,9 @@ Documentation
=============

The following [API
documentation](http://www.sdvis.org/ospray/download/OSPRay_readme_devel.pdf "OSPRay Documentation")
documentation](http://www.sdvis.org/ospray/download/OSPRay_readme.pdf "OSPRay Documentation")
of OSPRay can also be found as a [pdf
document](http://www.sdvis.org/ospray/download/OSPRay_readme_devel.pdf "OSPRay Documentation")
document](http://www.sdvis.org/ospray/download/OSPRay_readme.pdf "OSPRay Documentation")
(2.6MB).

For a deeper explanation of the concepts, design, features and
Expand All @@ -183,12 +182,15 @@ To access the OSPRay API you first need to include the OSPRay header

where the API is compatible with C99 and C++.

In order to use the API, OSPRay must initialized with a "device". A
Initialization
--------------

In order to use the API, OSPRay must be initialized with a "device". A
device is the object which implements the API. Creating and initializing
a device can be done in either of two ways: command line arguments or
manually instantiating a device.

### Initialization via command line arguments
### Command Line Arguments

The first is to do so by giving OSPRay the command line from `main()` by
calling
Expand Down Expand Up @@ -252,7 +254,7 @@ convention with "`--osp:`") are understood:

: Command line parameters accepted by OSPRay's `ospInit`.

### Initialization via manual device instantiation
### Manual Device Instantiation

The second method of initialization is to explicitly create the device
yourself, and possibly set parameters. This method looks almost
Expand Down Expand Up @@ -318,23 +320,23 @@ to OSPRay API calls, where users can set/change parameters and recommit
the device. If changes are made to the device that is already set as the
current device, it does not need to be set as current again.

### Useful environment variables
### Environment Variables

Finally, OSPRay's generic device parameters can be overridden via
environment variables for easy changes to OSPRay's behavior without
needing to change the application (variables are prefixed by convention
with "`OSPRAY_`"):

| Variable | Description |
|:--------------------|:--------------------------------------------------------------|
| OSPRAY\_THREADS | equivalent to `--osp:numthreads` |
| OSPRAY\_LOG\_LEVEL | equivalent to `--osp:loglevel` |
| OSPRAY\_LOG\_OUTPUT | equivalent to `--osp:logoutput` |
| OSPRAY\_DEBUG | equivalent to both OSPRAY\_LOG\_LEVEL=2 and OSPRAY\_THREADS=1 |
| Variable | Description |
|:--------------------|:---------------------------------|
| OSPRAY\_THREADS | equivalent to `--osp:numthreads` |
| OSPRAY\_LOG\_LEVEL | equivalent to `--osp:loglevel` |
| OSPRAY\_LOG\_OUTPUT | equivalent to `--osp:logoutput` |
| OSPRAY\_DEBUG | equivalent to `--osp:debug` |

: Environment variables interpreted by OSPRay.

### Handling error and status messages from OSPRay
### Handling Error and Status Messages from OSPRay

Applications may be interested in messages which OSPRay emits, whether
for debugging or logging events. Applications can call
Expand All @@ -349,7 +351,7 @@ desired by an application will require that a callback be provided. Note
that callbacks for C++ std::cout and std::cerr can be alternatively set
through ospInit() or OSPRAY\_LOG\_OUTPUT environment variable.

### Loading OSPRay extensions at runtime
### Loading OSPRay Extensions at Runtime

OSPRay's functionality can be extended via plugins, which are
implemented in shared libraries. To load plugin `name` from
Expand Down Expand Up @@ -579,27 +581,28 @@ summarized in the table below. If `voxelRange` is not provided for a
volume OSPRay will compute it based on the voxel data, which may result
in slower data updates.

| Type | Name | Description |
|:-------|:------------------------|:-------------------------------------------------------------------------|
| vec3i | dimensions | number of voxels in each dimension $(x, y, z)$ |
| string | voxelType | data type of each voxel, currently supported are: |
|   |   | "uchar" (8 bit unsigned integer) |
|   |   | "ushort" (16 bit unsigned integer) |
|   |   | "float" (32 bit single precision floating point) |
|   |   | "double" (64 bit double precision floating point) |
| vec2f | voxelRange | minimum and maximum of the scalar values |
| vec3f | gridOrigin | origin of the grid in world-space, default $(0, 0, 0)$ |
| vec3f | gridSpacing | size of the grid cells in world-space, default $(1, 1, 1)$ |
| bool | gradientShadingEnabled | volume is rendered with surface shading according to normalized gradient |
| bool | preIntegration | enable using pre-integration for transferFunction lookups |
| bool | singleShade | shade only at the point of maximum intensity |
| bool | adaptiveSampling | adapt ray step size based on opacity |
| float | adaptiveScalar | modifier for adaptive step size |
| float | adaptiveMaxSamplingRate | maximum sampling rate for adaptive sampling |
| float | samplingRate | sampling rate of the volume. This is the minumum step size for adaptive. |
| vec3f | specular | specular component for shading |
| vec3f | volumeClippingBoxLower | clip the volume values in object coordinates |
| vec3f | volumeClippingBoxUpper | clip the volume values in object coordinates |
| Type | Name | Default| Description |
|:-------|:------------------------|------------:|:----------------------------------------------------------------------------------|
| vec3i | dimensions | | number of voxels in each dimension $(x, y, z)$ |
| string | voxelType | | data type of each voxel, currently supported are: |
| | | | "uchar" (8 bit unsigned integer) |
| | | | "short" (16 bit signed integer) |
| | | | "ushort" (16 bit unsigned integer) |
| | | | "float" (32 bit single precision floating point) |
| | | | "double" (64 bit double precision floating point) |
| vec2f | voxelRange | | minimum and maximum of the scalar values |
| vec3f | gridOrigin | $(0, 0, 0)$| origin of the grid in world-space |
| vec3f | gridSpacing | $(1, 1, 1)$| size of the grid cells in world-space |
| bool | gradientShadingEnabled | false| volume is rendered with surface shading wrt. to normalized gradient |
| bool | preIntegration | false| use pre-integration for [transfer function](#transfer-function) lookups |
| bool | singleShade | true| shade only at the point of maximum intensity |
| bool | adaptiveSampling | true| adapt ray step size based on opacity |
| float | adaptiveScalar | 15| modifier for adaptive step size |
| float | adaptiveMaxSamplingRate | 2| maximum sampling rate for adaptive sampling |
| float | samplingRate | 0.125| sampling rate of the volume (this is the minimum step size for adaptive sampling) |
| vec3f | specular | gray 0.3| specular color for shading |
| vec3f | volumeClippingBoxLower | disabled| lower coordinate (in object-space) to clip the volume values |
| vec3f | volumeClippingBoxUpper | disabled| upper coordinate (in object-space) to clip the volume values |

: Parameters to configure a structured volume.

Expand Down Expand Up @@ -991,7 +994,7 @@ were rendered with OpenGL. The screen-sized [texture](#texture)
distance of primary rays, thus objects of other renderers can hide
objects rendered by OSPRay.

### Path tracer
### Path Tracer

The path tracer supports soft shadows, indirect illumination and
realistic materials. In addition to the [general parameters](#renderer)
Expand Down Expand Up @@ -1078,11 +1081,11 @@ The call returns `NULL` if that type of camera is not known by the
renderer, or else an `OSPLight` handle to the created light source. All
light sources[^2] accept the following parameters:

| Type | Name | Default | Description |
|:---------|:----------|:--------|:---------------------------------------|
| vec3f(a) | color | white | color of the light |
| float | intensity | 1 | intensity of the light (a factor) |
| bool | isVisible | true | whether the light can be directly seen |
| Type | Name | Default| Description |
|:---------|:----------|--------:|:---------------------------------------|
| vec3f(a) | color | white| color of the light |
| float | intensity | 1| intensity of the light (a factor) |
| bool | isVisible | true| whether the light can be directly seen |

: Parameters accepted by the all lights.

Expand Down
1 change: 1 addition & 0 deletions apps/common/commandline/RendererParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ void DefaultRendererParser::finalize()
{
parsedRenderer.set("aoSamples", aoSamples);
parsedRenderer.set("shadowsEnabled", shadows);
parsedRenderer.set("aoTransparencyEnabled", 1);
}

parsedRenderer.set("spp", spp);
Expand Down
1 change: 1 addition & 0 deletions apps/common/sg/common/Integrator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ namespace ospray {
{
ospSet1i(ospRenderer, "aoSamples", 1);
ospSet1i(ospRenderer, "shadowsEnabled", 1);
ospSet1i(ospRenderer, "aoTransparencyEnabled", 1);
}

if (!ospRenderer)
Expand Down
2 changes: 1 addition & 1 deletion apps/common/widgets/OSPGlutViewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ void OSPGlutViewer::display()

renderer.renderFrame(frameBuffer, OSP_FB_COLOR | OSP_FB_ACCUM);

// set the glut3d widget's frame buffer to the opsray frame buffer,
// set the glut3d widget's frame buffer to the OSPRay frame buffer,
// then display
ucharFB = (uint32_t *)frameBuffer.map(OSP_FB_COLOR);
frameBufferMode = Glut3DWidget::FRAMEBUFFER_UCHAR;
Expand Down
2 changes: 1 addition & 1 deletion apps/common/widgets/glut3D.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ namespace ospray {

/*! initialize everything GLUT-related */
OSPRAY_GLUT3D_INTERFACE void initGLUT(int32_t *ac, const char **av);
/*! switch over to GLUT for control flow. This functoin will not return */
/*! switch over to GLUT for control flow. This function will not return */
OSPRAY_GLUT3D_INTERFACE void runGLUT();

using ospcommon::AffineSpace3fa;
Expand Down
2 changes: 1 addition & 1 deletion apps/ospTutorial.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ void writePPM(const char *fileName,
for (int x = 0; x < size->x; x++) {
out[3*x + 0] = in[4*x + 0];
out[3*x + 1] = in[4*x + 1];
out[3*x + 2] = in[4*x +2 ];
out[3*x + 2] = in[4*x + 2];
}
fwrite(out, 3*size->x, sizeof(char), file);
}
Expand Down
2 changes: 1 addition & 1 deletion apps/ospTutorial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ void writePPM(const char *fileName,
for (int x = 0; x < size.x; x++) {
out[3*x + 0] = in[4*x + 0];
out[3*x + 1] = in[4*x + 1];
out[3*x + 2] = in[4*x +2 ];
out[3*x + 2] = in[4*x + 2];
}
fwrite(out, 3*size.x, sizeof(char), file);
}
Expand Down
3 changes: 1 addition & 2 deletions apps/volumeViewer/VolumeViewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,6 @@ void VolumeViewer::setPlane(bool st)
}
}

//! Set gradient shading flag on all volumes.
void VolumeViewer::setAOWeight(double value)
{
ospSet1f(renderer, "aoWeight", value);
Expand All @@ -476,7 +475,6 @@ void VolumeViewer::setAOWeight(double value)
render();
}

//! Set gradient shading flag on all volumes.
void VolumeViewer::setAOSamples(int value)
{
if (aoSamples != value)
Expand Down Expand Up @@ -777,6 +775,7 @@ void VolumeViewer::initObjects(const std::string &renderer_type)
{
ospSet1i(renderer, "aoSamples", 1);
ospSet1i(renderer, "shadowsEnabled", 1);
ospSet1i(renderer, "aoTransparencyEnabled", 1);
}

// Create OSPRay ambient and directional lights. GUI elements will modify their parameters.
Expand Down
13 changes: 7 additions & 6 deletions cmake/configure_embree.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ ELSE()
ENDIF()
ENDIF()

IF (${EMBREE_MAX_ISA} STREQUAL "NONE")
IF (EMBREE_MAX_ISA STREQUAL "NONE")
SET(EMBREE_ISA_SUPPORTS_SSE4 ${EMBREE_ISA_SSE42})
SET(EMBREE_ISA_SUPPORTS_AVX ${EMBREE_ISA_AVX})
SET(EMBREE_ISA_SUPPORTS_AVX2 ${EMBREE_ISA_AVX2})
Expand All @@ -62,17 +62,18 @@ ELSE()
SET(EMBREE_ISA_SUPPORTS_AVX FALSE)
SET(EMBREE_ISA_SUPPORTS_AVX2 FALSE)
SET(EMBREE_ISA_SUPPORTS_AVX512 FALSE)

IF (${EMBREE_MAX_ISA} STREQUAL "SSE4.1")


IF (EMBREE_MAX_ISA MATCHES "SSE4\\.[12]$")
SET(EMBREE_ISA_SUPPORTS_SSE4 TRUE)
ELSEIF (${EMBREE_MAX_ISA} STREQUAL "AVX")
ELSEIF (EMBREE_MAX_ISA STREQUAL "AVX")
SET(EMBREE_ISA_SUPPORTS_SSE4 TRUE)
SET(EMBREE_ISA_SUPPORTS_AVX TRUE)
ELSEIF (${EMBREE_MAX_ISA} STREQUAL "AVX2")
ELSEIF (EMBREE_MAX_ISA STREQUAL "AVX2")
SET(EMBREE_ISA_SUPPORTS_SSE4 TRUE)
SET(EMBREE_ISA_SUPPORTS_AVX TRUE)
SET(EMBREE_ISA_SUPPORTS_AVX2 TRUE)
ELSEIF (${EMBREE_MAX_ISA} STREQUAL "AVX512KNL")
ELSEIF (EMBREE_MAX_ISA STREQUAL "AVX512KNL")
SET(EMBREE_ISA_SUPPORTS_SSE4 TRUE)
SET(EMBREE_ISA_SUPPORTS_AVX TRUE)
SET(EMBREE_ISA_SUPPORTS_AVX2 TRUE)
Expand Down
2 changes: 1 addition & 1 deletion cmake/ospray_options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

SET(OSPRAY_VERSION_MAJOR 1)
SET(OSPRAY_VERSION_MINOR 2)
SET(OSPRAY_VERSION_PATCH 0)
SET(OSPRAY_VERSION_PATCH 1)
SET(OSPRAY_VERSION_GITHASH 0)
IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git)
FIND_PACKAGE(Git)
Expand Down
1 change: 1 addition & 0 deletions cmake/package.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ ELSE() # Linux specific settings
#SET(CPACK_RPM_CHANGELOG_FILE "") # ChangeLog of the RPM; also CHANGELOG.md is not in the required format
SET(CPACK_RPM_PACKAGE_ARCHITECTURE x86_64)
SET(CPACK_RPM_PACKAGE_URL http://www.ospray.org/)
SET(CPACK_RPM_DEFAULT_DIR_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)

# post install and uninstall scripts
SET(CPACK_RPM_lib_POST_INSTALL_SCRIPT_FILE ${PROJECT_SOURCE_DIR}/scripts/rpm_ldconfig.sh)
Expand Down
3 changes: 2 additions & 1 deletion components/ospcommon/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ ELSE()

tasking/parallel_for.inl
tasking/parallel_for.h
tasking/async.inl
tasking/async.h
tasking/schedule.inl
tasking/schedule.h
tasking/tasking_system_handle.cpp
tasking/TaskingTypeTraits.h
tasking/TaskSys.cpp
Expand Down
32 changes: 16 additions & 16 deletions components/ospcommon/tasking/TaskingTypeTraits.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,25 +45,25 @@ namespace ospcommon {
template <typename T>
struct has_operator_method_with_integral_param
{
using T_SHORT_PARAM = void(T::*)(short) const;
using T_INT_PARAM = void(T::*)(int) const;
using T_UNSIGNED_PARAM = void(T::*)(unsigned int) const;
using T_SIZET_PARAM = void(T::*)(size_t) const;
template <typename P>
using t_param = void(T::*)(P) const;
using byte_t = unsigned char;
using operator_t = decltype(&T::operator());

using PARAM_IS_SHORT = std::is_same<T_SHORT_PARAM,
decltype(&T::operator())>;
using PARAM_IS_INT = std::is_same<T_INT_PARAM,
decltype(&T::operator())>;
using PARAM_IS_UNSIGNED = std::is_same<T_UNSIGNED_PARAM,
decltype(&T::operator())>;
using PARAM_IS_SIZET = std::is_same<T_SIZET_PARAM,
decltype(&T::operator())>;
using param_is_byte = std::is_same<t_param<byte_t> , operator_t>;
using param_is_short = std::is_same<t_param<short> , operator_t>;
using param_is_int = std::is_same<t_param<int> , operator_t>;
using param_is_unsigned = std::is_same<t_param<unsigned>, operator_t>;
using param_is_long = std::is_same<t_param<long> , operator_t>;
using param_is_size_t = std::is_same<t_param<size_t> , operator_t>;

static const bool value = has_operator_method<T>::value &&
(PARAM_IS_SHORT::value
|| PARAM_IS_INT::value
|| PARAM_IS_UNSIGNED::value
|| PARAM_IS_SIZET::value);
(param_is_byte::value ||
param_is_short::value ||
param_is_int::value ||
param_is_unsigned::value ||
param_is_long::value ||
param_is_size_t::value);
};

} // ::ospcommon
Loading

0 comments on commit be966e3

Please sign in to comment.