Commit 32b9ceca authored by Andrew Bauer's avatar Andrew Bauer

Option to skip grid redistribution for volume/semi-transparent rendering.

For unstructured grid volume rendering and semi-transparent
surface rendering provide an advanced option to skip geometry
redistribution for depth ordering. Also adding test for using data
partitions functionality.
parent d6213f77
Pipeline #28609 passed with stage
......@@ -402,6 +402,16 @@ if (PARAVIEW_USE_MPI)
# Test uses D3 which is available in MPI only builds.
${CMAKE_CURRENT_SOURCE_DIR}/ExportSelectionToCSV.xml
# Test Use Data Partitions for volume rendering
#${CMAKE_CURRENT_SOURCE_DIR}/UseDataPartitions.xml
)
# This test requires a parallel partition to make sense so we
# skip running it with the built-in server.
add_client_server_tests("pvcs"
TEST_SCRIPTS ${CMAKE_CURRENT_SOURCE_DIR}/UseDataPartitions.xml
)
# Test uses GhostCellsGenerator which is available in MPI only builds.
......
<?xml version="1.0" ?>
<pqevents>
<!-- set the remote render threshold to 0 to make sure that we're doing composited rendering -->
<pqevent object="pqClientMainWindow/menubar/menu_Edit" command="activate" arguments="actionEditSettings" />
<pqevent object="pqClientMainWindow/ApplicationSettings/tabBar" command="set_tab_with_text" arguments="Render View" />
<pqevent object="pqClientMainWindow/ApplicationSettings/stackedWidget/ScrollAreaRenderViewSettings/qt_scrollarea_viewport/Container/ProxyWidget/LODThreshold/DoubleRangeWidget/LineEdit" command="set_string" arguments="0" />
<pqevent object="pqClientMainWindow/ApplicationSettings/buttonBox/1QPushButton2" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/ApplicationSettings/buttonBox/1QPushButton0" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/menubar/menuSources" command="activate" arguments="Wavelet" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/Accept" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/menubar/menuFilters/pqProxyGroupMenuManager0/Threshold" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/Accept" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/pipelineBrowserDock/pipelineBrowser" command="mousePress" arguments="1,1,0,12,13,/0:0/0:1" />
<pqevent object="pqClientMainWindow/pipelineBrowserDock/pipelineBrowser" command="mouseRelease" arguments="1,0,0,12,13,/0:0/0:1" />
<pqevent object="pqClientMainWindow/representationToolbar/displayRepresentation/comboBox" command="set_string" arguments="Volume" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Frame.0/CentralWidgetFrame/Viewport" command="mousePress" arguments="(0.173123,0.278777,1,1,0)" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Frame.0/CentralWidgetFrame/Viewport" command="mouseMove" arguments="(0.2954,0.348321,1,0,0)" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Frame.0/CentralWidgetFrame/Viewport" command="mouseRelease" arguments="(0.2954,0.348321,1,0,0)" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/SearchBox/AdvancedButton" command="set_boolean" arguments="true" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/DisplayFrame/ProxyPanel/UseDataPartitions/CheckBox" command="set_boolean" arguments="true" />
<pqevent object="pqClientMainWindow/variableToolbar/actionScalarBarVisibility" command="set_boolean" arguments="false" />
<pqevent object="pqClientMainWindow/axesToolbar/actionShowOrientationAxes" command="set_boolean" arguments="false" />
<pqcompareview object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Frame.0/CentralWidgetFrame/Viewport" baseline="$PARAVIEW_DATA_ROOT/Baseline/UseDataPartitions1.png" width="300" height="300" />
<!-- now with camera parallel projection -->
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/ViewFrame/ProxyPanel/CameraParallelProjection/CheckBox" command="set_boolean" arguments="true" />
<pqcompareview object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Frame.0/CentralWidgetFrame/Viewport" baseline="$PARAVIEW_DATA_ROOT/Baseline/UseDataPartitions2.png" width="300" height="300" />
<!-- now do the same for a slice through the Wavelet -->
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/Delete" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/representationToolbar/displayRepresentation/comboBox" command="activated" arguments="Surface" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/DisplayFrame/ProxyPanel/UseDataPartitions/CheckBox" command="set_boolean" arguments="true" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/DisplayFrame/ProxyPanel/Opacity/DoubleRangeWidget/LineEdit" command="set_string" arguments=".5" />
<pqcompareview object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Frame.0/CentralWidgetFrame/Viewport" baseline="$PARAVIEW_DATA_ROOT/Baseline/UseDataPartitions3.png" width="300" height="300" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/ViewFrame/ProxyPanel/CameraParallelProjection/CheckBox" command="set_boolean" arguments="false" />
<pqcompareview object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Frame.0/CentralWidgetFrame/Viewport" baseline="$PARAVIEW_DATA_ROOT/Baseline/UseDataPartitions4.png" width="300" height="300" />
</pqevents>
......@@ -158,6 +158,8 @@ vtkGeometryRepresentation::vtkGeometryRepresentation()
this->SetupDefaults();
this->PWF = NULL;
this->UseDataPartitions = false;
}
//----------------------------------------------------------------------------
......@@ -286,6 +288,12 @@ int vtkGeometryRepresentation::ProcessViewRequest(
// start supporting them,
outInfo->Set(vtkPVRenderView::NEED_ORDERED_COMPOSITING(), 1);
// Pass partitioning information to the render view.
if(this->UseDataPartitions == true)
{
vtkPVRenderView::SetOrderedCompositingInformation(
inInfo, this->DataBounds);
}
}
// Finally, let the view know about the geometry bounds. The view uses this
......
......@@ -216,6 +216,14 @@ public:
virtual void SetScalingArrayName(const char*);
virtual void SetScalingFunction(vtkPiecewiseFunction *pwf);
// Description:
// Specify whether or not to redistribute the data. The default is false
// since that is the only way in general to guarantee correct rendering.
// Can set to true if all rendered data sets are based on the same
// data partitioning in order to save on the data redistribution.
vtkSetMacro(UseDataPartitions, bool);
vtkGetMacro(UseDataPartitions, bool);
protected:
vtkGeometryRepresentation();
~vtkGeometryRepresentation();
......@@ -297,6 +305,9 @@ protected:
double DataBounds[6];
vtkPiecewiseFunction *PWF;
bool UseDataPartitions;
private:
vtkGeometryRepresentation(const vtkGeometryRepresentation&) VTK_DELETE_FUNCTION;
void operator=(const vtkGeometryRepresentation&) VTK_DELETE_FUNCTION;
......@@ -308,4 +319,3 @@ private:
};
#endif
......@@ -74,16 +74,16 @@ public:
{ this->IceTCompositePass->SetDataReplicatedOnAllProcesses(val); }
// Description:
// kd tree that gives processes ordering. Initial value is a NULL pointer.
// partition ordering that gives processes ordering. Initial value is a NULL pointer.
// This is used only when UseOrderedCompositing is true.
void SetKdTree(vtkPKdTree *kdtree)
{ this->IceTCompositePass->SetKdTree(kdtree); }
void SetPartitionOrdering(vtkPartitionOrderingInterface *partitionOrdering)
{ this->IceTCompositePass->SetPartitionOrdering(partitionOrdering); }
// Description:
// Set this to true, if compositing must be done in a specific order. This is
// necessary when rendering volumes or translucent geometries. When
// UseOrderedCompositing is set to true, it is expected that the KdTree is set as
// well. The KdTree is used to decide the process-order for compositing.
// UseOrderedCompositing is set to true, it is expected that the PartitionOrdering is set as
// well. The PartitionOrdering is used to decide the process-order for compositing.
void SetUseOrderedCompositing(bool uoc)
{ this->IceTCompositePass->SetUseOrderedCompositing(uoc); }
......
......@@ -642,6 +642,34 @@ void vtkPVDataDeliveryManager::RedistributeDataForOrderedCompositing(
vtkTimerLog::MarkEndEvent("Redistributing Data for Ordered Compositing");
}
//----------------------------------------------------------------------------
void vtkPVDataDeliveryManager::ClearRedistributedData(
bool use_lod)
{
// It seems like we should be able to set each item's RedistributedDataObject
// to NULL in this loop but that doesn't work. For now we're leaving this as
// is to make sure we don't break functionality but this should be revisited
// later.
vtkInternals::ItemsMapType::iterator iter;
for (iter = this->Internals->ItemsMap.begin();
iter != this->Internals->ItemsMap.end(); ++iter)
{
vtkInternals::vtkItem& item = use_lod? iter->second.second : iter->second.first;
if (!item.Redistributable ||
item.Representation == NULL ||
item.Representation->GetVisibility() == false ||
// delivered object can be null in case we're updating lod and the
// representation doeesn't have any LOD data.
item.GetDeliveredDataObject() == NULL)
{
continue;
}
item.SetRedistributedDataObject(item.GetDeliveredDataObject());
}
}
//----------------------------------------------------------------------------
vtkPKdTree* vtkPVDataDeliveryManager::GetKdTree()
{
......
......@@ -125,10 +125,15 @@ public:
vtkPVRenderView* GetRenderView();
// Description:
// Called by the view on ever render when ordered compositing is to be used to
// Called by the view on every render when ordered compositing is to be used to
// ensure that the geometries are redistributed, as needed.
void RedistributeDataForOrderedCompositing(bool use_lod);
// Description:
// Removes all redistributed data that may have been redistributed for ordered compositing
// earlier when using KdTree based redistribution.
void ClearRedistributedData(bool use_load);
// Description:
// Pass the structured-meta-data for determining rendering order for ordered
// compositing.
......
......@@ -46,6 +46,8 @@
#include "vtkMultiProcessStream.h"
#include "vtkNew.h"
#include "vtkObjectFactory.h"
#include "vtkPartitionOrdering.h"
#include "vtkPartitionOrderingInterface.h"
#include "vtkPKdTree.h"
#include "vtkPVAxesWidget.h"
#include "vtkPVCenterAxesActor.h"
......@@ -1256,6 +1258,7 @@ void vtkPVRenderView::Update()
this->NonDistributedRenderingRequired = false;
this->ForceDataDistributionMode = -1;
this->PartitionOrdering->SetImplementation(NULL);
this->Superclass::Update();
// After every update we can expect the representation geometries to change.
......@@ -1460,17 +1463,25 @@ void vtkPVRenderView::Render(bool interactive, bool skip_rendering)
this->GetUseDistributedRenderingForInteractiveRender():
this->GetUseDistributedRenderingForStillRender();
bool use_ordered_compositing = this->GetUseOrderedCompositing();
if (use_ordered_compositing)
if (this->GetUseOrderedCompositing())
{
this->Internals->DeliveryManager->RedistributeDataForOrderedCompositing(
use_lod_rendering);
this->SynchronizedRenderers->SetKdTree(
this->Internals->DeliveryManager->GetKdTree());
if (this->PartitionOrdering->GetImplementation() == NULL ||
this->PartitionOrdering->GetImplementation()->IsA("vtkPKdTree"))
{
this->Internals->DeliveryManager->RedistributeDataForOrderedCompositing(
use_lod_rendering);
this->PartitionOrdering->SetImplementation(this->Internals->DeliveryManager->GetKdTree());
}
else
{
this->Internals->DeliveryManager->ClearRedistributedData(
use_lod_rendering);
}
this->SynchronizedRenderers->SetPartitionOrdering(this->PartitionOrdering.GetPointer());
}
else
{
this->SynchronizedRenderers->SetKdTree(NULL);
this->SynchronizedRenderers->SetPartitionOrdering(NULL);
}
// enable render empty images if it was requested
......@@ -1734,6 +1745,27 @@ void vtkPVRenderView::SetOrderedCompositingInformation(
repr, translator, whole_extents, origin, spacing);
}
//----------------------------------------------------------------------------
void vtkPVRenderView::SetOrderedCompositingInformation(
vtkInformation* info, const double bounds[6])
{
vtkPVRenderView* view = vtkPVRenderView::SafeDownCast(info->Get(VIEW()));
if (!view)
{
vtkGenericWarningMacro("Missing VIEW().");
return;
}
vtkNew<vtkPartitionOrdering> partitionOrdering;
partitionOrdering->Construct(bounds);
view->PartitionOrdering->SetImplementation(partitionOrdering.GetPointer());
}
//----------------------------------------------------------------------------
void vtkPVRenderView::ClearOrderedCompositingInformation()
{
this->PartitionOrdering->SetImplementation(NULL);
}
//----------------------------------------------------------------------------
void vtkPVRenderView::SetDeliverToAllProcesses(vtkInformation* info,
vtkPVDataRepresentation* repr, bool clone)
......
......@@ -45,6 +45,7 @@ class vtkInteractorStyleRubberBandZoom;
class vtkLight;
class vtkLightKit;
class vtkMatrix4x4;
class vtkPartitionOrderingInterface;
class vtkPVAxesWidget;
class vtkPVCenterAxesActor;
class vtkPVDataDeliveryManager;
......@@ -424,6 +425,9 @@ public:
vtkInformation* info, vtkPVDataRepresentation* repr,
vtkExtentTranslator* translator,
const int whole_extents[6], const double origin[3], const double spacing[3]);
static void SetOrderedCompositingInformation(
vtkInformation* info, const double bounds[6]);
void ClearOrderedCompositingInformation();
// Description:
// Some representation only work when remote rendering or local rendering. Use
......@@ -908,6 +912,8 @@ private:
vtkNew<vtkTextRepresentation> Annotation;
void UpdateAnnotationText();
vtkNew<vtkPartitionOrderingInterface> PartitionOrdering;
bool OrientationWidgetVisibility;
int StereoType;
......
......@@ -497,18 +497,19 @@ void vtkPVSynchronizedRenderer::SetDataReplicatedOnAllProcesses(bool replicated)
}
//----------------------------------------------------------------------------
void vtkPVSynchronizedRenderer::SetKdTree(vtkPKdTree* tree)
void vtkPVSynchronizedRenderer::SetPartitionOrdering(
vtkPartitionOrderingInterface* partitionOrdering)
{
#if defined PARAVIEW_USE_ICE_T && defined PARAVIEW_USE_MPI
vtkIceTSynchronizedRenderers* sync =
vtkIceTSynchronizedRenderers::SafeDownCast(this->ParallelSynchronizer);
if (sync)
{
sync->SetKdTree(tree);
sync->SetUseOrderedCompositing(tree != NULL);
sync->SetPartitionOrdering(partitionOrdering);
sync->SetUseOrderedCompositing(partitionOrdering != NULL);
}
#endif
(void)tree;
(void)partitionOrdering;
}
//----------------------------------------------------------------------------
......
......@@ -26,7 +26,7 @@
class vtkFXAAOptions;
class vtkIceTSynchronizedRenderers;
class vtkImageProcessingPass;
class vtkPKdTree;
class vtkPartitionOrderingInterface;
class vtkPVSession;
class vtkRenderer;
class vtkRenderPass;
......@@ -56,9 +56,9 @@ public:
void Initialize(vtkPVSession* session, unsigned int id);
// Description:
// kd tree that gives processes ordering. Initial value is a NULL pointer.
// partition ordering that gives processes ordering. Initial value is a NULL pointer.
// This is used only when UseOrderedCompositing is true.
void SetKdTree(vtkPKdTree *kdtree);
void SetPartitionOrdering(vtkPartitionOrderingInterface* partitionOrdering);
// Description:
// Set the renderer that is being synchronized.
......
......@@ -32,7 +32,7 @@ vtkStandardNewMacro(vtkStructuredGridVolumeRepresentation);
//----------------------------------------------------------------------------
vtkStructuredGridVolumeRepresentation::vtkStructuredGridVolumeRepresentation()
{
this->UseDataParititions = false;
this->UseDataPartitions = false;
this->TableExtentTranslator = vtkTableExtentTranslator::New();
}
......@@ -43,11 +43,11 @@ vtkStructuredGridVolumeRepresentation::~vtkStructuredGridVolumeRepresentation()
}
//----------------------------------------------------------------------------
void vtkStructuredGridVolumeRepresentation::SetUseDataParititions(bool val)
void vtkStructuredGridVolumeRepresentation::SetUseDataPartitions(bool val)
{
if (this->UseDataParititions != val)
if (this->UseDataPartitions != val)
{
this->UseDataParititions = val;
this->UseDataPartitions = val;
this->MarkModified();
}
}
......@@ -74,7 +74,7 @@ int vtkStructuredGridVolumeRepresentation::RequestData(vtkInformation* request,
this->TableExtentTranslator->SetNumberOfPiecesInTable(0);
if (inputVector[0]->GetNumberOfInformationObjects()==1 &&
this->UseDataParititions)
this->UseDataPartitions)
{
// reduce bounds across processes in parallel.
vtkMultiProcessController* controller =
......@@ -151,7 +151,7 @@ int vtkStructuredGridVolumeRepresentation::ProcessViewRequest(
if (request_type == vtkPVView::REQUEST_UPDATE())
{
if (this->GetNumberOfInputConnections(0) == 1 &&
this->UseDataParititions &&
this->UseDataPartitions &&
this->TableExtentTranslator->GetNumberOfPiecesInTable() > 0)
{
vtkAlgorithmOutput* connection = this->GetInputConnection(0, 0);
......@@ -202,5 +202,5 @@ void vtkStructuredGridVolumeRepresentation::PrintSelf(
ostream& os, vtkIndent indent)
{
this->Superclass::PrintSelf(os, indent);
os << indent << "UseDataParititions: " << this->UseDataParititions << endl;
os << indent << "UseDataPartitions: " << this->UseDataPartitions << endl;
}
......@@ -19,8 +19,8 @@
// rendering vtkStructuredGrid datasets with one caveat: it assumes that the
// structured grid is not "curved" i.e. bounding boxes of non-intersecting
// extents don't intersect (or intersect negligibly). This is the default (and
// faster) method. Alternatively, one can set UseDataParititions to
// off and the representation will simply reply on the view to build the sorting
// faster) method. Alternatively, one can set UseDataPartitions to
// off and the representation will simply rely on the view to build the sorting
// order using the unstructured grid. In which case, however data will be
// transferred among processing.
......@@ -44,8 +44,8 @@ public:
// partitioning information from the input structured grid for ordered
// compositing. When off we let the view build its own ordering and
// redistribute data as needed.
void SetUseDataParititions(bool);
vtkGetMacro(UseDataParititions, bool);
void SetUseDataPartitions(bool);
vtkGetMacro(UseDataPartitions, bool);
// Description:
// vtkAlgorithm::ProcessRequest() equivalent for rendering passes. This is
......@@ -67,7 +67,7 @@ protected:
virtual int RequestData(vtkInformation*,
vtkInformationVector**, vtkInformationVector*);
bool UseDataParititions;
bool UseDataPartitions;
vtkTableExtentTranslator* TableExtentTranslator;
private:
vtkStructuredGridVolumeRepresentation(const vtkStructuredGridVolumeRepresentation&) VTK_DELETE_FUNCTION;
......
......@@ -78,6 +78,7 @@ vtkUnstructuredGridVolumeRepresentation::vtkUnstructuredGridVolumeRepresentation
this->Actor->SetMapper(this->DefaultMapper);
this->Actor->SetLODMapper(this->LODMapper);
vtkMath::UninitializeBounds(this->DataBounds);
this->UseDataPartitions = false;
}
//----------------------------------------------------------------------------
......@@ -207,7 +208,19 @@ int vtkUnstructuredGridVolumeRepresentation::ProcessViewRequest(
vtkPVRenderView::SetPiece(inInfo, this,
this->CacheKeeper->GetOutputDataObject(0));
vtkPVRenderView::MarkAsRedistributable(inInfo, this);
if(this->UseDataPartitions == true)
{
// Pass partitioning information to the render view.
vtkPVRenderView::SetOrderedCompositingInformation(
inInfo, this->DataBounds);
}
else
{
vtkPVRenderView::MarkAsRedistributable(inInfo, this);
}
vtkPVRenderView::SetRequiresDistributedRendering(inInfo, this, true);
vtkNew<vtkMatrix4x4> matrix;
this->Actor->GetMatrix(matrix.GetPointer());
......
......@@ -99,6 +99,14 @@ public:
// Provides access to the actor used by this representation.
vtkPVLODVolume* GetActor() { return this->Actor; }
// Description:
// Specify whether or not to redistribute the data. The default is false
// since that is the only way in general to guarantee correct rendering.
// Can set to true if all rendered data sets are based on the same
// data partitioning in order to save on the data redistribution.
vtkSetMacro(UseDataPartitions, bool);
vtkGetMacro(UseDataPartitions, bool);
protected:
vtkUnstructuredGridVolumeRepresentation();
~vtkUnstructuredGridVolumeRepresentation();
......@@ -141,6 +149,8 @@ protected:
vtkPolyDataMapper* LODMapper;
double DataBounds[6];
bool UseDataPartitions;
private:
vtkUnstructuredGridVolumeRepresentation(const vtkUnstructuredGridVolumeRepresentation&) VTK_DELETE_FUNCTION;
void operator=(const vtkUnstructuredGridVolumeRepresentation&) VTK_DELETE_FUNCTION;
......
......@@ -155,6 +155,14 @@
<Group name="piecewise_functions" />
</ProxyGroupDomain>
</ProxyProperty>
<IntVectorProperty command="SetUseDataPartitions"
default_values="0"
name="UseDataPartitions"
number_of_elements="1">
<BooleanDomain name="bool" />
<Documentation>Specify whether or not to redistribute the data when actor is translucent.
Default is false.</Documentation>
</IntVectorProperty>
<StringVectorProperty command="SetActiveVolumeMapper"
default_values="Projected tetra"
name="SelectMapper"
......
......@@ -172,6 +172,14 @@
</RequiredProperties>
</BoundsDomain>
</DoubleVectorProperty>
<IntVectorProperty command="SetUseDataPartitions"
default_values="0"
name="UseDataPartitions"
number_of_elements="1">
<BooleanDomain name="bool" />
<Documentation>Specify whether or not to redistribute the data when actor is translucent.
Default is false.</Documentation>
</IntVectorProperty>
<SubProxy>
<Proxy name="VolumeDummyMapper"
proxygroup="mappers"
......
......@@ -3669,6 +3669,9 @@
panel_visibility="never" />
<Property name="BlockColorsDistinctValues"
panel_visibility="advanced" />
<Property name="UseDataPartitions"
panel_visibility="advanced"
panel_visibility_default_for_representation="surface" />
</PropertyGroup>
<PropertyGroup panel_visibility="advanced"
......@@ -3944,6 +3947,7 @@
<ShareProperties subproxy="SurfaceRepresentation">
<Exception name="Input" />
<Exception name="Visibility" />
<Exception name="UseDataPartitions" />
</ShareProperties>
<ExposedProperties>
<PropertyGroup label="Volume Rendering">
......@@ -3956,9 +3960,10 @@
<Property name="SelectMapper"
panel_visibility="advanced"
panel_visibility_default_for_representation="volume" />
<Property name="UseDataParititions"
<Property name="UseDataPartitions"
panel_visibility="advanced"
panel_visibility_default_for_representation="volume" />
panel_visibility_default_for_representation="volume"
override="1"/>
</PropertyGroup>
</ExposedProperties>
</SubProxy>
......@@ -4126,13 +4131,6 @@
si_class="vtkSIUnstructuredGridVolumeRepresentationProxy"
base_proxygroup="representations"
base_proxyname="UnstructuredGridVolumeRepresentation">
<IntVectorProperty command="SetUseDataParititions"
default_values="1"
name="UseDataParititions"
number_of_elements="1">
<BooleanDomain name="bool" />
</IntVectorProperty>
<!-- end of StructuredGridVolumeRepresentation -->
</RepresentationProxy>
<!-- ================================================================== -->
......@@ -8793,6 +8791,14 @@
property="BlockColorsDistinctValues"/>
</Hints>
</IntVectorProperty>
<IntVectorProperty command="SetUseDataPartitions"
default_values="0"
name="UseDataPartitions"
number_of_elements="1">
<BooleanDomain name="bool" />
<Documentation>Specify whether or not to redistribute the data when actor is translucent.
Default is false.</Documentation>
</IntVectorProperty>
<IntVectorProperty command="SetEnableScaling"
default_values="0"
name="OSPRayUseScaleArray"
......
......@@ -44,6 +44,8 @@ set(Module_SRCS
vtkMarkSelectedRows.cxx
vtkMultiSliceContextItem.cxx
vtkOrderedCompositeDistributor.cxx
vtkPartitionOrdering.cxx
vtkPartitionOrderingInterface.cxx
vtkPVArrowSource.cxx
vtkPVAxesActor.cxx
vtkPVAxesWidget.cxx
......
......@@ -27,7 +27,7 @@
#include "vtkOpenGLCamera.h"
#include "vtkOpenGLError.h"
#include "vtkOpenGLRenderWindow.h"
#include "vtkPKdTree.h"
#include "vtkPartitionOrderingInterface.h"
#include "vtkPixelBufferObject.h"
#include "vtkRenderState.h"
#include "vtkRenderWindow.h"
......@@ -111,7 +111,7 @@ namespace
vtkStandardNewMacro(vtkIceTCompositePass);
vtkCxxSetObjectMacro(vtkIceTCompositePass, RenderPass, vtkRenderPass);
vtkCxxSetObjectMacro(vtkIceTCompositePass, KdTree, vtkPKdTree);
vtkCxxSetObjectMacro(vtkIceTCompositePass, PartitionOrdering, vtkPartitionOrderingInterface);
vtkCxxSetObjectMacro(vtkIceTCompositePass, Controller,
vtkMultiProcessController);
//----------------------------------------------------------------------------
......@@ -124,7 +124,7 @@ vtkIceTCompositePass::vtkIceTCompositePass()
this->IceTContext->UseOpenGLOn();
this->Controller = 0;
this->RenderPass = 0;
this->KdTree = 0;
this->PartitionOrdering = 0;
this->TileMullions[0] = this->TileMullions[1] = 0;
this->TileDimensions[0] = 1;
this->TileDimensions[1] = 1;
......@@ -174,7 +174,7 @@ vtkIceTCompositePass::~vtkIceTCompositePass()
this->Program = 0;
}
this->SetKdTree(0);
this->SetPartitionOrdering(0);
this->SetRenderPass(0);
this->SetController(0);
this->IceTContext->Delete();
......@@ -256,8 +256,8 @@ void vtkIceTCompositePass::SetupContext(const vtkRenderState* render_state)
}
bool use_ordered_compositing =
(this->KdTree && this->UseOrderedCompositing && !this->DepthOnly &&
this->KdTree->GetNumberOfRegions() >=
(this->PartitionOrdering && this->UseOrderedCompositing && !this->DepthOnly &&
this->PartitionOrdering->GetNumberOfRegions() >=
this->IceTContext->GetController()->GetNumberOfProcesses());
if(this->DepthOnly)
......@@ -308,7 +308,7 @@ void vtkIceTCompositePass::SetupContext(const vtkRenderState* render_state)
icetEnable(ICET_FLOATING_VIEWPORT);
if (use_ordered_compositing)
{
// if ordered compositing is enabled, pass the process order from the kdtree
// if ordered compositing is enabled, pass the process order from the partition ordering
// to icet.
// Setup IceT context for correct sorting.
......@@ -319,13 +319,13 @@ void vtkIceTCompositePass::SetupContext(const vtkRenderState* render_state)
vtkCamera *camera = render_state->GetRenderer()->GetActiveCamera();
if (camera->GetParallelProjection())
{
this->KdTree->ViewOrderAllProcessesInDirection(
this->PartitionOrdering->ViewOrderAllProcessesInDirection(
camera->GetDirectionOfProjection(),
orderedProcessIds);
}
else
{
this->KdTree->ViewOrderAllProcessesFromPosition(
this->PartitionOrdering->ViewOrderAllProcessesFromPosition(
camera->GetPosition(), orderedProcessIds);
}
......@@ -1242,7 +1242,7 @@ void vtkIceTCompositePass::PrintSelf(ostream& os, vtkIndent indent)
<< this->DataReplicatedOnAllProcesses << endl;
os << indent << "ImageReductionFactor: "
<< this->ImageReductionFactor << endl;
os << indent << "KdTree: " << this->KdTree << endl;
os << indent << "PartitionOrdering: " << this->PartitionOrdering << endl;
os << indent << "UseOrderedCompositing: "
<< this->UseOrderedCompositing << endl;
os << indent << "DepthOnly: " << this->DepthOnly << endl;
......
......@@ -43,7 +43,7 @@
#include <IceT.h> // for icet types
class vtkMultiProcessController;
class vtkPKdTree;
class vtkPartitionOrderingInterface;
class vtkIceTContext;
class vtkPixelBufferObject;
class vtkTextureObject;
......@@ -121,10 +121,10 @@ public:
vtkGetMacro(ImageReductionFactor, int);
// Description:
// kd tree that gives processes ordering. Initial value is a NULL pointer.
// partition ordering that gives processes ordering. Initial value is a NULL pointer.
// This is used only when UseOrderedCompositing is true.
vtkGetObjectMacro(KdTree,vtkPKdTree);
virtual void SetKdTree(vtkPKdTree *kdtree);
vtkGetObjectMacro(PartitionOrdering,vtkPartitionOrderingInterface);
virtual void SetPartitionOrdering(vtkPartitionOrderingInterface* partitionOrdering);
// Description:
// Enable/disable rendering of empty images. Painters that use MPI global
......@@ -136,8 +136,8 @@ public:
// Description: