[vtkusers] Volume rendering Shading with dependent components
Benoit Bleuze
benoit.bleuze at inria.fr
Thu May 3 11:29:20 EDT 2012
And as for the rendering mode I meant vtkGPUVolumeRayCastMapper of course, not my own member (vtkSmartVolumeMapper::GPURenderMode) which doesn't mean anything to you all.
----- Original Message -----
> Hi list,
>
> I have encountered this strange behaviour in VTK recently and wanted
> some knowledgeable vtk people to shade some light on it:
>
> I am doing volume rendering of an rgba volume.
> To do this I set the following 2 vtkVolume properties:
>
> vtkVolumeProperty::IndependentComponentsOff()
> and vtkVolumeProperty::ShadeOn()
>
> I use the GPU Rendering: vtkSmartVolumeMapper::GPURenderMode
>
> As a result, if I compile vtk in debug mode I stumble upon this
> failing assert call,
> in vtkOpenGLGPUVolumeRayCastMapper.cxx, line 4159 in vtk 5.8.0 (in git
> at this time it's on line 4152),
> in the following method:
>
> void vtkOpenGLGPUVolumeRayCastMapper::PreRender(vtkRenderer *ren,
> vtkVolume *vol,
> double datasetBounds[6],
> double scalarRange[2],
> int numberOfScalarComponents,
> unsigned int numberOfLevels)
> [...]
> if ( vol->GetProperty()->GetShade() )
> {
> shadeMethod=vtkOpenGLGPUVolumeRayCastMapperShadeYes;
> assert("check: only_1_component_todo" && numberOfScalarComponents==1);
> }
>
> [...]
>
>
> If I run the same code in Release mode, nothing goes wrong and there
> is indeed shading performed on my rgba data.
> Should this assert be removed, or is shading on dependent components
> not something to do?
>
> Thank you for the insight.
>
> Ben.
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
More information about the vtkusers
mailing list