[vtkusers] Isosurface opacity problem
이현철
basalt76 at gmail.com
Fri Dec 17 08:36:10 EST 2010
Thank you for your invaluable advice.
I really appreciate it.
Here is my depth sorting code just like vtk example.
vtkSmartPointer<vtkCamera> camera = vtkCamera::New();
renderer_->SetActiveCamera (camera);
contourFilter->SetInput(input);
vtkSmartPointer<vtkDepthSortPolyData> depthSort =
vtkDepthSortPolyData::New();
depthSort->SetInputConnection(contourFilter->GetOutputPort());
depthSort->SetDirectionToBackToFront();
depthSort->SetVector(1, 1, 1);
depthSort->SetCamera(camera);
depthSort->SortScalarsOn();
depthSort->Update();
ugridMapper->SetInput(depthSort->GetOutput());
2010년 12월 17일 오후 10:28, Sebastien Jourdain <sebastien.jourdain at kitware.com>님의
말:
> I don't know if it is a VTK problem, but ParaView is using vtk 5.6 (at
> least).
> On the other hand I don't know the underneath setting inside ParaView
> for the opacity.
> Maybe you can ask what are those setting so you can reproduce them
> inside your vtk application on the ParaView mailing list.
>
> Seb
>
> PS: How did you set the depth peeling/sorting inside your code ?
>
> 2010/12/17 이현철 <basalt76 at gmail.com>:
> > Yes it looks normal in ParaView.
> >
> > But In my application, after applying depth sorting,
> > the iso-surface looks like attached file.
> >
> > Is it vtk version problem ? My vtk is 5.2.1
> >
> > 2010년 12월 17일 오후 9:59, Sebastien Jourdain <
> sebastien.jourdain at kitware.com>님의
> > 말:
> >>
> >> Ok,
> >>
> >> but this is normal because the ContourFilter will generate a
> triangulated
> >> mesh.
> >>
> >> Seb
> >>
> >> 2010/12/17 이현철 <basalt76 at gmail.com>:
> >> > I sent you two images, input file and iso-contour image.
> >> > I had no problem to look at input file and iso-contour.
> >> >
> >> > Problem is
> >> > when I set Representation option with "Surface with edges".
> >> >
> >> > Input file image looks normal but iso-contour image gone through
> >> > vtkMarchingContourFilter has triangles.
> >> > Thank you very much.
> >> >
> >> > 2010년 12월 17일 오후 5:35, Sebastien Jourdain
> >> > <sebastien.jourdain at kitware.com>님의
> >> > 말:
> >> >>
> >> >> The reason is because you ask to look at the input file and not the
> >> >> iso-contour. The little eye on the left is disable in front of the
> >> >> contour.
> >> >>
> >> >> Seb
> >> >>
> >> >> PS: Once you change something on a filter, don't forget to click on
> >> >> Apply
> >> >>
> >> >> 2010/12/17 이현철 <basalt76 at gmail.com>:
> >> >> > I'm very sorry for bothering you.
> >> >> >
> >> >> > I got something interesting.
> >> >> >
> >> >> > In the ParaView, when I set Representation with "Surface with
> edges".
> >> >> >
> >> >> > The isosurface image went through vtkMarchingContourFilter has the
> >> >> > triangles.
> >> >> > But the original image looks normal.
> >> >> >
> >> >> > I have used vtkCleanPolyData and vtkPolyDataNormals.
> >> >> >
> >> >> > I attached two iamges.
> >> >> >
> >> >> > Thank you ver much.
> >> >> >
> >> >> > Lee.
> >> >> >
> >> >> > 2010년 12월 17일 오후 12:55, 이현철 <basalt76 at gmail.com>님의 말:
> >> >> >>
> >> >> >> Thank you for your advice
> >> >> >>
> >> >> >> I loaded my isosurface into ParaView and set opacity under 1.0.
> >> >> >> It looks normal ~
> >> >> >>
> >> >> >> Is this means that the ParaView do something special to solve
> >> >> >> transparency
> >> >> >> problem ?
> >> >> >>
> >> >> >> I attached the result.
> >> >> >>
> >> >> >> 2010년 12월 15일 오후 11:21, Sebastien Jourdain
> >> >> >> <sebastien.jourdain at kitware.com>님의 말:
> >> >> >>>
> >> >> >>> How did you defined your unstructured grid ? It seems that some
> >> >> >>> inner
> >> >> >>> surface are detected...
> >> >> >>> This could happen if you duplicate the points so each cell has
> its
> >> >> >>> own
> >> >> >>> points ?
> >> >> >>>
> >> >> >>> Try to load your data into ParaView and see if you can reproduce
> >> >> >>> the
> >> >> >>> problem.
> >> >> >>>
> >> >> >>> Seb
> >> >> >>>
> >> >> >>> 2010/12/15 이현철 <basalt76 at gmail.com>:
> >> >> >>> > Sorry to interrupt you again.
> >> >> >>> >
> >> >> >>> > I attach two images.
> >> >> >>> >
> >> >> >>> > Before and after adding depth sorting.
> >> >> >>> > There are some differences.
> >> >> >>> >
> >> >> >>> > My graphics card seems not to support depth peeling.
> >> >> >>> >
> >> >> >>> > Thank you very mush.
> >> >> >>> >
> >> >> >>> > Lee.
> >> >> >>> >
> >> >> >>> > 2010/12/15 Sebastien Jourdain <sebastien.jourdain at kitware.com>
> >> >> >>> >>
> >> >> >>> >> You should enable depth peeling on the renderer to fix most of
> >> >> >>> >> the
> >> >> >>> >> artefact. But the rendering will be slower.
> >> >> >>> >>
> >> >> >>> >> Seb
> >> >> >>> >>
> >> >> >>> >> On Tue, Dec 14, 2010 at 10:01 AM, 이현철 <basalt76 at gmail.com>
> >> >> >>> >> wrote:
> >> >> >>> >> > Dears
> >> >> >>> >> >
> >> >> >>> >> > I visualized isosurface using vtkMarchingContourFilter from
> >> >> >>> >> > vtkUnstructuredGrid.
> >> >> >>> >> >
> >> >> >>> >> > When the opacity is 1.0 , created picture looks normal.
> >> >> >>> >> >
> >> >> >>> >> > But when i adjust opacity to below 1.0, the picture has
> >> >> >>> >> > speckles
> >> >> >>> >> > depends
> >> >> >>> >> > on the position.
> >> >> >>> >> >
> >> >> >>> >> > Do you have any solution ?
> >> >> >>> >> >
> >> >> >>> >> > I'll really appreciate it.
> >> >> >>> >> >
> >> >> >>> >> > Attached images
> >> >> >>> >> >
> >> >> >>> >> > _______________________________________________
> >> >> >>> >> > 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
> >> >> >>> >> >
> >> >> >>> >> >
> >> >> >>> >
> >> >> >>> >
> >> >> >>
> >> >> >
> >> >> >
> >> >
> >> >
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20101217/34fb8796/attachment.htm>
More information about the vtkusers
mailing list