Skip to content

Commit 5269850

Browse files
committed
Merge branch 'release-2.7.x'
2 parents a783bf9 + bdde2c8 commit 5269850

41 files changed

Lines changed: 731 additions & 418 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,23 @@
11
Version History
22
---------------
33

4+
### Changes in v2.7.1:
5+
6+
- Use Open VKL v1.0.1 to fix sporadic slowdowns when rendering
7+
structured regular and VDB volumes with the SciVis renderer
8+
- Fix CMake variables and logic
9+
- Fix crash when transferfunction.opacity = 0
10+
- Fix bug in MPI data-parallel rendering that caused rendering to hang
11+
- Workaround dynamic linking issue on Windows in MPI distributed
12+
rendering
13+
- Correctly initialize renderFrame progress
14+
- Improved performance of data-parallel rendering for scenes with
15+
a large number of regions
16+
- Expanded camera model support of the data-parallel renderer,
17+
data-parallel rendering can now use all the camera models supported
18+
by the scivis renderer
19+
- Clarify documentation and error messages
20+
421
### Changes in v2.7.0:
522

623
- Add support for transformation and camera Motion Blur (with the path

README.md

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
OSPRay
22
======
33

4-
This is release v2.7.0 of Intel® OSPRay. For changes and new features
4+
This is release v2.7.1 of Intel® OSPRay. For changes and new features
55
see the [changelog](CHANGELOG.md). Visit http://www.ospray.org for more
66
information.
77

@@ -100,7 +100,7 @@ before you can build OSPRay you need the following prerequisites:
100100
`embree_DIR`.
101101

102102
- OSPRay also heavily uses Intel [Open VKL](https://www.openvkl.org/),
103-
installing version 1.0.0 or newer is required. If Open VKL is not
103+
installing version 1.0.1 or newer is required. If Open VKL is not
104104
found by CMake its location can be hinted with the variable
105105
`openvkl_DIR`.
106106

@@ -1782,17 +1782,16 @@ group.
17821782
By adding `OSPGeometricModel`s to the `clippingGeometry` array a
17831783
clipping geometry feature is enabled. Geometries assigned to this
17841784
parameter will be used as clipping geometries. Any supported geometry
1785-
can be used for clipping. The only requirement is that it has to
1786-
distinctly partition space into clipping and non-clipping one. These
1787-
include: spheres, boxes, infinite planes, closed meshes, closed
1788-
subdivisions and curves. All geometries and volumes assigned to
1789-
`geometry` or `volume` will be clipped. Use of clipping geometry that is
1790-
not closed (or infinite) will result in rendering artifacts. User can
1791-
decide which part of space is clipped by changing shading normals
1792-
orientation with the `invertNormals` flag of the
1793-
[GeometricModel](#geometricmodels). When more than single clipping
1794-
geometry is defined all clipping areas will be “added” together – an
1795-
union of these areas will be applied.
1785+
can be used for clipping[6], the only requirement is that it has to
1786+
distinctly partition space into clipping and non-clipping one. The use
1787+
of clipping geometry that is not closed or infinite could result in
1788+
rendering artifacts. User can decide which part of space is clipped by
1789+
changing shading normals orientation with the `invertNormals` flag of
1790+
the [GeometricModel](#geometricmodels). All geometries and volumes
1791+
assigned to `geometry` or `volume` will be clipped. All clipping
1792+
geometries from all groups and [Instances](#instances) will be combined
1793+
together – a union of these areas will be applied to all other objects
1794+
in the [world](#world).
17961795
17971796
| Type | Name | Default | Description |
17981797
|:-----------------------|:-----------------|--------:|:----------------------------------------------------------------------------------------------------------------------------------------------------------------|
@@ -1848,7 +1847,7 @@ world has been committed. To get this information, call
18481847
OSPBounds ospGetBounds(OSPObject);
18491848
```
18501849
1851-
The result is returned in the provided `OSPBounds`[6] struct:
1850+
The result is returned in the provided `OSPBounds`[7] struct:
18521851
18531852
``` cpp
18541853
typedef struct {
@@ -1957,7 +1956,7 @@ renderers, the SciVis renderer supports the following parameters:
19571956
Special parameters understood by the SciVis renderer.
19581957
19591958
Note that the intensity (and color) of AO is deduced from an [ambient
1960-
light](#ambient-light) in the `lights` array.[7] If `aoSamples` is zero
1959+
light](#ambient-light) in the `lights` array.[8] If `aoSamples` is zero
19611960
(the default) then ambient lights cause ambient illumination (without
19621961
occlusion).
19631962
@@ -2074,7 +2073,7 @@ the opacity `d`.
20742073
Normal mapping can simulate small geometric features via the texture
20752074
`map_Bump`. The normals *n* in the normal map are with respect to the
20762075
local tangential shading coordinate system and are encoded as
2077-
½(*n* + 1), thus a texel (0.5, 0.5, 1)[8] represents the unperturbed
2076+
½(*n* + 1), thus a texel (0.5, 0.5, 1)[9] represents the unperturbed
20782077
shading normal (0, 0, 1). Because of this encoding an sRGB gamma
20792078
[texture](#texture) format is ignored and normals are always fetched as
20802079
linear from a normal map. Note that the orientation of normal maps is
@@ -3225,7 +3224,7 @@ ospTutorial
32253224
32263225
A minimal working example demonstrating how to use OSPRay can be found
32273226
at
3228-
[`apps/tutorials/ospTutorial.c`](https://github.com/ospray/ospray/blob/master/apps/ospTutorial/ospTutorial.c)[9].
3227+
[`apps/tutorials/ospTutorial.c`](https://github.com/ospray/ospray/blob/master/apps/ospTutorial/ospTutorial.c)[10].
32293228
32303229
An example of building `ospTutorial.c` with CMake can be found in
32313230
[`apps/tutorials/ospTutorialFindospray/`](https://github.com/ospray/ospray/tree/master/apps/ospTutorial/ospTutorialFindospray).
@@ -3384,7 +3383,7 @@ ospMPIDistribTutorial
33843383
33853384
A minimal working example demonstrating how to use OSPRay for rendering
33863385
distributed data can be found at
3387-
[`modules/mpi/tutorials/ospMPIDistribTutorial.c`](https://github.com/ospray/ospray/blob/master/modules/mpi/tutorials/ospMPIDistribTutorial.c)[10].
3386+
[`modules/mpi/tutorials/ospMPIDistribTutorial.c`](https://github.com/ospray/ospray/blob/master/modules/mpi/tutorials/ospMPIDistribTutorial.c)[11].
33883387
33893388
The compilation process via CMake is the similar to
33903389
[`apps/tutorials/ospTutorialFindospray/`](https://github.com/ospray/ospray/tree/master/apps/ospTutorial/ospTutorialFindospray),
@@ -3508,22 +3507,25 @@ voxel changes the quickest.
35083507
35093508
[5] actually a parallelogram
35103509
3511-
[6] `OSPBounds` has essentially the same layout as the `OSP_BOX3F`
3510+
[6] including spheres, boxes, infinite planes, closed meshes, closed
3511+
subdivisions and curves
3512+
3513+
[7] `OSPBounds` has essentially the same layout as the `OSP_BOX3F`
35123514
[`OSPDataType`](#data).
35133515
3514-
[7] If there are multiple ambient lights then their contribution is
3516+
[8] If there are multiple ambient lights then their contribution is
35153517
added.
35163518
3517-
[8] respectively (127, 127, 255) for 8 bit textures and
3519+
[9] respectively (127, 127, 255) for 8 bit textures and
35183520
(32767, 32767, 65535) for 16 bit textures
35193521
3520-
[9] A C++ version that uses the C++ convenience wrappers of OSPRay’s C99
3521-
API via
3522+
[10] A C++ version that uses the C++ convenience wrappers of OSPRay’s
3523+
C99 API via
35223524
[`include/ospray/ospray_cpp.h`](https://github.com/ospray/ospray/blob/master/ospray/include/ospray/ospray_cpp.h)
35233525
is available at
35243526
[`apps/tutorials/ospTutorial.cpp`](https://github.com/ospray/ospray/blob/master/apps/ospTutorial/ospTutorial.cpp).
35253527
3526-
[10] A C++ version that uses the C++ convenience wrappers of OSPRay’s
3528+
[11] A C++ version that uses the C++ convenience wrappers of OSPRay’s
35273529
C99 API via
35283530
[`include/ospray/ospray_cpp.h`](https://github.com/ospray/ospray/blob/master/ospray/include/ospray/ospray_cpp.h)
35293531
is available at

apps/common/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
## Copyright 2009-2020 Intel Corporation
1+
## Copyright 2009-2021 Intel Corporation
22
## SPDX-License-Identifier: Apache-2.0
33

4-
if (NOT OSPRAY_APPS_BENCHARK AND
4+
if (NOT OSPRAY_APPS_BENCHMARK AND
55
NOT OSPRAY_APPS_EXAMPLES AND
66
NOT OSPRAY_APPS_TESTING)
77
return()

cmake/ospray_options.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ set(OSPRAY_CMAKECONFIG_DIR
1313

1414
set(RKCOMMON_VERSION_REQUIRED 1.7.0)
1515
set(EMBREE_VERSION_REQUIRED 3.13.1)
16-
set(OPENVKL_VERSION_REQUIRED 1.0.0)
16+
set(OPENVKL_VERSION_REQUIRED 1.0.1)
1717

1818
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
1919
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})

cmake/ospray_version.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
set(OSPRAY_VERSION_MAJOR 2)
55
set(OSPRAY_VERSION_MINOR 7)
6-
set(OSPRAY_VERSION_PATCH 0)
6+
set(OSPRAY_VERSION_PATCH 1)
77
set(OSPRAY_SOVERSION 2)
88
set(OSPRAY_VERSION_GITHASH 0)
99
set(OSPRAY_VERSION_NOTE "")

doc/api.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1697,16 +1697,16 @@ group.
16971697
By adding `OSPGeometricModel`s to the `clippingGeometry` array a
16981698
clipping geometry feature is enabled. Geometries assigned to this
16991699
parameter will be used as clipping geometries. Any supported geometry
1700-
can be used for clipping. The only requirement is that it has to
1701-
distinctly partition space into clipping and non-clipping one. These
1702-
include: spheres, boxes, infinite planes, closed meshes, closed
1703-
subdivisions and curves. All geometries and volumes assigned to
1704-
`geometry` or `volume` will be clipped. Use of clipping geometry that is
1705-
not closed (or infinite) will result in rendering artifacts. User can
1706-
decide which part of space is clipped by changing shading normals
1707-
orientation with the `invertNormals` flag of the [GeometricModel]. When
1708-
more than single clipping geometry is defined all clipping areas will be
1709-
"added" together – an union of these areas will be applied.
1700+
can be used for clipping^[including spheres, boxes, infinite planes,
1701+
closed meshes, closed subdivisions and curves], the only requirement is
1702+
that it has to distinctly partition space into clipping and non-clipping
1703+
one. The use of clipping geometry that is not closed or infinite could
1704+
result in rendering artifacts. User can decide which part of space is
1705+
clipped by changing shading normals orientation with the `invertNormals`
1706+
flag of the [GeometricModel]. All geometries and volumes assigned to
1707+
`geometry` or `volume` will be clipped. All clipping geometries from all
1708+
groups and [Instances] will be combined together – a union of these
1709+
areas will be applied to all other objects in the [world].
17101710

17111711
-------------------- ---------------- ---------- --------------------------------------
17121712
Type Name Default Description

doc/compilation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ before you can build OSPRay you need the following prerequisites:
4444
or newer is required. If Embree is not found by CMake its location
4545
can be hinted with the variable `embree_DIR`.
4646
- OSPRay also heavily uses Intel [Open VKL](https://www.openvkl.org/),
47-
installing version 1.0.0 or newer is required. If Open VKL is not
47+
installing version 1.0.1 or newer is required. If Open VKL is not
4848
found by CMake its location can be hinted with the variable
4949
`openvkl_DIR`.
5050
- OSPRay also provides an optional module implementing the `denoiser`

modules/mpi/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ cmake_dependent_option(
1313
OSPRAY_MPI_BUILD_TUTORIALS
1414
"Enable MPI module sample apps"
1515
ON
16-
"OSPRAY_MODULE_MPI;OSPRAY_ENABLE_APPS"
16+
"OSPRAY_MODULE_MPI;OSPRAY_ENABLE_APPS;OSPRAY_APPS_EXAMPLES"
1717
OFF
1818
)
1919

modules/mpi/ospray/common/DistributedWorld.cpp

Lines changed: 35 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -16,55 +16,6 @@ namespace mpi {
1616

1717
using namespace rkcommon;
1818

19-
void RegionScreenBounds::extend(const vec3f &p)
20-
{
21-
if (p.z < 0) {
22-
bounds = box2f(vec2f(0), vec2f(1));
23-
} else {
24-
bounds.extend(vec2f(p.x * sign(p.z), p.y * sign(p.z)));
25-
bounds.lower.x = clamp(bounds.lower.x);
26-
bounds.upper.x = clamp(bounds.upper.x);
27-
bounds.lower.y = clamp(bounds.lower.y);
28-
bounds.upper.y = clamp(bounds.upper.y);
29-
}
30-
}
31-
32-
Region::Region(const box3f &bounds, int id) : bounds(bounds), id(id) {}
33-
34-
RegionScreenBounds Region::project(const Camera *camera) const
35-
{
36-
RegionScreenBounds screen;
37-
for (int k = 0; k < 2; ++k) {
38-
vec3f pt;
39-
pt.z = k == 0 ? bounds.lower.z : bounds.upper.z;
40-
41-
for (int j = 0; j < 2; ++j) {
42-
pt.y = j == 0 ? bounds.lower.y : bounds.upper.y;
43-
44-
for (int i = 0; i < 2; ++i) {
45-
pt.x = i == 0 ? bounds.lower.x : bounds.upper.x;
46-
47-
ProjectedPoint proj = camera->projectPoint(pt);
48-
screen.extend(proj.screenPos);
49-
screen.depth = std::max(length(pt - camera->pos), screen.depth);
50-
}
51-
}
52-
}
53-
return screen;
54-
}
55-
56-
bool Region::operator==(const Region &b) const
57-
{
58-
// TODO: Do we want users to specify the ID explitly? Or should we just
59-
// assume that two objects with the same bounds have the same id?
60-
return id == b.id;
61-
}
62-
63-
bool Region::operator<(const Region &b) const
64-
{
65-
return id < b.id;
66-
}
67-
6819
DistributedWorld::DistributedWorld() : mpiGroup(mpicommon::worker.dup())
6920
{
7021
managedObjectType = OSP_WORLD;
@@ -79,8 +30,8 @@ DistributedWorld::~DistributedWorld()
7930
box3f DistributedWorld::getBounds() const
8031
{
8132
box3f bounds;
82-
for (const auto &r : allRegions) {
83-
bounds.extend(r.bounds);
33+
for (const auto &b : allRegions) {
34+
bounds.extend(b);
8435
}
8536
return bounds;
8637
}
@@ -129,16 +80,41 @@ void DistributedWorld::commit()
12980
// to the others to build the distributed world
13081
std::sort(
13182
myRegions.begin(), myRegions.end(), [](const box3f &a, const box3f &b) {
132-
std::less<vec3f> op;
133-
return op(a.lower, b.lower)
134-
|| (a.lower == b.lower && op(a.upper, b.upper));
83+
return a.lower < b.lower || (a.lower == b.lower && a.upper < b.upper);
13584
});
13685
auto last = std::unique(myRegions.begin(), myRegions.end());
13786
myRegions.erase(last, myRegions.end());
13887

13988
exchangeRegions();
14089

141-
ispc::DistributedWorld_set(getIE(), allRegions.data(), allRegions.size());
90+
if (regionScene) {
91+
rtcReleaseScene(regionScene);
92+
regionScene = nullptr;
93+
}
94+
95+
if (allRegions.size() > 0) {
96+
// Setup the boxes geometry which we'll use to leverage Embree for
97+
// accurately determining region visibility
98+
Data* allRegionsData = new Data(allRegions.data(),
99+
OSP_BOX3F,
100+
vec3ul(allRegions.size(), 1, 1),
101+
vec3l(0));
102+
regionGeometry = new Boxes();
103+
regionGeometry->setParam("box", (ManagedObject *)allRegionsData);
104+
regionGeometry->setDevice(embreeDevice);
105+
regionGeometry->commit();
106+
107+
regionScene = rtcNewScene(embreeDevice);
108+
rtcAttachGeometry(regionScene, regionGeometry->embreeGeometry);
109+
rtcSetSceneFlags(regionScene, RTC_SCENE_FLAG_CONTEXT_FILTER_FUNCTION);
110+
rtcCommitScene(regionScene);
111+
112+
regionGeometry->refDec();
113+
allRegionsData->refDec();
114+
}
115+
116+
ispc::DistributedWorld_set(
117+
getIE(), allRegions.data(), allRegions.size(), regionScene);
142118
}
143119

144120
void DistributedWorld::exchangeRegions()
@@ -160,11 +136,11 @@ void DistributedWorld::exchangeRegions()
160136
for (const auto &b : myRegions) {
161137
auto fnd = std::find_if(allRegions.begin(),
162138
allRegions.end(),
163-
[&](const Region &r) { return r.bounds == b; });
139+
[&](const box3f &r) { return r == b; });
164140
int id = -1;
165141
if (fnd == allRegions.end()) {
166142
id = allRegions.size();
167-
allRegions.push_back(Region(b, id));
143+
allRegions.push_back(b);
168144
} else {
169145
id = std::distance(allRegions.begin(), fnd);
170146
}
@@ -189,11 +165,11 @@ void DistributedWorld::exchangeRegions()
189165
for (const auto &b : recv) {
190166
auto fnd = std::find_if(allRegions.begin(),
191167
allRegions.end(),
192-
[&](const Region &r) { return r.bounds == b; });
168+
[&](const box3f &r) { return r == b; });
193169
int id = -1;
194170
if (fnd == allRegions.end()) {
195171
id = allRegions.size();
196-
allRegions.push_back(Region(b, id));
172+
allRegions.push_back(b);
197173
} else {
198174
id = std::distance(allRegions.begin(), fnd);
199175
}
@@ -230,10 +206,3 @@ void DistributedWorld::exchangeRegions()
230206
} // namespace mpi
231207
} // namespace ospray
232208

233-
using namespace ospray::mpi;
234-
235-
std::ostream &operator<<(std::ostream &os, const Region &r)
236-
{
237-
os << "Region { id = " << r.id << ", bounds = " << r.bounds << " }";
238-
return os;
239-
}

0 commit comments

Comments
 (0)