Skip to content

Commit

Permalink
Merge branch 'release-0.9'
Browse files Browse the repository at this point in the history
  • Loading branch information
gregjohnson committed Dec 18, 2015
2 parents 402cdc7 + 456d633 commit 2099a05
Show file tree
Hide file tree
Showing 902 changed files with 79,969 additions and 66,186 deletions.
35 changes: 32 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,35 @@
Version History
---------------

### Changes in v0.9.0:

The OSPRay v0.9.0 release adds significant new features as well as API
changes.

- Experimental support for data-distributed MPI-parallel volume
rendering
- New SciVis-focused renderer ("raytracer" or "scivis") combining
functionality of "obj" and "ao" renderers
- Ambient occlusion is quite flexible: dynamic number of samples,
maximum ray distance, and weight
- Updated Embree version to v2.7.1 with native support for AVX512 for
triangle mesh surface rendering on the Intel® Xeon Phi™ processor
(codename Knights Landing)
- OSPRay now uses C++11 features, requiring up to date compiler and
standard library versions (GCC v4.8.0)
- Optimization of volume sampling resulting in volume rendering
speedups of up to 1.5x
- Updates to pathtracer
- Reworked material system
- Added texture transformations and colored transparency in OBJ
material
- Support for alpha and depth components of framebuffer
- Added thinlens camera, i.e. support for depth of field
- Tasking system has been updated to use Intel® Threading Building
Blocks (TBB)
- The `ospGet*()` API calls have been deprecated and will be removed
in a subsequent release

### Changes in v0.8.3:

- Enhancements and optimizations to path tracer
Expand All @@ -11,7 +40,7 @@ Version History
- Expanded material support
- Support for multiple lights
- Support for double precision volumes
- Added ospSampleVolume() API call to support limited probing of
- Added `ospSampleVolume()` API call to support limited probing of
volume values
- New features to support compositing externally rendered content with
OSPRay-rendered content
Expand All @@ -20,10 +49,10 @@ Version History
- New OpenGL utility module to convert between OSPRay and OpenGL
depth values
- Added panoramic and orthographic camera types
- Proper CMake-based installation of OSPRay and CMake find_package()
- Proper CMake-based installation of OSPRay and CMake `find_package()`
support for use in external projects
- Experimental Windows support
- Deprecated ospNewTriangleMesh(); use ospNewGeometry("triangles")
- Deprecated `ospNewTriangleMesh()`; use `ospNewGeometry("triangles")`
instead
- Bug fixes and cleanups throughout the codebase

Expand Down
53 changes: 28 additions & 25 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,30 @@
PROJECT(OSPRay)

CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
IF(COMMAND cmake_policy)
CMAKE_POLICY(SET CMP0003 NEW)

IF(${CMAKE_MAJOR_VERSION} EQUAL 3)
CMAKE_POLICY(SET CMP0042 NEW)
ENDIF(${CMAKE_MAJOR_VERSION} EQUAL 3)
ENDIF(COMMAND cmake_policy)
CMAKE_POLICY(SET CMP0003 NEW) # since 2.6
IF(POLICY CMP0015)
CMAKE_POLICY(SET CMP0015 NEW) # since 2.8.1
ENDIF()
IF(POLICY CMP0042)
CMAKE_POLICY(SET CMP0042 NEW) # since 3.0
ENDIF()
IF(POLICY CMP0054)
CMAKE_POLICY(SET CMP0054 OLD) # since 3.1
ENDIF()

SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/cmake)
SET(OSPRAY_VERSION_MAJOR 0)
SET(OSPRAY_VERSION_MINOR 8)
SET(OSPRAY_VERSION_PATCH 3)
SET(OSPRAY_VERSION_MINOR 9)
SET(OSPRAY_VERSION_PATCH 0)
SET(OSPRAY_VERSION
${OSPRAY_VERSION_MAJOR}.${OSPRAY_VERSION_MINOR}.${OSPRAY_VERSION_PATCH}
)
SET(OSPRAY_SOVERSION 0)

MACRO(PRINT var)
MESSAGE("${var} = ${${var}}")
ENDMACRO()

SET(CONFIGURATION_TYPES "Debug;Release;RelWithDebInfo")
IF (WIN32)
IF (NOT DEFAULT_CMAKE_CONFIGURATION_TYPES_SET)
Expand All @@ -47,8 +54,6 @@ ELSE()
ENDIF()
ENDIF()

MARK_AS_ADVANCED(CMAKE_INSTALL_PREFIX)

SET(OSPRAY_BINARY_DIR ${PROJECT_BINARY_DIR})
SET(LIBRARY_OUTPUT_PATH ${OSPRAY_BINARY_DIR})
SET(EXECUTABLE_OUTPUT_PATH ${OSPRAY_BINARY_DIR})
Expand All @@ -58,18 +63,8 @@ LINK_DIRECTORIES(${LIBRARY_OUTPUT_PATH})
OPTION(OSPRAY_BUILD_ENABLE_KNL "Enable experimental 'Knights Landing' build?")
MARK_AS_ADVANCED(OSPRAY_BUILD_ENABLE_KNL)

# compiler selection for the non-MIC part
IF (WIN32)
SET(OSPRAY_COMPILER "MSVC" CACHE INTERNAL "MSVC used on Windows.")
ELSE()
IF (APPLE)
SET(OSPRAY_COMPILER "CLANG" CACHE STRING "compiler to use (ICC,GCC, or CLANG)")
SET_PROPERTY(CACHE OSPRAY_COMPILER PROPERTY STRINGS ICC GCC CLANG)
ELSE(APPLE)
SET(OSPRAY_COMPILER "GCC" CACHE STRING "compiler to use (ICC or GCC)")
SET_PROPERTY(CACHE OSPRAY_COMPILER PROPERTY STRINGS ICC GCC)
ENDIF(APPLE)
ENDIF()
OPTION(OSPRAY_VOLUME_VOXELRANGE_IN_APP "Move 'voxelrange' computations to app?" OFF)
MARK_AS_ADVANCED(OSPRAY_VOLUME_VOXELRANGE_IN_APP)

IF (WIN32)
SET(OSPRAY_BUILD_MIC_SUPPORT OFF CACHE INTERNAL "OSPRay with KNC not supported on Windows.")
Expand All @@ -89,7 +84,6 @@ ELSE()
ENDIF()

# make ospray target and compiler uppercase - we need this in some other parts of the build system
STRING(TOUPPER ${OSPRAY_COMPILER} OSPRAY_COMPILER)
STRING(TOUPPER ${OSPRAY_BUILD_ISA} OSPRAY_BUILD_ISA)

SET(OSPRAY_MIC ${OSPRAY_BUILD_MIC_SUPPORT})
Expand All @@ -110,7 +104,10 @@ ENDIF(WIN32)

INCLUDE(cmake/ospray.cmake)
INCLUDE(cmake/ispc.cmake)
INCLUDE(cmake/configure_embree.cmake)

SET(OSPRAY_EMBREE_SOURCE_DIR ${PROJECT_SOURCE_DIR}/ospray/embree-v2.7.1)


INCLUDE(cmake/mpi.cmake)
IF(NOT WIN32)
INCLUDE(cmake/doxygen.cmake)
Expand Down Expand Up @@ -153,3 +150,9 @@ IF (OSPRAY_MIC)
SET (OSPRAY_TARGET "mic")
ADD_SUBDIRECTORY(apps builddir/apps/mic)
ENDIF()

# create a configure file that both ospray and ispc can read the cmake config from
# needs to be at the end, after all cache variables have been set
CONFIGURE_FILE(ospray/common/OSPConfig.h.in OSPConfig.h)
INSTALL(FILES ${CMAKE_BINARY_DIR}/OSPConfig.h DESTINATION include/ospray)

57 changes: 39 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
OSPRay
======

This is release v0.8.3 of OSPRay. For changes and new
This is release v0.9.0 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 @@ -95,13 +95,28 @@ CMake is easy:

(We do recommend having separate build directories for different
configurations such as release, debug, etc).

- The compiler CMake will use will default to whatever the `CC` and
`CXX` environment variables point to. Should you want to specify a
different compiler, run cmake manually while specifying the desired
compiler. The default compiler on most linux machines is 'gcc', but
it can be pointed to 'clang' instead by executing the following:

user@mymachine[~/Projects/ospray/release]: cmake
-DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang ..

CMake will now use clang instead of gcc. If you are ok with using
the default compiler on your system, then simply skip this step.
Note that the compiler variables cannot be changed after the first
`cmake` or `ccmake` run.

- Open the CMake configuration dialog

user@mymachine[~/Projects/ospray/release]: ccmake ..

- Make sure to properly set build mode, desired compiler, enable the
components you need, etc; then type 'c'onfigure and 'g'enerate. When
back on the command prompt, build it using
- Make sure to properly set build mode and enable the components you
need, etc; then type 'c'onfigure and 'g'enerate. When back on the
command prompt, build it using

user@mymachine[~/Projects/ospray/release]: make

Expand All @@ -116,30 +131,34 @@ Tutorial
--------

A minimal working example demonstrating how to use OSPRay can be found
at `apps/ospTutorial.cpp`. Build it in the build_directory with
at `apps/ospTutorial.cpp`. On Linux build it in the build_directory with

g++ ../apps/ospTutorial.cpp -I ../ospray/include -I .. -I ../ospray/embree/common -Wl,-rpath,. ./libospray.so -o ospTutorial

On Windows build it in the build_directory\\$Configuration with

g++ ../apps/ospTutorial.cpp -I ../ospray/include -I .. -I ../ospray/embree/common ./libospray.so -o ospTutorial
cl ..\..\apps\ospTutorial.cpp /EHsc -I ..\..\ospray\include -I ..\.. -I ..\..\ospray\embree\common ospray.lib

Running `ospTutorial` will create two images of two triangles, rendered
with the Ambient Occlusion renderer. The first image `firstFrame.ppm` shows the
result after one call to `ospRenderFrame` -- jagged edges and noise in the
shadow can be seen. Calling `ospRenderFrame` multiple times enables
progressive refinement, resulting in antialiased edges and converged
shadows, shown after ten frames in the second image
with the Ambient Occlusion renderer. The first image `firstFrame.ppm`
shows the result after one call to `ospRenderFrame` -- jagged edges and
noise in the shadow can be seen. Calling `ospRenderFrame` multiple times
enables progressive refinement, resulting in antialiased edges and
converged shadows, shown after ten frames in the second image
`accumulatedFrames.png`.

![First frame.][imgTutorial1]

![After accumulating ten frames.][imgTutorial2]


QT Viewer
Qt Viewer
---------

OSPRay also includes a demo viewer application `ospQTViewer`, showcasing all features
OSPRay also includes a demo viewer application `ospQtViewer`, showcasing all features
of OSPRay.

![Screenshot of `ospQTViewer`.][imgQTViewer]
![Screenshot of `ospQtViewer`.][imgQtViewer]


Volume Viewer
Expand All @@ -160,7 +179,9 @@ at the [OSPRay Demos and Examples] page.
[news/updates]: https://ospray.github.io/news.html
[getting OSPRay]: https://ospray.github.io/getting_ospray.html
[OSPRay Demos and Examples]: https://ospray.github.io/demos.html
[imgTutorial1]: https://ospray.github.io/images/tutorial_firstframe.png
[imgTutorial2]: https://ospray.github.io/images/tutorial_accumulatedframe.png
[imgQTViewer]: https://ospray.github.io/images/QTViewer.jpg
[imgVolumeViewer]: https://ospray.github.io/images/VolumeViewer.png
[imgTutorial1]: https://ospray.github.io/images/tutorial_firstframe.png
[imgTutorial2]: https://ospray.github.io/images/tutorial_accumulatedframe.png
[imgQtViewer]: https://ospray.github.io/images/QtViewer.jpg
[imgVolumeViewer]: https://ospray.github.io/images/VolumeViewer.png
[imgSpotLight]: https://ospray.github.io/images/spot_light.png
[imgQuadLight]: https://ospray.github.io/images/quad_light.png
5 changes: 4 additions & 1 deletion apps/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ IF(NOT THIS_IS_MIC)

IF(NOT WIN32)
# mini-scene graph viewer for _geometry_ (intentionally simple)
OPTION(OSPRAY_APPS_QTVIEWER "Build ospQTViewer (QT-based model viewer)" ON)
OPTION(OSPRAY_APPS_QTVIEWER "Build ospQtViewer (Qt-based model viewer)" ON)
IF (OSPRAY_APPS_QTVIEWER)
ADD_SUBDIRECTORY(qtViewer)
ENDIF()
Expand Down Expand Up @@ -62,4 +62,7 @@ IF(NOT THIS_IS_MIC)
CONFIGURE_OSPRAY()
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/ospray/include)

# ADD_EXECUTABLE(test1 test1.cpp)
# TARGET_LINK_LIBRARIES(test1 ospray)

ENDIF()
14 changes: 14 additions & 0 deletions apps/common/widgets/glut3D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ namespace ospray {
void Glut3DWidget::display()
{
if (frameBufferMode == Glut3DWidget::FRAMEBUFFER_UCHAR && ucharFB) {
//double before = getSysTime();
glDrawPixels(windowSize.x, windowSize.y, GL_RGBA, GL_UNSIGNED_BYTE, ucharFB);
#ifndef _WIN32
if (animating && dumpScreensDuringAnimation) {
Expand Down Expand Up @@ -314,12 +315,14 @@ namespace ospray {

void Glut3DWidget::drawPixels(const uint32 *framebuffer)
{
throw std::runtime_error("should not be used right now");
glDrawPixels(windowSize.x, windowSize.y, GL_RGBA, GL_UNSIGNED_BYTE, framebuffer);
glutSwapBuffers();
}

void Glut3DWidget::drawPixels(const vec3fa *framebuffer)
{
throw std::runtime_error("should not be used right now");
glDrawPixels(windowSize.x, windowSize.y, GL_RGBA, GL_FLOAT, framebuffer);
glutSwapBuffers();
}
Expand Down Expand Up @@ -405,6 +408,11 @@ namespace ospray {
void initGLUT(int32 *ac, const char **av)
{
glutInit(ac, (char **) av);


// glutInitDisplayMode (GLUT_RGBA | GLUT_SINGLE);
glutInitDisplayMode (GLUT_RGBA | GLUT_DOUBLE);

for(int i = 1; i < *ac;i++)
{
std::string arg(av[i]);
Expand All @@ -428,6 +436,12 @@ namespace ospray {
removeArgs(*ac,(char **&)av,i,1); --i;
continue;
}
if (arg == "--size") {
Glut3DWidget::defaultInitSize.x = atoi(av[i+1]);
Glut3DWidget::defaultInitSize.y = atoi(av[i+2]);
removeArgs(*ac,(char **&)av,i,3); --i;
continue;
}
if (arg == "-vu") {
upVectorFromCmdLine.x = atof(av[i+1]);
upVectorFromCmdLine.y = atof(av[i+2]);
Expand Down
6 changes: 2 additions & 4 deletions apps/common/widgets/glut3D.h
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,8 @@ namespace ospray {
vec3f from;
vec3f up;
vec3f at;
/*! opening angle, in radians, along Y direction */
float openingAngle;
/*! aspect ration i Y:X */
float aspect;
float openingAngle; //!< in radians, along Y direction
float aspect; //!< aspect ratio X:Y
// float focalDistance;

/*! camera frame in which the Y axis is the depth axis, and X
Expand Down
Loading

0 comments on commit 2099a05

Please sign in to comment.