[Paraview] Disappearing volume rendering?
Aashish Chaudhary
aashish.chaudhary at kitware.com
Mon Oct 13 13:43:49 EDT 2014
Bertwim,
If you are seeing errors (like you mentioned in other email), I am afraid
that you won't see any volume. Would it be possible for you to upload your
data somewhere?
- Aashish
On Mon, Oct 13, 2014 at 1:35 PM, B.W.H. van Beest <bwvb at xs4all.nl> wrote:
> Yes, I do set a scalar for each cell. I left them out in the example, as
> also with a scalar I couldn't get a volume display.
>
> I'm not sure what you mean by "adjusting the transfer function".
>
> Regards,
> Bertwim
>
>
>
> On 10/13/2014 07:28 PM, Burlen Loring wrote:
> > do you have any scalars? those are not optional for volume rendering.
> > Additionally you may need to adjust the transfer function,
> >
> > On 10/13/2014 10:22 AM, B.W.H. van Beest wrote:
> >> No, it doesn't work. The filter creates tets, which are visible in the
> >> wireframe representation,
> >> but when I select "Volume" representation the image disappears.
> >>
> >> I can't imagine it is so difficult to render a volume in Paraview. I
> >> must be doing something wrong....
> >>
> >> Regards,
> >> Bertwim
> >>
> >> On 10/13/2014 05:36 PM, Cory Quammen wrote:
> >>> Bertwim,
> >>>
> >>> I'm not sure that the volume renderer can handle VTK_HEXAHEDRON
> >>> elements. Try the "Tetrahedralize" filter on your source and see if
> >>> the Volume representation works.
> >>>
> >>> Thanks,
> >>> Cory
> >>>
> >>> On Mon, Oct 13, 2014 at 10:19 AM, B.W.H. van Beest <bwvb at xs4all.nl>
> >>> wrote:
> >>>> Hi,
> >>>>
> >>>> I'm struggling to get a proper 3D view of my model system (yes,
> >>>> embarrassing!)
> >>>> but must admit my defeat.
> >>>> After stripping almost everything, keeping the minimum to exhibit the
> >>>> issue,
> >>>> I'm left with the following:
> >>>>
> >>>> I have created a simple box source. To get a 3D representation, I
> >>>> sub-classed
> >>>> the code for this Source from vtkUnstructuredGridAlgorithm.
> >>>>
> >>>> In the RequestData method, I define the 8 point of the unit cube. I
> >>>> added the points to the
> >>>> underlying unstructed grid, and I specified the cell topology.
> >>>>
> >>>> This all seems to work: when instantiating this box Source, I *do*
> >>>> get the
> >>>> expected cube in the representations (Surface, wireframe, Points).
> >>>>
> >>>> However, when I select the "Volume" representation, *the image
> >>>> disappears*
> >>>> What am I doing wrong?
> >>>>
> >>>> As the code is not too long and very simple, I take the freedom to
> >>>> paste
> >>>> it below.
> >>>>
> >>>> Kind regards.
> >>>> Bertwim
> >>>>
> >>>> =========================================
> >>>>
> >>>> int sphBoxSourceC::RequestData( vtkInformation *vtkNotUsed(request),
> >>>> vtkInformationVector
> >>>> **vtkNotUsed(inputVector),
> >>>> vtkInformationVector *outputVector)
> >>>> {
> >>>> // Get the info object
> >>>> vtkInformation *outInfo = outputVector->GetInformationObject(0);
> >>>> vtkUnstructuredGrid *umesh = vtkUnstructuredGrid::SafeDownCast(
> >>>> outInfo->Get( vtkDataObject::DATA_OBJECT() ) );
> >>>>
> >>>> // Pre-allocate some memory
> >>>> umesh->Allocate( 1024 );
> >>>>
> >>>> // Specify points.
> >>>> double r0[] = { 0.0, 0.0, 0.0 };
> >>>> double r1[] = { 1.0, 0.0, 0.0 };
> >>>> double r2[] = { 0.0, 1.0, 0.0 };
> >>>> double r3[] = { 1.0, 1.0, 0.0 };
> >>>> double r4[] = { 0.0, 0.0, 1.0 };
> >>>> double r5[] = { 1.0, 0.0, 1.0 };
> >>>> double r6[] = { 0.0, 1.0, 1.0 };
> >>>> double r7[] = { 1.0, 1.0, 1.0 };
> >>>>
> >>>> // Collect the points in a vtk data structures.
> >>>> {
> >>>> vtkSmartPointer<vtkPoints> points =
> >>>> vtkSmartPointer<vtkPoints>::New();
> >>>> points->SetDataType( VTK_DOUBLE );
> >>>>
> >>>> points->InsertNextPoint( r0 );
> >>>> points->InsertNextPoint( r1 );
> >>>> points->InsertNextPoint( r2 );
> >>>> points->InsertNextPoint( r3 );
> >>>> points->InsertNextPoint( r4 );
> >>>> points->InsertNextPoint( r5 );
> >>>> points->InsertNextPoint( r6 );
> >>>> points->InsertNextPoint( r7 );
> >>>>
> >>>> // Transfer points to umesh.
> >>>> umesh->SetPoints( points );
> >>>> }
> >>>>
> >>>> // Cell Topology
> >>>> vtkIdType vtx[8] = { 0, 1, 3, 2, 4, 5, 7, 6 };
> >>>> umesh->InsertNextCell( VTK_HEXAHEDRON, 8, vtx );
> >>>>
> >>>> return 1;
> >>>> }
> >>>>
> >>>>
> >>>>
> >>>> _______________________________________________
> >>>> 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 ParaView Wiki at:
> >>>> http://paraview.org/Wiki/ParaView
> >>>>
> >>>> Follow this link to subscribe/unsubscribe:
> >>>> http://public.kitware.com/mailman/listinfo/paraview
> >> _______________________________________________
> >> 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 ParaView Wiki at:
> >> http://paraview.org/Wiki/ParaView
> >>
> >> Follow this link to subscribe/unsubscribe:
> >> http://public.kitware.com/mailman/listinfo/paraview
> >
> >
> >
>
> _______________________________________________
> 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 ParaView Wiki at:
> http://paraview.org/Wiki/ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/paraview
>
--
*| Aashish Chaudhary | Technical Leader | Kitware Inc. *
*| http://www.kitware.com/company/team/chaudhary.html
<http://www.kitware.com/company/team/chaudhary.html>*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20141013/dab50e22/attachment-0001.html>
More information about the ParaView
mailing list